From a72683965be5069762e04c2c06a0189c7505c5c4 Mon Sep 17 00:00:00 2001 From: Marcos Gaeta <31750075+mgaeta@users.noreply.github.com> Date: Tue, 27 Aug 2024 13:54:37 -0700 Subject: [PATCH] ref: extract the AWS Error Type as a type instead of a string match (#54) * Update aws modules to latest * lint * extract the AWS Error Type as a type instead of a string match * go mod * fix lint --- .golangci.yml | 2 - go.mod | 34 +- go.sum | 34 + pkg/connector/sso_group.go | 49 +- .../aws/accountid_endpoint_mode.go | 18 + .../aws/aws-sdk-go-v2/aws/config.go | 3 + .../aws/aws-sdk-go-v2/aws/credentials.go | 3 + .../aws/aws-sdk-go-v2/aws/endpoints.go | 26 +- .../aws-sdk-go-v2/aws/go_module_metadata.go | 2 +- .../aws/middleware/user_agent.go | 44 + .../aws/aws-sdk-go-v2/aws/retry/middleware.go | 45 +- .../aws/retry/retryable_error.go | 21 + .../aws/signer/internal/v4/headers.go | 1 - .../aws/aws-sdk-go-v2/aws/signer/v4/v4.go | 6 + .../aws/aws-sdk-go-v2/config/CHANGELOG.md | 82 ++ .../aws/aws-sdk-go-v2/config/config.go | 3 + .../aws/aws-sdk-go-v2/config/env_config.go | 37 + .../config/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/config/load_options.go | 29 +- .../aws/aws-sdk-go-v2/config/provider.go | 17 + .../aws/aws-sdk-go-v2/config/resolve.go | 16 + .../aws/aws-sdk-go-v2/config/shared_config.go | 34 + .../aws-sdk-go-v2/credentials/CHANGELOG.md | 77 ++ .../endpointcreds/internal/client/client.go | 1 + .../credentials/endpointcreds/provider.go | 1 + .../credentials/go_module_metadata.go | 2 +- .../credentials/processcreds/provider.go | 4 + .../credentials/ssocreds/sso_cached_token.go | 2 +- .../ssocreds/sso_credentials_provider.go | 1 + .../stscreds/assume_role_provider.go | 6 + .../stscreds/web_identity_provider.go | 19 + .../feature/ec2/imds/CHANGELOG.md | 45 + .../feature/ec2/imds/go_module_metadata.go | 2 +- .../internal/auth/smithy/v4signer_adapter.go | 6 +- .../internal/awsutil/path_value.go | 225 ---- .../internal/configsources/CHANGELOG.md | 45 + .../configsources/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/internal/context/context.go | 13 + .../endpoints/awsrulesfn/partition.go | 11 +- .../endpoints/awsrulesfn/partitions.go | 94 +- .../endpoints/awsrulesfn/partitions.json | 6 +- .../internal/endpoints/v2/CHANGELOG.md | 45 + .../endpoints/v2/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/internal/ini/CHANGELOG.md | 4 + .../internal/ini/go_module_metadata.go | 2 +- .../internal/middleware/middleware.go | 42 + .../aws-sdk-go-v2/service/iam/CHANGELOG.md | 146 +++ .../aws-sdk-go-v2/service/iam/api_client.go | 217 ++- ...i_op_AddClientIDToOpenIDConnectProvider.go | 28 +- .../iam/api_op_AddRoleToInstanceProfile.go | 66 +- .../service/iam/api_op_AddUserToGroup.go | 43 +- .../service/iam/api_op_AttachGroupPolicy.go | 62 +- .../service/iam/api_op_AttachRolePolicy.go | 67 +- .../service/iam/api_op_AttachUserPolicy.go | 62 +- .../service/iam/api_op_ChangePassword.go | 43 +- .../service/iam/api_op_CreateAccessKey.go | 62 +- .../service/iam/api_op_CreateAccountAlias.go | 38 +- .../service/iam/api_op_CreateGroup.go | 59 +- .../iam/api_op_CreateInstanceProfile.go | 80 +- .../service/iam/api_op_CreateLoginProfile.go | 58 +- .../iam/api_op_CreateOpenIDConnectProvider.go | 157 ++- .../service/iam/api_op_CreatePolicy.go | 131 +- .../service/iam/api_op_CreatePolicyVersion.go | 87 +- .../service/iam/api_op_CreateRole.go | 143 +- .../service/iam/api_op_CreateSAMLProvider.go | 94 +- .../iam/api_op_CreateServiceLinkedRole.go | 53 +- .../api_op_CreateServiceSpecificCredential.go | 61 +- .../service/iam/api_op_CreateUser.go | 85 +- .../iam/api_op_CreateVirtualMFADevice.go | 88 +- .../service/iam/api_op_DeactivateMFADevice.go | 51 +- .../service/iam/api_op_DeleteAccessKey.go | 55 +- .../service/iam/api_op_DeleteAccountAlias.go | 42 +- .../iam/api_op_DeleteAccountPasswordPolicy.go | 21 +- .../service/iam/api_op_DeleteGroup.go | 32 +- .../service/iam/api_op_DeleteGroupPolicy.go | 55 +- .../iam/api_op_DeleteInstanceProfile.go | 48 +- .../service/iam/api_op_DeleteLoginProfile.go | 55 +- .../iam/api_op_DeleteOpenIDConnectProvider.go | 31 +- .../service/iam/api_op_DeletePolicy.go | 61 +- .../service/iam/api_op_DeletePolicyVersion.go | 61 +- .../service/iam/api_op_DeleteRole.go | 51 +- .../api_op_DeleteRolePermissionsBoundary.go | 32 +- .../service/iam/api_op_DeleteRolePolicy.go | 53 +- .../service/iam/api_op_DeleteSAMLProvider.go | 37 +- .../service/iam/api_op_DeleteSSHPublicKey.go | 54 +- .../iam/api_op_DeleteServerCertificate.go | 50 +- .../iam/api_op_DeleteServiceLinkedRole.go | 48 +- .../api_op_DeleteServiceSpecificCredential.go | 41 +- .../iam/api_op_DeleteSigningCertificate.go | 55 +- .../service/iam/api_op_DeleteUser.go | 65 +- .../api_op_DeleteUserPermissionsBoundary.go | 29 +- .../service/iam/api_op_DeleteUserPolicy.go | 53 +- .../iam/api_op_DeleteVirtualMFADevice.go | 39 +- .../service/iam/api_op_DetachGroupPolicy.go | 51 +- .../service/iam/api_op_DetachRolePolicy.go | 51 +- .../service/iam/api_op_DetachUserPolicy.go | 51 +- .../service/iam/api_op_EnableMFADevice.go | 81 +- .../iam/api_op_GenerateCredentialReport.go | 29 +- ...pi_op_GenerateOrganizationsAccessReport.go | 126 +- ...i_op_GenerateServiceLastAccessedDetails.go | 102 +- .../iam/api_op_GetAccessKeyLastUsed.go | 35 +- .../api_op_GetAccountAuthorizationDetails.go | 90 +- .../iam/api_op_GetAccountPasswordPolicy.go | 26 +- .../service/iam/api_op_GetAccountSummary.go | 28 +- .../api_op_GetContextKeysForCustomPolicy.go | 53 +- ...api_op_GetContextKeysForPrincipalPolicy.go | 70 +- .../service/iam/api_op_GetCredentialReport.go | 34 +- .../service/iam/api_op_GetGroup.go | 76 +- .../service/iam/api_op_GetGroupPolicy.go | 79 +- .../service/iam/api_op_GetInstanceProfile.go | 87 +- .../service/iam/api_op_GetLoginProfile.go | 49 +- .../service/iam/api_op_GetMFADevice.go | 36 +- .../iam/api_op_GetOpenIDConnectProvider.go | 43 +- .../api_op_GetOrganizationsAccessReport.go | 89 +- .../service/iam/api_op_GetPolicy.go | 93 +- .../service/iam/api_op_GetPolicyVersion.go | 71 +- .../service/iam/api_op_GetRole.go | 94 +- .../service/iam/api_op_GetRolePolicy.go | 83 +- .../service/iam/api_op_GetSAMLProvider.go | 43 +- .../service/iam/api_op_GetSSHPublicKey.go | 55 +- .../iam/api_op_GetServerCertificate.go | 44 +- .../api_op_GetServiceLastAccessedDetails.go | 114 +- ...tServiceLastAccessedDetailsWithEntities.go | 77 +- ...i_op_GetServiceLinkedRoleDeletionStatus.go | 35 +- .../service/iam/api_op_GetUser.go | 122 +- .../service/iam/api_op_GetUserPolicy.go | 79 +- .../service/iam/api_op_ListAccessKeys.go | 102 +- .../service/iam/api_op_ListAccountAliases.go | 70 +- .../iam/api_op_ListAttachedGroupPolicies.go | 111 +- .../iam/api_op_ListAttachedRolePolicies.go | 111 +- .../iam/api_op_ListAttachedUserPolicies.go | 111 +- .../iam/api_op_ListEntitiesForPolicy.go | 122 +- .../service/iam/api_op_ListGroupPolicies.go | 103 +- .../service/iam/api_op_ListGroups.go | 86 +- .../service/iam/api_op_ListGroupsForUser.go | 80 +- .../iam/api_op_ListInstanceProfileTags.go | 80 +- .../iam/api_op_ListInstanceProfiles.go | 99 +- .../iam/api_op_ListInstanceProfilesForRole.go | 83 +- .../service/iam/api_op_ListMFADeviceTags.go | 80 +- .../service/iam/api_op_ListMFADevices.go | 80 +- .../api_op_ListOpenIDConnectProviderTags.go | 84 +- .../iam/api_op_ListOpenIDConnectProviders.go | 32 +- .../service/iam/api_op_ListPolicies.go | 136 +- ...pi_op_ListPoliciesGrantingServiceAccess.go | 72 +- .../service/iam/api_op_ListPolicyTags.go | 80 +- .../service/iam/api_op_ListPolicyVersions.go | 88 +- .../service/iam/api_op_ListRolePolicies.go | 92 +- .../service/iam/api_op_ListRoleTags.go | 81 +- .../service/iam/api_op_ListRoles.go | 101 +- .../iam/api_op_ListSAMLProviderTags.go | 84 +- .../service/iam/api_op_ListSAMLProviders.go | 28 +- .../service/iam/api_op_ListSSHPublicKeys.go | 93 +- .../iam/api_op_ListServerCertificateTags.go | 90 +- .../iam/api_op_ListServerCertificates.go | 106 +- .../api_op_ListServiceSpecificCredentials.go | 37 +- .../iam/api_op_ListSigningCertificates.go | 85 +- .../service/iam/api_op_ListUserPolicies.go | 93 +- .../service/iam/api_op_ListUserTags.go | 80 +- .../service/iam/api_op_ListUsers.go | 97 +- .../iam/api_op_ListVirtualMFADevices.go | 81 +- .../service/iam/api_op_PutGroupPolicy.go | 91 +- .../iam/api_op_PutRolePermissionsBoundary.go | 52 +- .../service/iam/api_op_PutRolePolicy.go | 105 +- .../iam/api_op_PutUserPermissionsBoundary.go | 49 +- .../service/iam/api_op_PutUserPolicy.go | 91 +- ...RemoveClientIDFromOpenIDConnectProvider.go | 40 +- .../api_op_RemoveRoleFromInstanceProfile.go | 63 +- .../service/iam/api_op_RemoveUserFromGroup.go | 43 +- .../api_op_ResetServiceSpecificCredential.go | 47 +- .../service/iam/api_op_ResyncMFADevice.go | 60 +- .../iam/api_op_SetDefaultPolicyVersion.go | 50 +- ...i_op_SetSecurityTokenServicePreferences.go | 68 +- .../iam/api_op_SimulateCustomPolicy.go | 262 ++-- .../iam/api_op_SimulatePrincipalPolicy.go | 267 ++-- .../service/iam/api_op_TagInstanceProfile.go | 48 +- .../service/iam/api_op_TagMFADevice.go | 47 +- .../iam/api_op_TagOpenIDConnectProvider.go | 50 +- .../service/iam/api_op_TagPolicy.go | 46 +- .../service/iam/api_op_TagRole.go | 51 +- .../service/iam/api_op_TagSAMLProvider.go | 51 +- .../iam/api_op_TagServerCertificate.go | 58 +- .../service/iam/api_op_TagUser.go | 52 +- .../iam/api_op_UntagInstanceProfile.go | 37 +- .../service/iam/api_op_UntagMFADevice.go | 36 +- .../iam/api_op_UntagOpenIDConnectProvider.go | 41 +- .../service/iam/api_op_UntagPolicy.go | 36 +- .../service/iam/api_op_UntagRole.go | 37 +- .../service/iam/api_op_UntagSAMLProvider.go | 40 +- .../iam/api_op_UntagServerCertificate.go | 47 +- .../service/iam/api_op_UntagUser.go | 37 +- .../service/iam/api_op_UpdateAccessKey.go | 65 +- .../iam/api_op_UpdateAccountPasswordPolicy.go | 127 +- .../iam/api_op_UpdateAssumeRolePolicy.go | 55 +- .../service/iam/api_op_UpdateGroup.go | 78 +- .../service/iam/api_op_UpdateLoginProfile.go | 57 +- ...p_UpdateOpenIDConnectProviderThumbprint.go | 65 +- .../service/iam/api_op_UpdateRole.go | 47 +- .../iam/api_op_UpdateRoleDescription.go | 28 +- .../service/iam/api_op_UpdateSAMLProvider.go | 36 +- .../service/iam/api_op_UpdateSSHPublicKey.go | 54 +- .../iam/api_op_UpdateServerCertificate.go | 89 +- .../api_op_UpdateServiceSpecificCredential.go | 41 +- .../iam/api_op_UpdateSigningCertificate.go | 57 +- .../service/iam/api_op_UpdateUser.go | 77 +- .../service/iam/api_op_UploadSSHPublicKey.go | 58 +- .../iam/api_op_UploadServerCertificate.go | 152 ++- .../iam/api_op_UploadSigningCertificate.go | 80 +- .../aws/aws-sdk-go-v2/service/iam/auth.go | 42 +- .../service/iam/deserializers.go | 105 ++ .../aws/aws-sdk-go-v2/service/iam/doc.go | 18 +- .../aws-sdk-go-v2/service/iam/endpoints.go | 28 +- .../aws-sdk-go-v2/service/iam/generated.json | 4 +- .../service/iam/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/service/iam/options.go | 38 +- .../aws-sdk-go-v2/service/iam/types/enums.go | 96 +- .../aws-sdk-go-v2/service/iam/types/errors.go | 38 +- .../aws-sdk-go-v2/service/iam/types/types.go | 1168 ++++++++++------- .../aws-sdk-go-v2/service/iam/validators.go | 3 - .../service/identitystore/CHANGELOG.md | 153 +++ .../service/identitystore/api_client.go | 217 ++- .../identitystore/api_op_CreateGroup.go | 21 +- .../api_op_CreateGroupMembership.go | 21 +- .../identitystore/api_op_CreateUser.go | 21 +- .../identitystore/api_op_DeleteGroup.go | 21 +- .../api_op_DeleteGroupMembership.go | 21 +- .../identitystore/api_op_DeleteUser.go | 21 +- .../identitystore/api_op_DescribeGroup.go | 27 +- .../api_op_DescribeGroupMembership.go | 30 +- .../identitystore/api_op_DescribeUser.go | 31 +- .../identitystore/api_op_GetGroupId.go | 31 +- .../api_op_GetGroupMembershipId.go | 31 +- .../service/identitystore/api_op_GetUserId.go | 31 +- .../identitystore/api_op_IsMemberInGroups.go | 31 +- .../api_op_ListGroupMemberships.go | 50 +- .../api_op_ListGroupMembershipsForMember.go | 50 +- .../identitystore/api_op_ListGroups.go | 48 +- .../service/identitystore/api_op_ListUsers.go | 48 +- .../identitystore/api_op_UpdateGroup.go | 21 +- .../identitystore/api_op_UpdateUser.go | 21 +- .../service/identitystore/auth.go | 42 +- .../service/identitystore/deserializers.go | 305 ++--- .../service/identitystore/doc.go | 8 +- .../service/identitystore/endpoints.go | 28 +- .../service/identitystore/generated.json | 4 +- .../identitystore/go_module_metadata.go | 2 +- .../internal/endpoints/endpoints.go | 15 + .../service/identitystore/options.go | 38 +- .../service/identitystore/types/enums.go | 10 +- .../service/identitystore/types/errors.go | 2 + .../internal/accept-encoding/CHANGELOG.md | 8 + .../accept-encoding/go_module_metadata.go | 2 +- .../internal/presigned-url/CHANGELOG.md | 45 + .../presigned-url/go_module_metadata.go | 2 +- .../service/organizations/CHANGELOG.md | 157 +++ .../service/organizations/api_client.go | 217 ++- .../organizations/api_op_AcceptHandshake.go | 73 +- .../organizations/api_op_AttachPolicy.go | 59 +- .../organizations/api_op_CancelHandshake.go | 46 +- .../organizations/api_op_CloseAccount.go | 80 +- .../organizations/api_op_CreateAccount.go | 171 ++- .../api_op_CreateGovCloudAccount.go | 249 ++-- .../api_op_CreateOrganization.go | 64 +- .../api_op_CreateOrganizationalUnit.go | 55 +- .../organizations/api_op_CreatePolicy.go | 80 +- .../organizations/api_op_DeclineHandshake.go | 45 +- .../api_op_DeleteOrganization.go | 21 +- .../api_op_DeleteOrganizationalUnit.go | 39 +- .../organizations/api_op_DeletePolicy.go | 39 +- .../api_op_DeleteResourcePolicy.go | 26 +- ...api_op_DeregisterDelegatedAdministrator.go | 56 +- .../organizations/api_op_DescribeAccount.go | 36 +- .../api_op_DescribeCreateAccountStatus.go | 33 +- .../api_op_DescribeEffectivePolicy.go | 50 +- .../organizations/api_op_DescribeHandshake.go | 43 +- .../api_op_DescribeOrganization.go | 44 +- .../api_op_DescribeOrganizationalUnit.go | 42 +- .../organizations/api_op_DescribePolicy.go | 39 +- .../api_op_DescribeResourcePolicy.go | 29 +- .../organizations/api_op_DetachPolicy.go | 75 +- .../api_op_DisableAWSServiceAccess.go | 81 +- .../organizations/api_op_DisablePolicyType.go | 72 +- .../api_op_EnableAWSServiceAccess.go | 55 +- .../organizations/api_op_EnableAllFeatures.go | 63 +- .../organizations/api_op_EnablePolicyType.go | 69 +- .../api_op_InviteAccountToOrganization.go | 86 +- .../organizations/api_op_LeaveOrganization.go | 86 +- ..._op_ListAWSServiceAccessForOrganization.go | 58 +- .../organizations/api_op_ListAccounts.go | 56 +- .../api_op_ListAccountsForParent.go | 57 +- .../organizations/api_op_ListChildren.go | 66 +- .../api_op_ListCreateAccountStatus.go | 57 +- .../api_op_ListDelegatedAdministrators.go | 55 +- .../api_op_ListDelegatedServicesForAccount.go | 48 +- .../api_op_ListHandshakesForAccount.go | 64 +- .../api_op_ListHandshakesForOrganization.go | 63 +- ...api_op_ListOrganizationalUnitsForParent.go | 56 +- .../organizations/api_op_ListParents.go | 69 +- .../organizations/api_op_ListPolicies.go | 66 +- .../api_op_ListPoliciesForTarget.go | 84 +- .../service/organizations/api_op_ListRoots.go | 66 +- .../api_op_ListTagsForResource.go | 58 +- .../api_op_ListTargetsForPolicy.go | 65 +- .../organizations/api_op_MoveAccount.go | 52 +- .../organizations/api_op_PutResourcePolicy.go | 44 +- .../api_op_RegisterDelegatedAdministrator.go | 36 +- .../api_op_RemoveAccountFromOrganization.go | 55 +- .../organizations/api_op_TagResource.go | 51 +- .../organizations/api_op_UntagResource.go | 39 +- .../api_op_UpdateOrganizationalUnit.go | 44 +- .../organizations/api_op_UpdatePolicy.go | 57 +- .../service/organizations/auth.go | 42 +- .../service/organizations/deserializers.go | 808 +++++------- .../service/organizations/doc.go | 104 +- .../service/organizations/endpoints.go | 132 +- .../service/organizations/generated.json | 4 +- .../organizations/go_module_metadata.go | 2 +- .../service/organizations/options.go | 38 +- .../service/organizations/types/enums.go | 162 ++- .../service/organizations/types/errors.go | 400 +++--- .../service/organizations/types/types.go | 336 +++-- .../aws-sdk-go-v2/service/sso/CHANGELOG.md | 63 + .../aws-sdk-go-v2/service/sso/api_client.go | 108 +- .../service/sso/api_op_GetRoleCredentials.go | 13 +- .../service/sso/api_op_ListAccountRoles.go | 32 +- .../service/sso/api_op_ListAccounts.go | 37 +- .../service/sso/api_op_Logout.go | 37 +- .../aws/aws-sdk-go-v2/service/sso/auth.go | 8 +- .../service/sso/deserializers.go | 10 + .../aws/aws-sdk-go-v2/service/sso/doc.go | 22 +- .../aws-sdk-go-v2/service/sso/endpoints.go | 19 +- .../service/sso/go_module_metadata.go | 2 +- .../sso/internal/endpoints/endpoints.go | 8 + .../aws/aws-sdk-go-v2/service/sso/options.go | 34 +- .../aws-sdk-go-v2/service/sso/types/types.go | 20 +- .../service/ssoadmin/CHANGELOG.md | 149 +++ .../service/ssoadmin/api_client.go | 217 ++- ...erManagedPolicyReferenceToPermissionSet.go | 23 +- ...i_op_AttachManagedPolicyToPermissionSet.go | 36 +- .../api_op_CreateAccountAssignment.go | 53 +- .../ssoadmin/api_op_CreateApplication.go | 37 +- .../api_op_CreateApplicationAssignment.go | 24 +- .../service/ssoadmin/api_op_CreateInstance.go | 46 +- ...anceAccessControlAttributeConfiguration.go | 29 +- .../ssoadmin/api_op_CreatePermissionSet.go | 38 +- .../api_op_CreateTrustedTokenIssuer.go | 44 +- .../api_op_DeleteAccountAssignment.go | 36 +- .../ssoadmin/api_op_DeleteApplication.go | 26 +- .../api_op_DeleteApplicationAccessScope.go | 21 +- .../api_op_DeleteApplicationAssignment.go | 24 +- ...p_DeleteApplicationAuthenticationMethod.go | 21 +- .../ssoadmin/api_op_DeleteApplicationGrant.go | 21 +- ..._op_DeleteInlinePolicyFromPermissionSet.go | 26 +- .../service/ssoadmin/api_op_DeleteInstance.go | 21 +- ...anceAccessControlAttributeConfiguration.go | 25 +- .../ssoadmin/api_op_DeletePermissionSet.go | 26 +- ...etePermissionsBoundaryFromPermissionSet.go | 23 +- .../api_op_DeleteTrustedTokenIssuer.go | 28 +- ...DescribeAccountAssignmentCreationStatus.go | 26 +- ...DescribeAccountAssignmentDeletionStatus.go | 26 +- .../ssoadmin/api_op_DescribeApplication.go | 29 +- .../api_op_DescribeApplicationAssignment.go | 40 +- .../api_op_DescribeApplicationProvider.go | 21 +- .../ssoadmin/api_op_DescribeInstance.go | 27 +- ...anceAccessControlAttributeConfiguration.go | 23 +- .../ssoadmin/api_op_DescribePermissionSet.go | 26 +- ...DescribePermissionSetProvisioningStatus.go | 30 +- .../api_op_DescribeTrustedTokenIssuer.go | 21 +- ...ManagedPolicyReferenceFromPermissionSet.go | 23 +- ...op_DetachManagedPolicyFromPermissionSet.go | 26 +- .../api_op_GetApplicationAccessScope.go | 21 +- ...p_GetApplicationAssignmentConfiguration.go | 35 +- ...i_op_GetApplicationAuthenticationMethod.go | 21 +- .../ssoadmin/api_op_GetApplicationGrant.go | 21 +- .../api_op_GetInlinePolicyForPermissionSet.go | 33 +- ..._GetPermissionsBoundaryForPermissionSet.go | 23 +- ..._op_ListAccountAssignmentCreationStatus.go | 45 +- ..._op_ListAccountAssignmentDeletionStatus.go | 45 +- .../ssoadmin/api_op_ListAccountAssignments.go | 45 +- ...i_op_ListAccountAssignmentsForPrincipal.go | 40 +- ...ListAccountsForProvisionedPermissionSet.go | 53 +- .../api_op_ListApplicationAccessScopes.go | 40 +- .../api_op_ListApplicationAssignments.go | 40 +- ..._ListApplicationAssignmentsForPrincipal.go | 40 +- ...op_ListApplicationAuthenticationMethods.go | 40 +- .../ssoadmin/api_op_ListApplicationGrants.go | 40 +- .../api_op_ListApplicationProviders.go | 40 +- .../ssoadmin/api_op_ListApplications.go | 43 +- ...rManagedPolicyReferencesInPermissionSet.go | 42 +- .../service/ssoadmin/api_op_ListInstances.go | 38 +- ...i_op_ListManagedPoliciesInPermissionSet.go | 49 +- ..._op_ListPermissionSetProvisioningStatus.go | 45 +- .../ssoadmin/api_op_ListPermissionSets.go | 47 +- ..._ListPermissionSetsProvisionedToAccount.go | 45 +- .../ssoadmin/api_op_ListTagsForResource.go | 45 +- .../api_op_ListTrustedTokenIssuers.go | 40 +- .../ssoadmin/api_op_ProvisionPermissionSet.go | 26 +- .../api_op_PutApplicationAccessScope.go | 21 +- ...p_PutApplicationAssignmentConfiguration.go | 43 +- ...i_op_PutApplicationAuthenticationMethod.go | 21 +- .../ssoadmin/api_op_PutApplicationGrant.go | 21 +- .../api_op_PutInlinePolicyToPermissionSet.go | 35 +- ...p_PutPermissionsBoundaryToPermissionSet.go | 23 +- .../service/ssoadmin/api_op_TagResource.go | 26 +- .../service/ssoadmin/api_op_UntagResource.go | 26 +- .../ssoadmin/api_op_UpdateApplication.go | 26 +- .../service/ssoadmin/api_op_UpdateInstance.go | 24 +- ...anceAccessControlAttributeConfiguration.go | 24 +- .../ssoadmin/api_op_UpdatePermissionSet.go | 28 +- .../api_op_UpdateTrustedTokenIssuer.go | 28 +- .../aws-sdk-go-v2/service/ssoadmin/auth.go | 42 +- .../service/ssoadmin/deserializers.go | 1060 ++++++--------- .../aws/aws-sdk-go-v2/service/ssoadmin/doc.go | 33 +- .../service/ssoadmin/endpoints.go | 28 +- .../service/ssoadmin/generated.json | 4 +- .../service/ssoadmin/go_module_metadata.go | 2 +- .../ssoadmin/internal/endpoints/endpoints.go | 15 + .../aws-sdk-go-v2/service/ssoadmin/options.go | 38 +- .../service/ssoadmin/types/enums.go | 71 +- .../service/ssoadmin/types/types.go | 67 +- .../service/ssooidc/CHANGELOG.md | 67 + .../service/ssooidc/api_client.go | 108 +- .../service/ssooidc/api_op_CreateToken.go | 62 +- .../ssooidc/api_op_CreateTokenWithIAM.go | 69 +- .../service/ssooidc/api_op_RegisterClient.go | 25 + .../api_op_StartDeviceAuthorization.go | 17 +- .../aws/aws-sdk-go-v2/service/ssooidc/auth.go | 8 +- .../service/ssooidc/deserializers.go | 101 ++ .../aws/aws-sdk-go-v2/service/ssooidc/doc.go | 40 +- .../service/ssooidc/endpoints.go | 19 +- .../service/ssooidc/go_module_metadata.go | 2 +- .../ssooidc/internal/endpoints/endpoints.go | 8 + .../aws-sdk-go-v2/service/ssooidc/options.go | 34 +- .../service/ssooidc/serializers.go | 56 + .../service/ssooidc/types/errors.go | 32 +- .../aws-sdk-go-v2/service/sts/CHANGELOG.md | 63 + .../aws-sdk-go-v2/service/sts/api_client.go | 108 +- .../service/sts/api_op_AssumeRole.go | 457 ++++--- .../service/sts/api_op_AssumeRoleWithSAML.go | 373 +++--- .../sts/api_op_AssumeRoleWithWebIdentity.go | 387 +++--- .../sts/api_op_DecodeAuthorizationMessage.go | 51 +- .../service/sts/api_op_GetAccessKeyInfo.go | 55 +- .../service/sts/api_op_GetCallerIdentity.go | 32 +- .../service/sts/api_op_GetFederationToken.go | 315 +++-- .../service/sts/api_op_GetSessionToken.go | 110 +- .../aws/aws-sdk-go-v2/service/sts/auth.go | 8 +- .../service/sts/deserializers.go | 9 + .../aws/aws-sdk-go-v2/service/sts/doc.go | 12 +- .../aws-sdk-go-v2/service/sts/endpoints.go | 19 +- .../service/sts/go_module_metadata.go | 2 +- .../sts/internal/endpoints/endpoints.go | 3 + .../aws/aws-sdk-go-v2/service/sts/options.go | 34 +- .../aws-sdk-go-v2/service/sts/types/errors.go | 26 +- .../aws-sdk-go-v2/service/sts/types/types.go | 50 +- vendor/github.com/aws/smithy-go/CHANGELOG.md | 12 + vendor/github.com/aws/smithy-go/README.md | 74 +- .../aws/smithy-go/go_module_metadata.go | 2 +- .../jmespath/go-jmespath/.gitignore | 4 - .../jmespath/go-jmespath/.travis.yml | 28 - .../github.com/jmespath/go-jmespath/LICENSE | 13 - .../github.com/jmespath/go-jmespath/Makefile | 51 - .../github.com/jmespath/go-jmespath/README.md | 87 -- vendor/github.com/jmespath/go-jmespath/api.go | 49 - .../go-jmespath/astnodetype_string.go | 16 - .../jmespath/go-jmespath/functions.go | 842 ------------ .../jmespath/go-jmespath/interpreter.go | 418 ------ .../github.com/jmespath/go-jmespath/lexer.go | 420 ------ .../github.com/jmespath/go-jmespath/parser.go | 603 --------- .../jmespath/go-jmespath/toktype_string.go | 16 - .../github.com/jmespath/go-jmespath/util.go | 185 --- vendor/modules.txt | 70 +- 470 files changed, 18205 insertions(+), 13229 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/path_value.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go delete mode 100644 vendor/github.com/jmespath/go-jmespath/.gitignore delete mode 100644 vendor/github.com/jmespath/go-jmespath/.travis.yml delete mode 100644 vendor/github.com/jmespath/go-jmespath/LICENSE delete mode 100644 vendor/github.com/jmespath/go-jmespath/Makefile delete mode 100644 vendor/github.com/jmespath/go-jmespath/README.md delete mode 100644 vendor/github.com/jmespath/go-jmespath/api.go delete mode 100644 vendor/github.com/jmespath/go-jmespath/astnodetype_string.go delete mode 100644 vendor/github.com/jmespath/go-jmespath/functions.go delete mode 100644 vendor/github.com/jmespath/go-jmespath/interpreter.go delete mode 100644 vendor/github.com/jmespath/go-jmespath/lexer.go delete mode 100644 vendor/github.com/jmespath/go-jmespath/parser.go delete mode 100644 vendor/github.com/jmespath/go-jmespath/toktype_string.go delete mode 100644 vendor/github.com/jmespath/go-jmespath/util.go diff --git a/.golangci.yml b/.golangci.yml index 4f91ccf3..4ab47e29 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -70,9 +70,7 @@ linters: - bodyclose # checks whether HTTP response body is closed successfully - durationcheck # check for two durations multiplied together - errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13. - - execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds - exhaustive # check exhaustiveness of enum switch statements - - exportloopref # checks for pointers to enclosing loop variables - forbidigo # Forbids identifiers - gochecknoinits # Checks that no init functions are present in Go code - goconst # Finds repeated strings that could be replaced by a constant diff --git a/go.mod b/go.mod index b92b3793..2f2c2870 100644 --- a/go.mod +++ b/go.mod @@ -3,15 +3,15 @@ module github.com/conductorone/baton-aws go 1.21 require ( - github.com/aws/aws-sdk-go-v2 v1.27.0 - github.com/aws/aws-sdk-go-v2/config v1.27.11 - github.com/aws/aws-sdk-go-v2/credentials v1.17.11 - github.com/aws/aws-sdk-go-v2/service/iam v1.27.3 - github.com/aws/aws-sdk-go-v2/service/identitystore v1.20.3 - github.com/aws/aws-sdk-go-v2/service/organizations v1.22.3 - github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.22.1 - github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 - github.com/aws/smithy-go v1.20.2 + github.com/aws/aws-sdk-go-v2 v1.30.4 + github.com/aws/aws-sdk-go-v2/config v1.27.31 + github.com/aws/aws-sdk-go-v2/credentials v1.17.30 + github.com/aws/aws-sdk-go-v2/service/iam v1.35.0 + github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4 + github.com/aws/aws-sdk-go-v2/service/organizations v1.31.0 + github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.27.5 + github.com/aws/aws-sdk-go-v2/service/sts v1.30.5 + github.com/aws/smithy-go v1.20.4 github.com/conductorone/baton-sdk v0.1.35 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/spf13/cobra v1.8.0 @@ -23,19 +23,19 @@ require ( filippo.io/age v1.1.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.12 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.16 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.18 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.22.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.5 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/doug-martin/goqu/v9 v9.19.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect diff --git a/go.sum b/go.sum index 66a424c5..9a57ba05 100644 --- a/go.sum +++ b/go.sum @@ -8,50 +8,84 @@ github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20O github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/aws/aws-sdk-go-v2 v1.27.0 h1:7bZWKoXhzI+mMR/HjdMx8ZCC5+6fY0lS5tr0bbgiLlo= github.com/aws/aws-sdk-go-v2 v1.27.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2 v1.30.4 h1:frhcagrVNrzmT95RJImMHgabt99vkXGslubDaDagTk8= +github.com/aws/aws-sdk-go-v2 v1.30.4/go.mod h1:CT+ZPWXbYrci8chcARI3OmI/qgd+f6WtuLOoaIA8PR0= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= +github.com/aws/aws-sdk-go-v2/config v1.27.31 h1:kxBoRsjhT3pq0cKthgj6RU6bXTm/2SgdoUMyrVw0rAI= +github.com/aws/aws-sdk-go-v2/config v1.27.31/go.mod h1:z04nZdSWFPaDwK3DdJOG2r+scLQzMYuJeW0CujEm9FM= github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= +github.com/aws/aws-sdk-go-v2/credentials v1.17.30 h1:aau/oYFtibVovr2rDt8FHlU17BTicFEMAi29V1U+L5Q= +github.com/aws/aws-sdk-go-v2/credentials v1.17.30/go.mod h1:BPJ/yXV92ZVq6G8uYvbU0gSl8q94UB63nMT5ctNO38g= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.12 h1:yjwoSyDZF8Jth+mUk5lSPJCkMC0lMy6FaCD51jm6ayE= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.12/go.mod h1:fuR57fAgMk7ot3WcNQfb6rSEn+SUffl7ri+aa8uKysI= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 h1:7Zwtt/lP3KNRkeZre7soMELMGNoBrutx8nobg1jKWmo= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15/go.mod h1:436h2adoHb57yd+8W+gYPrrA9U/R/SuAuOO42Ushzhw= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16 h1:TNyt/+X43KJ9IJJMjKfa3bNTiZbUP7DeCxfbTROESwY= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16/go.mod h1:2DwJF39FlNAUiX5pAc0UNeiz16lK2t7IaFcm0LFHEgc= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.16 h1:jYfy8UPmd+6kJW5YhY0L1/KftReOGxI/4NtVSTh9O/I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.16/go.mod h1:7ZfEPZxkW42Afq4uQB8H2E2e6ebh6mXTueEpYzjCzcs= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 h1:81KE7vaZzrl7yHBYHVEzYB8sypz11NMOZ40YlWvPxsU= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5/go.mod h1:LIt2rg7Mcgn09Ygbdh/RdIm0rQ+3BNkbP1gyVMFtRK0= github.com/aws/aws-sdk-go-v2/service/iam v1.27.3 h1:rHgJTYLKwLcZ9/k8CVWJuhdApnb3cdjoQeLvKa6bAcU= github.com/aws/aws-sdk-go-v2/service/iam v1.27.3/go.mod h1:LklzfZoa7bL/NdhOzoaRtqSLGhu5j+GqE/9WoOQGFKY= +github.com/aws/aws-sdk-go-v2/service/iam v1.35.0 h1:xIjTizH74aMNQBjp9D5cvjRZmOYtnrpjOGU3xkVqrjk= +github.com/aws/aws-sdk-go-v2/service/iam v1.35.0/go.mod h1:IdHqqRLKgxYR4IY7Omd7SuV4SJzJ8seF+U5PW+mvtP4= github.com/aws/aws-sdk-go-v2/service/identitystore v1.20.3 h1:aDlvcjQNHE7xzdn3g9vcMr/0+IzjjYjKEqj4ua2tIBc= github.com/aws/aws-sdk-go-v2/service/identitystore v1.20.3/go.mod h1:aN6ZOx4l7hRGw2YecqbRluRI9QvX8EoaKrcnKI+guUA= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4 h1:icyZwij1BqzyW5yZGcfHIftrPogK9LgiWt08B1IYyWQ= +github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4/go.mod h1:NPEyhoIDtRHby3oWpLFUdGrfbMwM8f/4u57VdtRdH8g= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 h1:KypMCbLPPHEmf9DgMGw51jMj77VfGPAN2Kv4cfhlfgI= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4/go.mod h1:Vz1JQXliGcQktFTN/LN6uGppAIRoLBR2bMvIMP0gOjc= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 h1:ZMeFZ5yk+Ek+jNr1+uwCd2tG89t6oTS5yVWpa6yy2es= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7/go.mod h1:mxV05U+4JiHqIpGqqYXOHLPKUC6bDXC44bsUhNjOEwY= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.18 h1:tJ5RnkHCiSH0jyd6gROjlJtNwov0eGYNz8s8nFcR0jQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.18/go.mod h1:++NHzT+nAF7ZPrHPsA+ENvsXkOO8wEu+C6RXltAG4/c= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 h1:f9RyWNtS8oH7cZlbn+/JNPpjUk5+5fLd5lM9M0i49Ys= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5/go.mod h1:h5CoMZV2VF297/VLhRhO1WF+XYWOzXo+4HsObA4HjBQ= github.com/aws/aws-sdk-go-v2/service/organizations v1.22.3 h1:zj1S6vp/hnMhGwgYD0zYE7B45LhO3yMmgO454ebPVQk= github.com/aws/aws-sdk-go-v2/service/organizations v1.22.3/go.mod h1:GozkJwbkwM8sSeiuqNdKZ0pSVSIwybwGq4s4AbtUHX8= +github.com/aws/aws-sdk-go-v2/service/organizations v1.31.0 h1:D+q5pWmlcuqISBcLIeeYFukvl33JgQr/1lfbQnrIvVk= +github.com/aws/aws-sdk-go-v2/service/organizations v1.31.0/go.mod h1:qdJX3WZbuAan5dXCoinnJjuY1QERCpv3glXeI3+wbeA= github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 h1:6cnno47Me9bRykw9AEv9zkXE+5or7jz8TsskTTccbgc= github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1/go.mod h1:qmdkIIAC+GCLASF7R2whgNrJADz0QZPX+Seiw/i4S3o= github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.5 h1:zCsFCKvbj25i7p1u94imVoO447I/sFv8qq+lGJhRN0c= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.5/go.mod h1:ZeDX1SnKsVlejeuz41GiajjZpRSWR7/42q/EyA/QEiM= github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.22.1 h1:Jm0VyOPN0Y/+elug9oOA416XXKgz+KQb0F0Whg8OvtY= github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.22.1/go.mod h1:nBzNqrDtLfZJphQHUpoGr1zw7PPff5aY+hD+UOAKLc0= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.27.5 h1:E1FPa9xEDKEMcKsRrZ/wuonFwrtVJ2ZyDS+nVFliZPg= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.27.5/go.mod h1:vts2iEAgM9gsyWx5c1z6db/Kw5WBKKoZBb65JfW3YR8= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.5 h1:SKvPgvdvmiTWoi0GAJ7AsJfOz3ngVkD/ERbs5pUnHNI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.5/go.mod h1:20sz31hv/WsPa3HhU3hfrIet2kxM4Pe0r20eBZ20Tac= github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.5 h1:OMsEmCyz2i89XwRwPouAJvhj81wINh+4UK+k/0Yo/q8= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.5/go.mod h1:vmSqFK+BVIwVpDAGZB3CoCXHzurt4qBE8lf+I/kRTh0= github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4= +github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= diff --git a/pkg/connector/sso_group.go b/pkg/connector/sso_group.go index 7ef5c4fd..dda82b46 100644 --- a/pkg/connector/sso_group.go +++ b/pkg/connector/sso_group.go @@ -4,7 +4,6 @@ import ( "context" "errors" "fmt" - "strings" awsSdk "github.com/aws/aws-sdk-go-v2/aws" awsIdentityStore "github.com/aws/aws-sdk-go-v2/service/identitystore" @@ -95,13 +94,22 @@ func (o *ssoGroupResourceType) Entitlements(_ context.Context, resource *v2.Reso return []*v2.Entitlement{member}, "", nil, nil } -func createUserSSOGroupMembershipGrant(region string, identityStoreID string, memberID string, membershipID *string, groupResource *v2.Resource) (*v2.Grant, error) { +func createUserSSOGroupMembershipGrant( + region string, + identityStoreID string, + memberID string, + membershipID *string, + groupResource *v2.Resource, +) (*v2.Grant, error) { userARN := ssoUserToARN(region, identityStoreID, memberID) uID, err := resourceSdk.NewResourceID(resourceTypeSSOUser, userARN) if err != nil { return nil, err } - grant := grantSdk.NewGrant(groupResource, groupMemberEntitlement, uID, + grant := grantSdk.NewGrant( + groupResource, + groupMemberEntitlement, + uID, grantSdk.WithAnnotation( &v2.V1Identifier{ Id: V1GrantID(V1MembershipEntitlementID(groupResource.Id), userARN), @@ -223,10 +231,10 @@ func (g *ssoGroupResourceType) createOrGetMembership( ResultMetadata: createdMembership.ResultMetadata, }, nil, nil } - if !strings.Contains( - err.Error(), - "ConflictException: Member and Group relationship already exists", - ) { + + // Forward along the error if it is an unknown type. + var conflictException *awsIdentityStoreTypes.ConflictException + if !errors.As(err, &conflictException) { return nil, nil, err } @@ -241,10 +249,8 @@ func (g *ssoGroupResourceType) createOrGetMembership( if err != nil { // If we lack permission for the `GetGroupMembershipId` operation, fail // more gracefully by returning nil. - if strings.Contains( - err.Error(), - "is not authorized to perform: identitystore:GetGroupMembershipId", - ) { + var accessDeniedException *awsIdentityStoreTypes.AccessDeniedException + if errors.As(err, &accessDeniedException) { logger.Info("Not authorized to perform `GetGroupMembershipId`, falling back to empty membership") // TODO(marcos): Create an annotation that marks this grant as "already exists". return nil, nil, nil @@ -258,7 +264,15 @@ func (g *ssoGroupResourceType) createOrGetMembership( }, nil, nil } -func (g *ssoGroupResourceType) Grant(ctx context.Context, principal *v2.Resource, entitlement *v2.Entitlement) ([]*v2.Grant, annotations.Annotations, error) { +func (g *ssoGroupResourceType) Grant( + ctx context.Context, + principal *v2.Resource, + entitlement *v2.Entitlement, +) ( + []*v2.Grant, + annotations.Annotations, + error, +) { if principal.Id.ResourceType != resourceTypeSSOUser.Id { return nil, nil, errors.New("baton-aws: only sso users can be added to a sso group") } @@ -319,10 +333,13 @@ func (g *ssoGroupResourceType) Revoke(ctx context.Context, grant *v2.Grant) (ann zap.String("identity_store_id", awsSdk.ToString(g.identityInstance.IdentityStoreId)), ) - resp, err := g.identityStoreClient.DeleteGroupMembership(ctx, &awsIdentityStore.DeleteGroupMembershipInput{ - IdentityStoreId: g.identityInstance.IdentityStoreId, - MembershipId: awsSdk.String(grant.Id), - }) + resp, err := g.identityStoreClient.DeleteGroupMembership( + ctx, + &awsIdentityStore.DeleteGroupMembershipInput{ + IdentityStoreId: g.identityInstance.IdentityStoreId, + MembershipId: awsSdk.String(grant.Id), + }, + ) if err != nil { l.Error("aws-connector: Failed to delete group membership", zap.Error(err)) return nil, fmt.Errorf("baton-aws: error removing sso user from sso group: %w", err) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go new file mode 100644 index 00000000..6504a218 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go @@ -0,0 +1,18 @@ +package aws + +// AccountIDEndpointMode controls how a resolved AWS account ID is handled for endpoint routing. +type AccountIDEndpointMode string + +const ( + // AccountIDEndpointModeUnset indicates the AWS account ID will not be used for endpoint routing + AccountIDEndpointModeUnset AccountIDEndpointMode = "" + + // AccountIDEndpointModePreferred indicates the AWS account ID will be used for endpoint routing if present + AccountIDEndpointModePreferred = "preferred" + + // AccountIDEndpointModeRequired indicates an error will be returned if the AWS account ID is not resolved from identity + AccountIDEndpointModeRequired = "required" + + // AccountIDEndpointModeDisabled indicates the AWS account ID will be ignored during endpoint routing + AccountIDEndpointModeDisabled = "disabled" +) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go index 2264200c..16000d79 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go @@ -162,6 +162,9 @@ type Config struct { // This variable is sourced from environment variable AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES or // the shared config profile attribute request_min_compression_size_bytes RequestMinCompressSizeBytes int64 + + // Controls how a resolved AWS account ID is handled for endpoint routing. + AccountIDEndpointMode AccountIDEndpointMode } // NewConfig returns a new Config pointer that can be chained with builder diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go index 714d4ad8..98ba7705 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go @@ -90,6 +90,9 @@ type Credentials struct { // The time the credentials will expire at. Should be ignored if CanExpire // is false. Expires time.Time + + // The ID of the account for the credentials. + AccountID string } // Expired returns if the credentials have expired. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go index aa10a9b4..99edbf3e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go @@ -70,6 +70,10 @@ func GetUseFIPSEndpoint(options ...interface{}) (value FIPSEndpointState, found // The SDK will automatically resolve these endpoints per API client using an // internal endpoint resolvers. If you'd like to provide custom endpoint // resolving behavior you can implement the EndpointResolver interface. +// +// Deprecated: This structure was used with the global [EndpointResolver] +// interface, which has been deprecated in favor of service-specific endpoint +// resolution. See the deprecation docs on that interface for more information. type Endpoint struct { // The base URL endpoint the SDK API clients will use to make API calls to. // The SDK will suffix URI path and query elements to this endpoint. @@ -124,6 +128,8 @@ type Endpoint struct { } // EndpointSource is the endpoint source type. +// +// Deprecated: The global [Endpoint] structure is deprecated. type EndpointSource int const ( @@ -161,19 +167,25 @@ func (e *EndpointNotFoundError) Unwrap() error { // API clients will fallback to attempting to resolve the endpoint using its // internal default endpoint resolver. // -// Deprecated: See EndpointResolverWithOptions +// Deprecated: The global endpoint resolution interface is deprecated. The API +// for endpoint resolution is now unique to each service and is set via the +// EndpointResolverV2 field on service client options. Setting a value for +// EndpointResolver on aws.Config or service client options will prevent you +// from using any endpoint-related service features released after the +// introduction of EndpointResolverV2. You may also encounter broken or +// unexpected behavior when using the old global interface with services that +// use many endpoint-related customizations such as S3. type EndpointResolver interface { ResolveEndpoint(service, region string) (Endpoint, error) } // EndpointResolverFunc wraps a function to satisfy the EndpointResolver interface. // -// Deprecated: See EndpointResolverWithOptionsFunc +// Deprecated: The global endpoint resolution interface is deprecated. See +// deprecation docs on [EndpointResolver]. type EndpointResolverFunc func(service, region string) (Endpoint, error) // ResolveEndpoint calls the wrapped function and returns the results. -// -// Deprecated: See EndpointResolverWithOptions.ResolveEndpoint func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint, error) { return e(service, region) } @@ -184,11 +196,17 @@ func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint, // available. If the EndpointResolverWithOptions returns an EndpointNotFoundError error, // API clients will fallback to attempting to resolve the endpoint using its // internal default endpoint resolver. +// +// Deprecated: The global endpoint resolution interface is deprecated. See +// deprecation docs on [EndpointResolver]. type EndpointResolverWithOptions interface { ResolveEndpoint(service, region string, options ...interface{}) (Endpoint, error) } // EndpointResolverWithOptionsFunc wraps a function to satisfy the EndpointResolverWithOptions interface. +// +// Deprecated: The global endpoint resolution interface is deprecated. See +// deprecation docs on [EndpointResolver]. type EndpointResolverWithOptionsFunc func(service, region string, options ...interface{}) (Endpoint, error) // ResolveEndpoint calls the wrapped function and returns the results. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index e648346b..51dfc436 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.27.0" +const goModuleVersion = "1.30.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go index db7cda42..ff0bc921 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "runtime" + "sort" "strings" "github.com/aws/aws-sdk-go-v2/aws" @@ -30,6 +31,7 @@ const ( FrameworkMetadata AdditionalMetadata ApplicationIdentifier + FeatureMetadata2 ) func (k SDKAgentKeyType) string() string { @@ -50,6 +52,8 @@ func (k SDKAgentKeyType) string() string { return "lib" case ApplicationIdentifier: return "app" + case FeatureMetadata2: + return "m" case AdditionalMetadata: fallthrough default: @@ -64,9 +68,29 @@ var validChars = map[rune]bool{ '-': true, '.': true, '^': true, '_': true, '`': true, '|': true, '~': true, } +// UserAgentFeature enumerates tracked SDK features. +type UserAgentFeature string + +// Enumerates UserAgentFeature. +const ( + UserAgentFeatureResourceModel UserAgentFeature = "A" // n/a (we don't generate separate resource types) + UserAgentFeatureWaiter = "B" + UserAgentFeaturePaginator = "C" + UserAgentFeatureRetryModeLegacy = "D" // n/a (equivalent to standard) + UserAgentFeatureRetryModeStandard = "E" + UserAgentFeatureRetryModeAdaptive = "F" + UserAgentFeatureS3Transfer = "G" + UserAgentFeatureS3CryptoV1N = "H" // n/a (crypto client is external) + UserAgentFeatureS3CryptoV2 = "I" // n/a + UserAgentFeatureS3ExpressBucket = "J" + UserAgentFeatureS3AccessGrants = "K" // not yet implemented + UserAgentFeatureGZIPRequestCompression = "L" +) + // RequestUserAgent is a build middleware that set the User-Agent for the request. type RequestUserAgent struct { sdkAgent, userAgent *smithyhttp.UserAgentBuilder + features map[UserAgentFeature]struct{} } // NewRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the @@ -87,6 +111,7 @@ func NewRequestUserAgent() *RequestUserAgent { r := &RequestUserAgent{ sdkAgent: sdkAgent, userAgent: userAgent, + features: map[UserAgentFeature]struct{}{}, } addSDKMetadata(r) @@ -191,6 +216,12 @@ func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string) { u.userAgent.AddKeyValue(strings.Map(rules, key), strings.Map(rules, value)) } +// AddUserAgentFeature adds the feature ID to the tracking list to be emitted +// in the final User-Agent string. +func (u *RequestUserAgent) AddUserAgentFeature(feature UserAgentFeature) { + u.features[feature] = struct{}{} +} + // AddSDKAgentKey adds the component identified by name to the User-Agent string. func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) { // TODO: should target sdkAgent @@ -227,6 +258,9 @@ func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildI func (u *RequestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) { const userAgent = "User-Agent" updateHTTPHeader(request, userAgent, u.userAgent.Build()) + if len(u.features) > 0 { + updateHTTPHeader(request, userAgent, buildFeatureMetrics(u.features)) + } } func (u *RequestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) { @@ -259,3 +293,13 @@ func rules(r rune) rune { return '-' } } + +func buildFeatureMetrics(features map[UserAgentFeature]struct{}) string { + fs := make([]string, 0, len(features)) + for f := range features { + fs = append(fs, string(f)) + } + + sort.Strings(fs) + return fmt.Sprintf("%s/%s", FeatureMetadata2.string(), strings.Join(fs, ",")) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go index dc703d48..b645fbdf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go @@ -2,12 +2,15 @@ package retry import ( "context" + "errors" "fmt" - "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" "strconv" "strings" "time" + "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" + internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" + "github.com/aws/aws-sdk-go-v2/aws" awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/internal/sdk" @@ -39,6 +42,10 @@ type Attempt struct { requestCloner RequestCloner } +// define the threshold at which we will consider certain kind of errors to be probably +// caused by clock skew +const skewThreshold = 4 * time.Minute + // NewAttemptMiddleware returns a new Attempt retry middleware. func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optFns ...func(*Attempt)) *Attempt { m := &Attempt{ @@ -86,6 +93,9 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn AttemptClockSkew: attemptClockSkew, }) + // Setting clock skew to be used on other context (like signing) + ctx = internalcontext.SetAttemptSkewContext(ctx, attemptClockSkew) + var attemptResult AttemptResult out, attemptResult, releaseRetryToken, err = r.handleAttempt(attemptCtx, attemptInput, releaseRetryToken, next) attemptClockSkew, _ = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata) @@ -185,6 +195,8 @@ func (r *Attempt) handleAttempt( return out, attemptResult, nopRelease, err } + err = wrapAsClockSkew(ctx, err) + //------------------------------ // Is Retryable and Should Retry //------------------------------ @@ -247,6 +259,37 @@ func (r *Attempt) handleAttempt( return out, attemptResult, releaseRetryToken, err } +// errors that, if detected when we know there's a clock skew, +// can be retried and have a high chance of success +var possibleSkewCodes = map[string]struct{}{ + "InvalidSignatureException": {}, + "SignatureDoesNotMatch": {}, + "AuthFailure": {}, +} + +var definiteSkewCodes = map[string]struct{}{ + "RequestExpired": {}, + "RequestInTheFuture": {}, + "RequestTimeTooSkewed": {}, +} + +// wrapAsClockSkew checks if this error could be related to a clock skew +// error and if so, wrap the error. +func wrapAsClockSkew(ctx context.Context, err error) error { + var v interface{ ErrorCode() string } + if !errors.As(err, &v) { + return err + } + if _, ok := definiteSkewCodes[v.ErrorCode()]; ok { + return &retryableClockSkewError{Err: err} + } + _, isPossibleSkewCode := possibleSkewCodes[v.ErrorCode()] + if skew := internalcontext.GetAttemptSkewContext(ctx); skew > skewThreshold && isPossibleSkewCode { + return &retryableClockSkewError{Err: err} + } + return err +} + // MetricsHeader attaches SDK request metric header for retries to the transport type MetricsHeader struct{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go index 987affdd..acd8d1cc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go @@ -2,6 +2,7 @@ package retry import ( "errors" + "fmt" "net" "net/url" "strings" @@ -199,3 +200,23 @@ func (r RetryableErrorCode) IsErrorRetryable(err error) aws.Ternary { return aws.TrueTernary } + +// retryableClockSkewError marks errors that can be caused by clock skew +// (difference between server time and client time). +// This is returned when there's certain confidence that adjusting the client time +// could allow a retry to succeed +type retryableClockSkewError struct{ Err error } + +func (e *retryableClockSkewError) Error() string { + return fmt.Sprintf("Probable clock skew error: %v", e.Err) +} + +// Unwrap returns the wrapped error. +func (e *retryableClockSkewError) Unwrap() error { + return e.Err +} + +// RetryableError allows the retryer to retry this request +func (e *retryableClockSkewError) RetryableError() bool { + return true +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go index ca738f23..71b1a352 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go @@ -38,7 +38,6 @@ var RequiredSignedHeaders = Rules{ "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, - "X-Amz-Expected-Bucket-Owner": struct{}{}, "X-Amz-Grant-Full-control": struct{}{}, "X-Amz-Grant-Read": struct{}{}, "X-Amz-Grant-Read-Acp": struct{}{}, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go index 55dfd07b..dcd896a9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go @@ -395,6 +395,12 @@ func buildQuery(r v4Internal.Rule, header http.Header) (url.Values, http.Header) query := url.Values{} unsignedHeaders := http.Header{} for k, h := range header { + // literally just this header has this constraint for some stupid reason, + // see #2508 + if k == "X-Amz-Expected-Bucket-Owner" { + k = "x-amz-expected-bucket-owner" + } + if r.IsValid(k) { query[k] = h } else { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index 87ea591a..724ccbd2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,85 @@ +# v1.27.31 (2024-08-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.30 (2024-08-23) + +* **Bug Fix**: Don't fail credentials unit tests if credentials are found on a file + +# v1.27.29 (2024-08-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.28 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.27 (2024-07-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.26 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.25 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.24 (2024-07-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.23 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.22 (2024-06-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.21 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.20 (2024-06-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.19 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.18 (2024-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.17 (2024-06-03) + +* **Documentation**: Add deprecation docs to global endpoint resolution interfaces. These APIs were previously deprecated with the introduction of service-specific endpoint resolution (EndpointResolverV2 and BaseEndpoint on service client options). +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.16 (2024-05-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.15 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.14 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.13 (2024-05-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.12 (2024-05-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.27.11 (2024-04-05) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go index 50582d89..d5226cb0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go @@ -80,6 +80,9 @@ var defaultAWSConfigResolvers = []awsConfigResolver{ // Sets the RequestMinCompressSizeBytes if present in env var or shared config profile resolveRequestMinCompressSizeBytes, + + // Sets the AccountIDEndpointMode if present in env var or shared config profile + resolveAccountIDEndpointMode, } // A Config represents a generic configuration value or set of values. This type diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go index 88550198..3a06f141 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go @@ -80,6 +80,9 @@ const ( awsRequestMinCompressionSizeBytes = "AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES" awsS3DisableExpressSessionAuthEnv = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH" + + awsAccountIDEnv = "AWS_ACCOUNT_ID" + awsAccountIDEndpointModeEnv = "AWS_ACCOUNT_ID_ENDPOINT_MODE" ) var ( @@ -290,6 +293,9 @@ type EnvConfig struct { // will only bypass the modified endpoint routing and signing behaviors // associated with the feature. S3DisableExpressAuth *bool + + // Indicates whether account ID will be required/ignored in endpoint2.0 routing + AccountIDEndpointMode aws.AccountIDEndpointMode } // loadEnvConfig reads configuration values from the OS's environment variables. @@ -309,6 +315,7 @@ func NewEnvConfig() (EnvConfig, error) { setStringFromEnvVal(&creds.AccessKeyID, credAccessEnvKeys) setStringFromEnvVal(&creds.SecretAccessKey, credSecretEnvKeys) if creds.HasKeys() { + creds.AccountID = os.Getenv(awsAccountIDEnv) creds.SessionToken = os.Getenv(awsSessionTokenEnvVar) cfg.Credentials = creds } @@ -389,6 +396,10 @@ func NewEnvConfig() (EnvConfig, error) { return cfg, err } + if err := setAIDEndPointModeFromEnvVal(&cfg.AccountIDEndpointMode, []string{awsAccountIDEndpointModeEnv}); err != nil { + return cfg, err + } + return cfg, nil } @@ -417,6 +428,10 @@ func (c EnvConfig) getRequestMinCompressSizeBytes(context.Context) (int64, bool, return *c.RequestMinCompressSizeBytes, true, nil } +func (c EnvConfig) getAccountIDEndpointMode(context.Context) (aws.AccountIDEndpointMode, bool, error) { + return c.AccountIDEndpointMode, len(c.AccountIDEndpointMode) > 0, nil +} + // GetRetryMaxAttempts returns the value of AWS_MAX_ATTEMPTS if was specified, // and not 0. func (c EnvConfig) GetRetryMaxAttempts(ctx context.Context) (int, bool, error) { @@ -491,6 +506,28 @@ func setEC2IMDSEndpointMode(mode *imds.EndpointModeState, keys []string) error { return nil } +func setAIDEndPointModeFromEnvVal(m *aws.AccountIDEndpointMode, keys []string) error { + for _, k := range keys { + value := os.Getenv(k) + if len(value) == 0 { + continue + } + + switch value { + case "preferred": + *m = aws.AccountIDEndpointModePreferred + case "required": + *m = aws.AccountIDEndpointModeRequired + case "disabled": + *m = aws.AccountIDEndpointModeDisabled + default: + return fmt.Errorf("invalid value for environment variable, %s=%s, must be preferred/required/disabled", k, value) + } + break + } + return nil +} + // GetRegion returns the AWS Region if set in the environment. Returns an empty // string if not set. func (c EnvConfig) getRegion(ctx context.Context) (string, bool, error) { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index 46566e90..4e2fd87f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.27.11" +const goModuleVersion = "1.27.31" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go index 06596c1b..5f643977 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go @@ -215,6 +215,8 @@ type LoadOptions struct { // Whether S3 Express auth is disabled. S3DisableExpressAuth *bool + + AccountIDEndpointMode aws.AccountIDEndpointMode } func (o LoadOptions) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool, error) { @@ -278,6 +280,10 @@ func (o LoadOptions) getRequestMinCompressSizeBytes(ctx context.Context) (int64, return *o.RequestMinCompressSizeBytes, true, nil } +func (o LoadOptions) getAccountIDEndpointMode(ctx context.Context) (aws.AccountIDEndpointMode, bool, error) { + return o.AccountIDEndpointMode, len(o.AccountIDEndpointMode) > 0, nil +} + // WithRegion is a helper function to construct functional options // that sets Region on config's LoadOptions. Setting the region to // an empty string, will result in the region value being ignored. @@ -323,6 +329,17 @@ func WithRequestMinCompressSizeBytes(RequestMinCompressSizeBytes *int64) LoadOpt } } +// WithAccountIDEndpointMode is a helper function to construct functional options +// that sets AccountIDEndpointMode on config's LoadOptions +func WithAccountIDEndpointMode(m aws.AccountIDEndpointMode) LoadOptionsFunc { + return func(o *LoadOptions) error { + if m != "" { + o.AccountIDEndpointMode = m + } + return nil + } +} + // getDefaultRegion returns DefaultRegion from config's LoadOptions func (o LoadOptions) getDefaultRegion(ctx context.Context) (string, bool, error) { if len(o.DefaultRegion) == 0 { @@ -824,7 +841,14 @@ func (o LoadOptions) getEndpointResolver(ctx context.Context) (aws.EndpointResol // the EndpointResolver value is ignored. If multiple WithEndpointResolver calls // are made, the last call overrides the previous call values. // -// Deprecated: See WithEndpointResolverWithOptions +// Deprecated: The global endpoint resolution interface is deprecated. The API +// for endpoint resolution is now unique to each service and is set via the +// EndpointResolverV2 field on service client options. Use of +// WithEndpointResolver or WithEndpointResolverWithOptions will prevent you +// from using any endpoint-related service features released after the +// introduction of EndpointResolverV2. You may also encounter broken or +// unexpected behavior when using the old global interface with services that +// use many endpoint-related customizations such as S3. func WithEndpointResolver(v aws.EndpointResolver) LoadOptionsFunc { return func(o *LoadOptions) error { o.EndpointResolver = v @@ -844,6 +868,9 @@ func (o LoadOptions) getEndpointResolverWithOptions(ctx context.Context) (aws.En // that sets the EndpointResolverWithOptions on LoadOptions. If the EndpointResolverWithOptions is set to nil, // the EndpointResolver value is ignored. If multiple WithEndpointResolver calls // are made, the last call overrides the previous call values. +// +// Deprecated: The global endpoint resolution interface is deprecated. See +// deprecation docs on [WithEndpointResolver]. func WithEndpointResolverWithOptions(v aws.EndpointResolverWithOptions) LoadOptionsFunc { return func(o *LoadOptions) error { o.EndpointResolverWithOptions = v diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go index 13745fc9..043781f1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go @@ -225,6 +225,23 @@ func getRequestMinCompressSizeBytes(ctx context.Context, configs configs) (value return } +// accountIDEndpointModeProvider provides access to the AccountIDEndpointMode +type accountIDEndpointModeProvider interface { + getAccountIDEndpointMode(context.Context) (aws.AccountIDEndpointMode, bool, error) +} + +func getAccountIDEndpointMode(ctx context.Context, configs configs) (value aws.AccountIDEndpointMode, found bool, err error) { + for _, cfg := range configs { + if p, ok := cfg.(accountIDEndpointModeProvider); ok { + value, found, err = p.getAccountIDEndpointMode(ctx) + if err != nil || found { + break + } + } + } + return +} + // ec2IMDSRegionProvider provides access to the ec2 imds region // configuration value type ec2IMDSRegionProvider interface { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go index fde2e398..41009c7d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go @@ -166,6 +166,22 @@ func resolveRequestMinCompressSizeBytes(ctx context.Context, cfg *aws.Config, co return nil } +// resolveAccountIDEndpointMode extracts the AccountIDEndpointMode from the configs slice's +// SharedConfig or EnvConfig +func resolveAccountIDEndpointMode(ctx context.Context, cfg *aws.Config, configs configs) error { + m, found, err := getAccountIDEndpointMode(ctx, configs) + if err != nil { + return err + } + + if !found { + m = aws.AccountIDEndpointModePreferred + } + + cfg.AccountIDEndpointMode = m + return nil +} + // resolveDefaultRegion extracts the first instance of a default region and sets `aws.Config.Region` to the default // region if region had not been resolved from other sources. func resolveDefaultRegion(ctx context.Context, cfg *aws.Config, configs configs) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go index c546cb7d..d7a2b530 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go @@ -115,6 +115,9 @@ const ( requestMinCompressionSizeBytes = "request_min_compression_size_bytes" s3DisableExpressSessionAuthKey = "s3_disable_express_session_auth" + + accountIDKey = "aws_account_id" + accountIDEndpointMode = "account_id_endpoint_mode" ) // defaultSharedConfigProfile allows for swapping the default profile for testing @@ -341,6 +344,8 @@ type SharedConfig struct { // will only bypass the modified endpoint routing and signing behaviors // associated with the feature. S3DisableExpressAuth *bool + + AccountIDEndpointMode aws.AccountIDEndpointMode } func (c SharedConfig) getDefaultsMode(ctx context.Context) (value aws.DefaultsMode, ok bool, err error) { @@ -1124,12 +1129,17 @@ func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) er return fmt.Errorf("failed to load %s from shared config, %w", requestMinCompressionSizeBytes, err) } + if err := updateAIDEndpointMode(&c.AccountIDEndpointMode, section, accountIDEndpointMode); err != nil { + return fmt.Errorf("failed to load %s from shared config, %w", accountIDEndpointMode, err) + } + // Shared Credentials creds := aws.Credentials{ AccessKeyID: section.String(accessKeyIDKey), SecretAccessKey: section.String(secretAccessKey), SessionToken: section.String(sessionTokenKey), Source: fmt.Sprintf("SharedConfigCredentials: %s", section.SourceFile[accessKeyIDKey]), + AccountID: section.String(accountIDKey), } if creds.HasKeys() { @@ -1177,6 +1187,26 @@ func updateDisableRequestCompression(disable **bool, sec ini.Section, key string return nil } +func updateAIDEndpointMode(m *aws.AccountIDEndpointMode, sec ini.Section, key string) error { + if !sec.Has(key) { + return nil + } + + v := sec.String(key) + switch v { + case "preferred": + *m = aws.AccountIDEndpointModePreferred + case "required": + *m = aws.AccountIDEndpointModeRequired + case "disabled": + *m = aws.AccountIDEndpointModeDisabled + default: + return fmt.Errorf("invalid value for shared config profile field, %s=%s, must be preferred/required/disabled", key, v) + } + + return nil +} + func (c SharedConfig) getRequestMinCompressSizeBytes(ctx context.Context) (int64, bool, error) { if c.RequestMinCompressSizeBytes == nil { return 0, false, nil @@ -1191,6 +1221,10 @@ func (c SharedConfig) getDisableRequestCompression(ctx context.Context) (bool, b return *c.DisableRequestCompression, true, nil } +func (c SharedConfig) getAccountIDEndpointMode(ctx context.Context) (aws.AccountIDEndpointMode, bool, error) { + return c.AccountIDEndpointMode, len(c.AccountIDEndpointMode) > 0, nil +} + func updateDefaultsMode(mode *aws.DefaultsMode, section ini.Section, key string) error { if !section.Has(key) { return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 3b0bad42..15674be8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,80 @@ +# v1.17.30 (2024-08-26) + +* **Bug Fix**: Save SSO cached token expiry in UTC to ensure cross-SDK compatibility. + +# v1.17.29 (2024-08-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.28 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.27 (2024-07-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.26 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.25 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.24 (2024-07-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.23 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.22 (2024-06-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.21 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.20 (2024-06-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.19 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.18 (2024-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.17 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.16 (2024-05-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.15 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.14 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.13 (2024-05-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.12 (2024-05-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.17.11 (2024-04-05) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go index 9a869f89..dc291c97 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go @@ -128,6 +128,7 @@ type GetCredentialsOutput struct { AccessKeyID string SecretAccessKey string Token string + AccountID string } // EndpointError is an error returned from the endpoint service diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go index 0c3c4d68..2386153a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go @@ -152,6 +152,7 @@ func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { SecretAccessKey: resp.SecretAccessKey, SessionToken: resp.Token, Source: ProviderName, + AccountID: resp.AccountID, } if resp.Expiration != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index 4cb3e303..fbd03702 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.11" +const goModuleVersion = "1.17.30" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go index fe9345e2..911fcc32 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go @@ -167,6 +167,9 @@ type CredentialProcessResponse struct { // The date on which the current credentials expire. Expiration *time.Time + + // The ID of the account for credentials + AccountID string `json:"AccountId"` } // Retrieve executes the credential process command and returns the @@ -208,6 +211,7 @@ func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { AccessKeyID: resp.AccessKeyID, SecretAccessKey: resp.SecretAccessKey, SessionToken: resp.SessionToken, + AccountID: resp.AccountID, } // Handle expiration diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go index 3b97e6dd..46ae2f92 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go @@ -225,7 +225,7 @@ func (r *rfc3339) UnmarshalJSON(bytes []byte) (err error) { } func (r *rfc3339) MarshalJSON() ([]byte, error) { - value := time.Time(*r).Format(time.RFC3339) + value := time.Time(*r).UTC().Format(time.RFC3339) // Use JSON unmarshal to unescape the quoted value making use of JSON's // quoting rules. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go index b3cf7853..8c230be8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go @@ -129,6 +129,7 @@ func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { CanExpire: true, Expires: time.Unix(0, output.RoleCredentials.Expiration*int64(time.Millisecond)).UTC(), Source: ProviderName, + AccountID: p.options.AccountID, }, nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go index 289707b6..4c7f7993 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go @@ -308,6 +308,11 @@ func (p *AssumeRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, err return aws.Credentials{Source: ProviderName}, err } + var accountID string + if resp.AssumedRoleUser != nil { + accountID = getAccountID(resp.AssumedRoleUser) + } + return aws.Credentials{ AccessKeyID: *resp.Credentials.AccessKeyId, SecretAccessKey: *resp.Credentials.SecretAccessKey, @@ -316,5 +321,6 @@ func (p *AssumeRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, err CanExpire: true, Expires: *resp.Credentials.Expiration, + AccountID: accountID, }, nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go index ddaf6df6..b4b71970 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go @@ -5,6 +5,7 @@ import ( "fmt" "io/ioutil" "strconv" + "strings" "time" "github.com/aws/aws-sdk-go-v2/aws" @@ -135,6 +136,11 @@ func (p *WebIdentityRoleProvider) Retrieve(ctx context.Context) (aws.Credentials return aws.Credentials{}, fmt.Errorf("failed to retrieve credentials, %w", err) } + var accountID string + if resp.AssumedRoleUser != nil { + accountID = getAccountID(resp.AssumedRoleUser) + } + // InvalidIdentityToken error is a temporary error that can occur // when assuming an Role with a JWT web identity token. @@ -145,6 +151,19 @@ func (p *WebIdentityRoleProvider) Retrieve(ctx context.Context) (aws.Credentials Source: WebIdentityProviderName, CanExpire: true, Expires: *resp.Credentials.Expiration, + AccountID: accountID, } return value, nil } + +// extract accountID from arn with format "arn:partition:service:region:account-id:[resource-section]" +func getAccountID(u *types.AssumedRoleUser) string { + if u.Arn == nil { + return "" + } + parts := strings.Split(*u.Arn, ":") + if len(parts) < 5 { + return "" + } + return parts[4] +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md index 3807833d..09d26914 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md @@ -1,3 +1,48 @@ +# v1.16.12 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.11 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.10 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.9 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.8 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.7 (2024-06-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.6 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.5 (2024-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.4 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.3 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.2 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.16.1 (2024-03-29) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go index 5642306f..e0aef028 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go @@ -3,4 +3,4 @@ package imds // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.16.1" +const goModuleVersion = "1.16.12" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go index 0c5a2d40..24db8e14 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go @@ -5,6 +5,7 @@ import ( "fmt" v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" "github.com/aws/aws-sdk-go-v2/internal/sdk" "github.com/aws/smithy-go" "github.com/aws/smithy-go/auth" @@ -39,7 +40,10 @@ func (v *V4SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request } hash := v4.GetPayloadHash(ctx) - err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, region, sdk.NowTime(), func(o *v4.SignerOptions) { + signingTime := sdk.NowTime() + skew := internalcontext.GetAttemptSkewContext(ctx) + signingTime = signingTime.Add(skew) + err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, region, signingTime, func(o *v4.SignerOptions) { o.DisableURIPathEscaping, _ = smithyhttp.GetDisableDoubleEncoding(&props) o.Logger = v.Logger diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/path_value.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/path_value.go deleted file mode 100644 index 58ef438a..00000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/path_value.go +++ /dev/null @@ -1,225 +0,0 @@ -package awsutil - -import ( - "reflect" - "regexp" - "strconv" - "strings" - - "github.com/jmespath/go-jmespath" -) - -var indexRe = regexp.MustCompile(`(.+)\[(-?\d+)?\]$`) - -// rValuesAtPath returns a slice of values found in value v. The values -// in v are explored recursively so all nested values are collected. -func rValuesAtPath(v interface{}, path string, createPath, caseSensitive, nilTerm bool) []reflect.Value { - pathparts := strings.Split(path, "||") - if len(pathparts) > 1 { - for _, pathpart := range pathparts { - vals := rValuesAtPath(v, pathpart, createPath, caseSensitive, nilTerm) - if len(vals) > 0 { - return vals - } - } - return nil - } - - values := []reflect.Value{reflect.Indirect(reflect.ValueOf(v))} - components := strings.Split(path, ".") - for len(values) > 0 && len(components) > 0 { - var index *int64 - var indexStar bool - c := strings.TrimSpace(components[0]) - if c == "" { // no actual component, illegal syntax - return nil - } else if caseSensitive && c != "*" && strings.ToLower(c[0:1]) == c[0:1] { - // TODO normalize case for user - return nil // don't support unexported fields - } - - // parse this component - if m := indexRe.FindStringSubmatch(c); m != nil { - c = m[1] - if m[2] == "" { - index = nil - indexStar = true - } else { - i, _ := strconv.ParseInt(m[2], 10, 32) - index = &i - indexStar = false - } - } - - nextvals := []reflect.Value{} - for _, value := range values { - // pull component name out of struct member - if value.Kind() != reflect.Struct { - continue - } - - if c == "*" { // pull all members - for i := 0; i < value.NumField(); i++ { - if f := reflect.Indirect(value.Field(i)); f.IsValid() { - nextvals = append(nextvals, f) - } - } - continue - } - - value = value.FieldByNameFunc(func(name string) bool { - if c == name { - return true - } else if !caseSensitive && strings.EqualFold(name, c) { - return true - } - return false - }) - - if nilTerm && value.Kind() == reflect.Ptr && len(components[1:]) == 0 { - if !value.IsNil() { - value.Set(reflect.Zero(value.Type())) - } - return []reflect.Value{value} - } - - if createPath && value.Kind() == reflect.Ptr && value.IsNil() { - // TODO if the value is the terminus it should not be created - // if the value to be set to its position is nil. - value.Set(reflect.New(value.Type().Elem())) - value = value.Elem() - } else { - value = reflect.Indirect(value) - } - - if value.Kind() == reflect.Slice || value.Kind() == reflect.Map { - if !createPath && value.IsNil() { - value = reflect.ValueOf(nil) - } - } - - if value.IsValid() { - nextvals = append(nextvals, value) - } - } - values = nextvals - - if indexStar || index != nil { - nextvals = []reflect.Value{} - for _, valItem := range values { - value := reflect.Indirect(valItem) - if value.Kind() != reflect.Slice { - continue - } - - if indexStar { // grab all indices - for i := 0; i < value.Len(); i++ { - idx := reflect.Indirect(value.Index(i)) - if idx.IsValid() { - nextvals = append(nextvals, idx) - } - } - continue - } - - // pull out index - i := int(*index) - if i >= value.Len() { // check out of bounds - if createPath { - // TODO resize slice - } else { - continue - } - } else if i < 0 { // support negative indexing - i = value.Len() + i - } - value = reflect.Indirect(value.Index(i)) - - if value.Kind() == reflect.Slice || value.Kind() == reflect.Map { - if !createPath && value.IsNil() { - value = reflect.ValueOf(nil) - } - } - - if value.IsValid() { - nextvals = append(nextvals, value) - } - } - values = nextvals - } - - components = components[1:] - } - return values -} - -// ValuesAtPath returns a list of values at the case insensitive lexical -// path inside of a structure. -func ValuesAtPath(i interface{}, path string) ([]interface{}, error) { - result, err := jmespath.Search(path, i) - if err != nil { - return nil, err - } - - v := reflect.ValueOf(result) - if !v.IsValid() || (v.Kind() == reflect.Ptr && v.IsNil()) { - return nil, nil - } - if s, ok := result.([]interface{}); ok { - return s, err - } - if v.Kind() == reflect.Map && v.Len() == 0 { - return nil, nil - } - if v.Kind() == reflect.Slice { - out := make([]interface{}, v.Len()) - for i := 0; i < v.Len(); i++ { - out[i] = v.Index(i).Interface() - } - return out, nil - } - - return []interface{}{result}, nil -} - -// SetValueAtPath sets a value at the case insensitive lexical path inside -// of a structure. -func SetValueAtPath(i interface{}, path string, v interface{}) { - if rvals := rValuesAtPath(i, path, true, false, v == nil); rvals != nil { - for _, rval := range rvals { - if rval.Kind() == reflect.Ptr && rval.IsNil() { - continue - } - setValue(rval, v) - } - } -} - -func setValue(dstVal reflect.Value, src interface{}) { - if dstVal.Kind() == reflect.Ptr { - dstVal = reflect.Indirect(dstVal) - } - srcVal := reflect.ValueOf(src) - - if !srcVal.IsValid() { // src is literal nil - if dstVal.CanAddr() { - // Convert to pointer so that pointer's value can be nil'ed - // dstVal = dstVal.Addr() - } - dstVal.Set(reflect.Zero(dstVal.Type())) - - } else if srcVal.Kind() == reflect.Ptr { - if srcVal.IsNil() { - srcVal = reflect.Zero(dstVal.Type()) - } else { - srcVal = reflect.ValueOf(src).Elem() - } - dstVal.Set(srcVal) - } else { - if dstVal.Kind() == reflect.String { - dstVal.SetString(srcVal.String()) - } else { - dstVal.Set(srcVal) - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index 72e196dd..cb426988 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,48 @@ +# v1.3.16 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.15 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.14 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.13 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.12 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.11 (2024-06-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.10 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.9 (2024-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.8 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.7 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.6 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.3.5 (2024-03-29) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index faf71cac..de6ed988 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.5" +const goModuleVersion = "1.3.16" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go index 15bf1047..f0c283d3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go @@ -2,12 +2,14 @@ package context import ( "context" + "time" "github.com/aws/smithy-go/middleware" ) type s3BackendKey struct{} type checksumInputAlgorithmKey struct{} +type clockSkew struct{} const ( // S3BackendS3Express identifies the S3Express backend @@ -37,3 +39,14 @@ func GetChecksumInputAlgorithm(ctx context.Context) string { v, _ := middleware.GetStackValue(ctx, checksumInputAlgorithmKey{}).(string) return v } + +// SetAttemptSkewContext sets the clock skew value on the context +func SetAttemptSkewContext(ctx context.Context, v time.Duration) context.Context { + return middleware.WithStackValue(ctx, clockSkew{}, v) +} + +// GetAttemptSkewContext gets the clock skew value from the context +func GetAttemptSkewContext(ctx context.Context) time.Duration { + x, _ := middleware.GetStackValue(ctx, clockSkew{}).(time.Duration) + return x +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go index ba603275..91414afe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go @@ -12,11 +12,12 @@ type Partition struct { // PartitionConfig provides the endpoint metadata for an AWS region or partition. type PartitionConfig struct { - Name string `json:"name"` - DnsSuffix string `json:"dnsSuffix"` - DualStackDnsSuffix string `json:"dualStackDnsSuffix"` - SupportsFIPS bool `json:"supportsFIPS"` - SupportsDualStack bool `json:"supportsDualStack"` + Name string `json:"name"` + DnsSuffix string `json:"dnsSuffix"` + DualStackDnsSuffix string `json:"dualStackDnsSuffix"` + SupportsFIPS bool `json:"supportsFIPS"` + SupportsDualStack bool `json:"supportsDualStack"` + ImplicitGlobalRegion string `json:"implicitGlobalRegion"` } type RegionOverrides struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go index 849beffd..5f077999 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go @@ -13,11 +13,12 @@ var partitions = []Partition{ ID: "aws", RegionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ - Name: "aws", - DnsSuffix: "amazonaws.com", - DualStackDnsSuffix: "api.aws", - SupportsFIPS: true, - SupportsDualStack: true, + Name: "aws", + DnsSuffix: "amazonaws.com", + DualStackDnsSuffix: "api.aws", + SupportsFIPS: true, + SupportsDualStack: true, + ImplicitGlobalRegion: "us-east-1", }, Regions: map[string]RegionOverrides{ "af-south-1": { @@ -111,6 +112,13 @@ var partitions = []Partition{ SupportsFIPS: nil, SupportsDualStack: nil, }, + "ca-west-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, "eu-central-1": { Name: nil, DnsSuffix: nil, @@ -229,11 +237,12 @@ var partitions = []Partition{ ID: "aws-cn", RegionRegex: "^cn\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ - Name: "aws-cn", - DnsSuffix: "amazonaws.com.cn", - DualStackDnsSuffix: "api.amazonwebservices.com.cn", - SupportsFIPS: true, - SupportsDualStack: true, + Name: "aws-cn", + DnsSuffix: "amazonaws.com.cn", + DualStackDnsSuffix: "api.amazonwebservices.com.cn", + SupportsFIPS: true, + SupportsDualStack: true, + ImplicitGlobalRegion: "cn-northwest-1", }, Regions: map[string]RegionOverrides{ "aws-cn-global": { @@ -263,11 +272,12 @@ var partitions = []Partition{ ID: "aws-us-gov", RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ - Name: "aws-us-gov", - DnsSuffix: "amazonaws.com", - DualStackDnsSuffix: "api.aws", - SupportsFIPS: true, - SupportsDualStack: true, + Name: "aws-us-gov", + DnsSuffix: "amazonaws.com", + DualStackDnsSuffix: "api.aws", + SupportsFIPS: true, + SupportsDualStack: true, + ImplicitGlobalRegion: "us-gov-west-1", }, Regions: map[string]RegionOverrides{ "aws-us-gov-global": { @@ -297,11 +307,12 @@ var partitions = []Partition{ ID: "aws-iso", RegionRegex: "^us\\-iso\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ - Name: "aws-iso", - DnsSuffix: "c2s.ic.gov", - DualStackDnsSuffix: "c2s.ic.gov", - SupportsFIPS: true, - SupportsDualStack: false, + Name: "aws-iso", + DnsSuffix: "c2s.ic.gov", + DualStackDnsSuffix: "c2s.ic.gov", + SupportsFIPS: true, + SupportsDualStack: false, + ImplicitGlobalRegion: "us-iso-east-1", }, Regions: map[string]RegionOverrides{ "aws-iso-global": { @@ -331,11 +342,12 @@ var partitions = []Partition{ ID: "aws-iso-b", RegionRegex: "^us\\-isob\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ - Name: "aws-iso-b", - DnsSuffix: "sc2s.sgov.gov", - DualStackDnsSuffix: "sc2s.sgov.gov", - SupportsFIPS: true, - SupportsDualStack: false, + Name: "aws-iso-b", + DnsSuffix: "sc2s.sgov.gov", + DualStackDnsSuffix: "sc2s.sgov.gov", + SupportsFIPS: true, + SupportsDualStack: false, + ImplicitGlobalRegion: "us-isob-east-1", }, Regions: map[string]RegionOverrides{ "aws-iso-b-global": { @@ -358,23 +370,33 @@ var partitions = []Partition{ ID: "aws-iso-e", RegionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ - Name: "aws-iso-e", - DnsSuffix: "cloud.adc-e.uk", - DualStackDnsSuffix: "cloud.adc-e.uk", - SupportsFIPS: true, - SupportsDualStack: false, + Name: "aws-iso-e", + DnsSuffix: "cloud.adc-e.uk", + DualStackDnsSuffix: "cloud.adc-e.uk", + SupportsFIPS: true, + SupportsDualStack: false, + ImplicitGlobalRegion: "eu-isoe-west-1", + }, + Regions: map[string]RegionOverrides{ + "eu-isoe-west-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, }, - Regions: map[string]RegionOverrides{}, }, { ID: "aws-iso-f", RegionRegex: "^us\\-isof\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ - Name: "aws-iso-f", - DnsSuffix: "csp.hci.ic.gov", - DualStackDnsSuffix: "csp.hci.ic.gov", - SupportsFIPS: true, - SupportsDualStack: false, + Name: "aws-iso-f", + DnsSuffix: "csp.hci.ic.gov", + DualStackDnsSuffix: "csp.hci.ic.gov", + SupportsFIPS: true, + SupportsDualStack: false, + ImplicitGlobalRegion: "us-isof-south-1", }, Regions: map[string]RegionOverrides{}, }, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json index f376f690..7a28569c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json @@ -198,7 +198,11 @@ "supportsFIPS" : true }, "regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$", - "regions" : { } + "regions" : { + "eu-isoe-west-1" : { + "description" : "EU ISOE West" + } + } }, { "id" : "aws-iso-f", "outputs" : { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index 6f6dafa8..1f0ad01b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,48 @@ +# v2.6.16 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.15 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.14 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.13 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.12 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.11 (2024-06-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.10 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.9 (2024-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.8 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.7 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.6 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.6.5 (2024-03-29) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 27981631..24b17600 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.6.5" +const goModuleVersion = "2.6.16" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md index c0e54faf..be61098b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.8.1 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. + # v1.8.0 (2024-02-13) * **Feature**: Bump minimum Go version to 1.20 per our language support policy. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go index 6e0b906c..ef6a3811 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go @@ -3,4 +3,4 @@ package ini // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.8.0" +const goModuleVersion = "1.8.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go new file mode 100644 index 00000000..8e24a3f0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go @@ -0,0 +1,42 @@ +package middleware + +import ( + "context" + "sync/atomic" + "time" + + internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" + "github.com/aws/smithy-go/middleware" +) + +// AddTimeOffsetMiddleware sets a value representing clock skew on the request context. +// This can be read by other operations (such as signing) to correct the date value they send +// on the request +type AddTimeOffsetMiddleware struct { + Offset *atomic.Int64 +} + +// ID the identifier for AddTimeOffsetMiddleware +func (m *AddTimeOffsetMiddleware) ID() string { return "AddTimeOffsetMiddleware" } + +// HandleBuild sets a value for attemptSkew on the request context if one is set on the client. +func (m AddTimeOffsetMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( + out middleware.BuildOutput, metadata middleware.Metadata, err error, +) { + if m.Offset != nil { + offset := time.Duration(m.Offset.Load()) + ctx = internalcontext.SetAttemptSkewContext(ctx, offset) + } + return next.HandleBuild(ctx, in) +} + +// HandleDeserialize gets the clock skew context from the context, and if set, sets it on the pointer +// held by AddTimeOffsetMiddleware +func (m *AddTimeOffsetMiddleware) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + if v := internalcontext.GetAttemptSkewContext(ctx); v != 0 { + m.Offset.Store(v.Nanoseconds()) + } + return next.HandleDeserialize(ctx, in) +} 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 index e79a14ba..1d60810e 100644 --- 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 @@ -1,3 +1,149 @@ +# v1.35.0 (2024-08-15) + +* **Feature**: Make the LastUsedDate field in the GetAccessKeyLastUsed response optional. This may break customers who only call the API for access keys with a valid LastUsedDate. This fixes a deserialization issue for access keys without a LastUsedDate, because the field was marked as required but could be null. +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.33.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.7 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.6 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.5 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.4 (2024-05-23) + +* No change notes available for this release. + +# v1.32.3 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.2 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.1 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + +# v1.32.0 (2024-04-11) + +* **Feature**: For CreateOpenIDConnectProvider API, the ThumbprintList parameter is no longer required. + +# 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 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 index 6b35a581..17e2f3a1 100644 --- 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 @@ -14,13 +14,16 @@ import ( 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" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" 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" + "sync/atomic" "time" ) @@ -31,6 +34,9 @@ const ServiceAPIVersion = "2010-05-08" // Access Management. type Client struct { options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 } // New returns an initialized Client based on the functional options. Provide @@ -57,17 +63,32 @@ func New(options Options, optFns ...func(*Options)) *Client { fn(&options) } + finalizeRetryMaxAttempts(&options) + ignoreAnonymousAuth(&options) + wrapWithAnonymousAuth(&options) + resolveAuthSchemes(&options) client := &Client{ options: options, } + initializeTimeOffsetResolver(client) + 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) @@ -77,7 +98,7 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf fn(&options) } - finalizeRetryMaxAttemptOptions(&options, *c) + finalizeOperationRetryMaxAttempts(&options, *c) finalizeClientEndpointResolverOptions(&options) @@ -131,7 +152,7 @@ func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in mi 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: %v", err) + 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) @@ -140,7 +161,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o return fmt.Errorf("add ResolveEndpointV2: %v", err) } if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %v", err) + return fmt.Errorf("add Signing: %w", err) } return nil } @@ -217,15 +238,16 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AccountIDEndpointMode: cfg.AccountIDEndpointMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -325,7 +347,15 @@ func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { o.RetryMaxAttempts = cfg.RetryMaxAttempts } -func finalizeRetryMaxAttemptOptions(o *Options, client Client) { +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 } @@ -341,17 +371,37 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { } func addClientUserAgent(stack *middleware.Stack, options Options) error { - if err := awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "iam", goModuleVersion)(stack); err != nil { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { return err } + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "iam", goModuleVersion) if len(options.AppID) > 0 { - return awsmiddleware.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)(stack) + 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 } @@ -370,12 +420,72 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func addRetryMiddlewares(stack *middleware.Stack, o Options) error { - mo := retry.AddRetryMiddlewaresOptions{ - Retryer: o.Retryer, - LogRetryAttempts: o.ClientLogMode.IsRetries(), +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 addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + +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 } - return retry.AddRetryMiddlewares(stack, mo) + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil } // resolves dual-stack endpoint configuration @@ -408,12 +518,75 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { + switch mode { + case aws.AccountIDEndpointModeUnset: + case aws.AccountIDEndpointModePreferred: + case aws.AccountIDEndpointModeDisabled: + case aws.AccountIDEndpointModeRequired: + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { + return fmt.Errorf("accountID is required but not set") + } else if ca.Credentials.AccountID == "" { + return fmt.Errorf("accountID is required but not set") + } + // default check in case invalid mode is configured through request config + default: + return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) + } + + return nil +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + } func addResponseErrorMiddleware(stack *middleware.Stack) error { - return awshttp.AddResponseErrorMiddleware(stack) + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { 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 index 3faca27b..ab2ac881 100644 --- 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 @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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 +// 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 { @@ -40,7 +40,7 @@ type AddClientIDToOpenIDConnectProviderInput struct { // 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. + // using the ListOpenIDConnectProvidersoperation. // // This member is required. OpenIDConnectProviderArn *string @@ -77,25 +77,25 @@ func (c *Client) addOperationAddClientIDToOpenIDConnectProviderMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +110,19 @@ func (c *Client) addOperationAddClientIDToOpenIDConnectProviderMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddClientIDToOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddClientIDToOpenIDConnectProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 37c8b22e..a7e2951d 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -15,15 +14,20 @@ import ( // 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. +// because of [eventual consistency]. To force the change, you must [disassociate the instance profile] and then [associate the instance profile], 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] in the IAM User Guide. For more +// information about instance profiles, see [Using instance profiles]in the IAM User Guide. +// +// [disassociate the instance profile]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIamInstanceProfile.html +// [associate the instance profile]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateIamInstanceProfile.html +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html +// [eventual consistency]: https://en.wikipedia.org/wiki/Eventual_consistency +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html func (c *Client) AddRoleToInstanceProfile(ctx context.Context, params *AddRoleToInstanceProfileInput, optFns ...func(*Options)) (*AddRoleToInstanceProfileOutput, error) { if params == nil { params = &AddRoleToInstanceProfileInput{} @@ -41,18 +45,24 @@ func (c *Client) AddRoleToInstanceProfile(ctx context.Context, params *AddRoleTo 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: _+=,.@- + // The name of the instance profile to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: - // _+=,.@- + // The name of the role to add. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -89,25 +99,25 @@ func (c *Client) addOperationAddRoleToInstanceProfileMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +132,19 @@ func (c *Client) addOperationAddRoleToInstanceProfileMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddRoleToInstanceProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddRoleToInstanceProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 08a70914..48fa5fe0 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -29,18 +28,24 @@ func (c *Client) AddUserToGroup(ctx context.Context, params *AddUserToGroupInput 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: _+=,.@- + // The name of the group to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: - // _+=,.@- + // The name of the user to add. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -77,25 +82,25 @@ func (c *Client) addOperationAddUserToGroupMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +115,19 @@ func (c *Client) addOperationAddUserToGroupMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddUserToGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddUserToGroup(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 4a3ebad6..ed638d95 100644 --- 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 @@ -6,19 +6,23 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// 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. +// 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]PutGroupPolicy . +// +// As a best practice, you can validate your IAM policies. To learn more, see [Validating IAM policies] in +// the IAM User Guide. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [PutGroupPolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutGroupPolicy.html +// [Validating IAM policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) AttachGroupPolicy(ctx context.Context, params *AttachGroupPolicyInput, optFns ...func(*Options)) (*AttachGroupPolicyOutput, error) { if params == nil { params = &AttachGroupPolicyInput{} @@ -36,17 +40,23 @@ func (c *Client) AttachGroupPolicy(ctx context.Context, params *AttachGroupPolic 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: _+=,.@- + // The name (friendly name, not ARN) of the group to attach the policy to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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. + // The Amazon Resource Name (ARN) of the IAM policy you want to attach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string @@ -83,25 +93,25 @@ func (c *Client) addOperationAttachGroupPolicyMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -116,13 +126,19 @@ func (c *Client) addOperationAttachGroupPolicyMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachGroupPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachGroupPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 097f0e04..4e757327 100644 --- 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 @@ -6,23 +6,30 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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) +// 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]CreateRole . You can +// update a role's trust policy using [UpdateAssumerolePolicy]UpdateAssumerolePolicy . +// +// Use this operation to attach a managed policy to a role. To embed an inline +// policy in a role, use [PutRolePolicy]PutRolePolicy . For more information about policies, see [Managed policies and inline policies] // in the IAM User Guide. +// +// As a best practice, you can validate your IAM policies. To learn more, see [Validating IAM policies] in +// the IAM User Guide. +// +// [Validating IAM policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html +// [UpdateAssumerolePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html +// [PutRolePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutRolePolicy.html +// [CreateRole]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) AttachRolePolicy(ctx context.Context, params *AttachRolePolicyInput, optFns ...func(*Options)) (*AttachRolePolicyOutput, error) { if params == nil { params = &AttachRolePolicyInput{} @@ -40,17 +47,23 @@ func (c *Client) AttachRolePolicy(ctx context.Context, params *AttachRolePolicyI 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. + // The Amazon Resource Name (ARN) of the IAM policy you want to attach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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: _+=,.@- + // The name (friendly name, not ARN) of the role to attach the policy to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -87,25 +100,25 @@ func (c *Client) addOperationAttachRolePolicyMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -120,13 +133,19 @@ func (c *Client) addOperationAttachRolePolicyMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachRolePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachRolePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 0b858bf8..9791f0fb 100644 --- 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 @@ -6,19 +6,23 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// 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. +// 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]PutUserPolicy . +// +// As a best practice, you can validate your IAM policies. To learn more, see [Validating IAM policies] in +// the IAM User Guide. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Validating IAM policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html +// [PutUserPolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutUserPolicy.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) AttachUserPolicy(ctx context.Context, params *AttachUserPolicyInput, optFns ...func(*Options)) (*AttachUserPolicyOutput, error) { if params == nil { params = &AttachUserPolicyInput{} @@ -36,17 +40,23 @@ func (c *Client) AttachUserPolicy(ctx context.Context, params *AttachUserPolicyI 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. + // The Amazon Resource Name (ARN) of the IAM policy you want to attach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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: _+=,.@- + // The name (friendly name, not ARN) of the IAM user to attach the policy to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -83,25 +93,25 @@ func (c *Client) addOperationAttachUserPolicyMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -116,13 +126,19 @@ func (c *Client) addOperationAttachUserPolicyMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachUserPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachUserPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index fec0352b..ef04c749 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -15,10 +14,13 @@ import ( // 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. +// 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]in the IAM User Guide. +// +// [Managing passwords]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html func (c *Client) ChangePassword(ctx context.Context, params *ChangePasswordInput, optFns ...func(*Options)) (*ChangePasswordOutput, error) { if params == nil { params = &ChangePasswordInput{} @@ -37,16 +39,19 @@ func (c *Client) ChangePassword(ctx context.Context, params *ChangePasswordInput 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 + // account's password policy, if one exists. + // + // The [regex pattern] 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. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. NewPassword *string @@ -87,25 +92,25 @@ func (c *Client) addOperationChangePasswordMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -120,13 +125,19 @@ func (c *Client) addOperationChangePasswordMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpChangePasswordValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChangePassword(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 88d76a5e..1d3f96c7 100644 --- 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 @@ -6,26 +6,33 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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 +// 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. +// 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. +// no associated users. +// +// For information about quotas on the number of keys you can create, see [IAM and STS quotas] 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. +// +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html func (c *Client) CreateAccessKey(ctx context.Context, params *CreateAccessKeyInput, optFns ...func(*Options)) (*CreateAccessKeyOutput, error) { if params == nil { params = &CreateAccessKeyInput{} @@ -43,10 +50,13 @@ func (c *Client) CreateAccessKey(ctx context.Context, params *CreateAccessKeyInp 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: _+=,.@- + // The name of the IAM user that the new key will belong to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -88,25 +98,25 @@ func (c *Client) addOperationCreateAccessKeyMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -121,10 +131,16 @@ func (c *Client) addOperationCreateAccessKeyMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccessKey(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 853ac6a6..f36dd0f4 100644 --- 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 @@ -6,15 +6,15 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// using an Amazon Web Services account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the Amazon Web Services +// Sign-In User Guide. +// +// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html func (c *Client) CreateAccountAlias(ctx context.Context, params *CreateAccountAliasInput, optFns ...func(*Options)) (*CreateAccountAliasOutput, error) { if params == nil { params = &CreateAccountAliasInput{} @@ -32,9 +32,13 @@ func (c *Client) CreateAccountAlias(ctx context.Context, params *CreateAccountAl 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. + // The account alias to create. + // + // This parameter allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccountAlias *string @@ -71,25 +75,25 @@ func (c *Client) addOperationCreateAccountAliasMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -104,13 +108,19 @@ func (c *Client) addOperationCreateAccountAliasMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccountAliasValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccountAlias(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index dca7d6e0..d289c042 100644 --- 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 @@ -6,15 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// Creates a new group. +// +// For information about the number of groups you can create, see [IAM and STS quotas] in the IAM User +// Guide. +// +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html func (c *Client) CreateGroup(ctx context.Context, params *CreateGroupInput, optFns ...func(*Options)) (*CreateGroupOutput, error) { if params == nil { params = &CreateGroupInput{} @@ -32,21 +34,28 @@ func (c *Client) CreateGroup(ctx context.Context, params *CreateGroupInput, optF 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". + // 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. + // The path to the group. For more information about paths, see [IAM identifiers] 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]) 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. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html + // [regex pattern]: http://wikipedia.org/wiki/regex Path *string noSmithyDocumentSerde @@ -88,25 +97,25 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -121,13 +130,19 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGroup(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 636e9050..c3b199c1 100644 --- 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 @@ -6,18 +6,22 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// Creates a new instance profile. For information about instance profiles, see [Using roles for applications on Amazon EC2] +// +// in the IAM User Guide, and [Instance profiles]in the Amazon EC2 User Guide. +// +// For information about the number of instance profiles you can create, see [IAM object quotas] in +// the IAM User Guide. +// +// [Instance profiles]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#ec2-instance-profile +// [IAM object quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// +// [Using roles for applications on Amazon EC2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html func (c *Client) CreateInstanceProfile(ctx context.Context, params *CreateInstanceProfileInput, optFns ...func(*Options)) (*CreateInstanceProfileOutput, error) { if params == nil { params = &CreateInstanceProfileInput{} @@ -35,30 +39,40 @@ func (c *Client) CreateInstanceProfile(ctx context.Context, params *CreateInstan 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: _+=,.@- + // The name of the instance profile to create. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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. + // The path to the instance profile. For more information about paths, see [IAM Identifiers] 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]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 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. + // information about tagging, see [Tagging IAM resources]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. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -100,25 +114,25 @@ func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -133,13 +147,19 @@ func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstanceProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInstanceProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 66ea7caa..66dbdb03 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,12 +13,16 @@ import ( // 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. +// 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 ChangePasswordto 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] in the IAM User Guide. +// +// [Managing passwords]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html func (c *Client) CreateLoginProfile(ctx context.Context, params *CreateLoginProfileInput, optFns ...func(*Options)) (*CreateLoginProfileOutput, error) { if params == nil { params = &CreateLoginProfileInput{} @@ -37,24 +40,29 @@ func (c *Client) CreateLoginProfile(ctx context.Context, params *CreateLoginProf 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 new password for the user. + // + // The [regex pattern] 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. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -101,25 +109,25 @@ func (c *Client) addOperationCreateLoginProfileMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -134,13 +142,19 @@ func (c *Client) addOperationCreateLoginProfileMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoginProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLoginProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index a3f26629..500f15b1 100644 --- 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 @@ -6,40 +6,49 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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: +// Creates an IAM entity to describe an identity provider (IdP) that supports [OpenID Connect (OIDC)]. +// +// 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]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. These OIDC IdPs include Auth0, GitHub, Google, and those -// that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. In -// these cases, your legacy thumbprint remains in your configuration, but is no -// longer used for validation. 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. +// Amazon Web Services. +// +// Amazon Web Services secures communication with OIDC identity providers (IdPs) +// using our library of trusted root certificate authorities (CAs) to verify the +// JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP relies on a +// certificate that is not signed by one of these trusted CAs, only then we secure +// communication using the thumbprints set in the IdP's configuration. +// +// 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 CreateOpenIDConnectProvideroperation to +// highly privileged users. +// +// [OpenID Connect (OIDC)]: http://openid.net/connect/ +// [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 func (c *Client) CreateOpenIDConnectProvider(ctx context.Context, params *CreateOpenIDConnectProviderInput, optFns ...func(*Options)) (*CreateOpenIDConnectProviderOutput, error) { if params == nil { params = &CreateOpenIDConnectProviderInput{} @@ -57,33 +66,16 @@ func (c *Client) CreateOpenIDConnectProvider(ctx context.Context, params *Create 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. + // 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 @@ -91,22 +83,52 @@ type CreateOpenIDConnectProviderInput struct { // 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 + // 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. + // information about tagging, see [Tagging IAM resources]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. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag + // 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. + // + // This parameter is optional. If it is not included, IAM will retrieve and use + // the top intermediate certificate authority (CA) thumbprint of the OpenID Connect + // identity provider server certificate. + // + // 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. + // + // 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] in the + // IAM user Guide. + // + // [Obtaining the thumbprint for an OpenID Connect provider]: https://docs.aws.amazon.com/IAM/latest/UserGuide/identity-providers-oidc-obtain-thumbprint.html + ThumbprintList []string + noSmithyDocumentSerde } @@ -114,13 +136,14 @@ type CreateOpenIDConnectProviderInput struct { type CreateOpenIDConnectProviderOutput struct { // The Amazon Resource Name (ARN) of the new IAM OpenID Connect provider that is - // created. For more information, see OpenIDConnectProviderListEntry . + // 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. + // list of tags is sorted by tag key. For more information about tagging, see [Tagging IAM resources]in + // the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // Metadata pertaining to the operation's result. @@ -151,25 +174,25 @@ func (c *Client) addOperationCreateOpenIDConnectProviderMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -184,13 +207,19 @@ func (c *Client) addOperationCreateOpenIDConnectProviderMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOpenIDConnectProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 76353e47..79962acd 100644 --- 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 @@ -6,21 +6,26 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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]in the IAM User Guide. +// +// As a best practice, you can validate your IAM policies. To learn more, see [Validating IAM policies] in +// the IAM User Guide. +// +// For more information about managed policies in general, see [Managed policies and inline policies] in the IAM User +// Guide. +// +// [Validating IAM policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html +// [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) CreatePolicy(ctx context.Context, params *CreatePolicyInput, optFns ...func(*Options)) (*CreatePolicyOutput, error) { if params == nil { params = &CreatePolicyInput{} @@ -38,58 +43,82 @@ func (c *Client) CreatePolicy(ctx context.Context, params *CreatePolicyInput, op 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: + // 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]. + // + // To learn more about JSON policy grammar, see [Grammar of the IAM JSON policy language] in the IAM User Guide. + // + // The [regex pattern] 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 ) // + // [Grammar of the IAM JSON policy language]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // // 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". + // 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. + // 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. + // The path for the policy. + // + // For more information about paths, see [IAM identifiers] 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]) 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. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html + // [regex pattern]: http://wikipedia.org/wiki/regex 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. + // about tagging, see [Tagging IAM resources]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. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -129,25 +158,25 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -162,13 +191,19 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index e8cea25b..a4f8aafc 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,12 +14,15 @@ import ( // 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. +// using DeletePolicyVersionbefore 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] in the IAM User Guide. +// +// [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html func (c *Client) CreatePolicyVersion(ctx context.Context, params *CreatePolicyVersionInput, optFns ...func(*Options)) (*CreatePolicyVersionOutput, error) { if params == nil { params = &CreatePolicyVersionInput{} @@ -39,38 +41,55 @@ func (c *Client) CreatePolicyVersion(ctx context.Context, params *CreatePolicyVe 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. + // version. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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: + // 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]. + // + // The [regex pattern] 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 ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // // 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. + // 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] in the IAM User Guide. + // + // [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html SetAsDefault bool noSmithyDocumentSerde @@ -110,25 +129,25 @@ func (c *Client) addOperationCreatePolicyVersionMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -143,13 +162,19 @@ func (c *Client) addOperationCreatePolicyVersionMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePolicyVersionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePolicyVersion(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 5dd22bca..3105cd87 100644 --- 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 @@ -6,17 +6,19 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// Creates a new role for your Amazon Web Services account. +// +// For more information about roles, see [IAM roles] 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]in the +// IAM User Guide. +// +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html func (c *Client) CreateRole(ctx context.Context, params *CreateRoleInput, optFns ...func(*Options)) (*CreateRoleOutput, error) { if params == nil { params = &CreateRoleInput{} @@ -35,29 +37,43 @@ func (c *Client) CreateRole(ctx context.Context, params *CreateRoleInput, optFns 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: + // 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] 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. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // 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: _+=,.@- + // 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]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -68,44 +84,59 @@ type CreateRoleInput struct { // 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. + // 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]in the IAM User + // Guide. + // + // [Using IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html 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. + // The path to the role. For more information about paths, see [IAM Identifiers] 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]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 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 + // 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. + // resource-based policy can grant to an entity. To learn more, see [Permissions boundaries for IAM entities]in the IAM + // User Guide. + // + // For more information about policy types, see [Policy types] in the IAM User Guide. + // + // [Policy types]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html 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. + // key name and an associated value. For more information about tagging, see [Tagging IAM resources]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. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -147,25 +178,25 @@ func (c *Client) addOperationCreateRoleMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -180,13 +211,19 @@ func (c *Client) addOperationCreateRoleMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRole(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index fb4ea866..b807221a 100644 --- 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 @@ -6,28 +6,34 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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]. +// +// For more information, see [Enabling SAML 2.0 federated users to access the Amazon Web Services Management Console] and [About SAML 2.0-based federation] in the IAM User Guide. +// +// [Signature Version 4]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [About SAML 2.0-based federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html +// [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 func (c *Client) CreateSAMLProvider(ctx context.Context, params *CreateSAMLProviderInput, optFns ...func(*Options)) (*CreateSAMLProviderOutput, error) { if params == nil { params = &CreateSAMLProviderInput{} @@ -45,10 +51,13 @@ func (c *Client) CreateSAMLProvider(ctx context.Context, params *CreateSAMLProvi 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: _+=,.@- + // The name of the provider to create. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. Name *string @@ -57,19 +66,23 @@ type CreateSAMLProviderInput struct { // 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 + // identity management software that is used as your organization's IdP. + // + // For more information, see [About SAML 2.0-based federation] in the IAM User Guide + // + // [About SAML 2.0-based federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html // // 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. + // tagging, see [Tagging IAM resources]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. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -82,9 +95,10 @@ type CreateSAMLProviderOutput struct { 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. + // list of tags is sorted by tag key. For more information about tagging, see [Tagging IAM resources]in + // the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // Metadata pertaining to the operation's result. @@ -115,25 +129,25 @@ func (c *Client) addOperationCreateSAMLProviderMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -148,13 +162,19 @@ func (c *Client) addOperationCreateSAMLProviderMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSAMLProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSAMLProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index dc5aa938..b3d3f154 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -18,10 +17,12 @@ import ( // 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. +// information, see [Using service-linked roles]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. +// +// [Using service-linked roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html func (c *Client) CreateServiceLinkedRole(ctx context.Context, params *CreateServiceLinkedRoleInput, optFns ...func(*Options)) (*CreateServiceLinkedRoleOutput, error) { if params == nil { params = &CreateServiceLinkedRoleInput{} @@ -41,12 +42,14 @@ 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. + // 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]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. + // + // [Amazon Web Services services that work with IAM]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html // // This member is required. AWSServiceName *string @@ -55,9 +58,11 @@ type CreateServiceLinkedRoleInput struct { // 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. + // 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. @@ -99,25 +104,25 @@ func (c *Client) addOperationCreateServiceLinkedRoleMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -132,13 +137,19 @@ func (c *Client) addOperationCreateServiceLinkedRoleMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServiceLinkedRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateServiceLinkedRole(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index ae0fe320..a5290f0e 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,14 +13,20 @@ import ( // 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. +// 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] in the IAM User +// Guide. +// +// [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 func (c *Client) CreateServiceSpecificCredential(ctx context.Context, params *CreateServiceSpecificCredentialInput, optFns ...func(*Options)) (*CreateServiceSpecificCredentialOutput, error) { if params == nil { params = &CreateServiceSpecificCredentialInput{} @@ -48,10 +53,13 @@ type CreateServiceSpecificCredentialInput struct { // 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: _+=,.@- + // except that they can be used only to access the specified service. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -62,9 +70,10 @@ type CreateServiceSpecificCredentialInput struct { 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 . + // 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. @@ -95,25 +104,25 @@ func (c *Client) addOperationCreateServiceSpecificCredentialMiddlewares(stack *m if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -128,13 +137,19 @@ func (c *Client) addOperationCreateServiceSpecificCredentialMiddlewares(stack *m if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateServiceSpecificCredential(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 50c9ed70..8c40fb89 100644 --- 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 @@ -6,15 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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) +// 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] // in the IAM User Guide. +// +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html func (c *Client) CreateUser(ctx context.Context, params *CreateUserInput, optFns ...func(*Options)) (*CreateUserOutput, error) { if params == nil { params = &CreateUserInput{} @@ -32,40 +34,53 @@ func (c *Client) CreateUser(ctx context.Context, params *CreateUserInput, optFns 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". + // 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. + // The path for the user name. For more information about paths, see [IAM identifiers] 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]) 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. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html + // [regex pattern]: http://wikipedia.org/wiki/regex 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 + // 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. + // resource-based policy can grant to an entity. To learn more, see [Permissions boundaries for IAM entities]in the IAM + // User Guide. + // + // For more information about policy types, see [Policy types] in the IAM User Guide. + // + // [Policy types]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html 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. + // key name and an associated value. For more information about tagging, see [Tagging IAM resources]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. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -105,25 +120,25 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -138,13 +153,19 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index e353bad6..512e34d7 100644 --- 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 @@ -6,23 +6,27 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// creating the virtual MFA, use EnableMFADeviceto 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]in the IAM +// User Guide. +// +// For information about the maximum number of MFA devices you can create, see [IAM and STS quotas] 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. +// +// [Using a virtual MFA device]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html func (c *Client) CreateVirtualMFADevice(ctx context.Context, params *CreateVirtualMFADeviceInput, optFns ...func(*Options)) (*CreateVirtualMFADeviceOutput, error) { if params == nil { params = &CreateVirtualMFADeviceInput{} @@ -41,30 +45,40 @@ func (c *Client) CreateVirtualMFADevice(ctx context.Context, params *CreateVirtu 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: _+=,.@- + // uniquely identify a virtual MFA device. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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. + // The path for the virtual MFA device. For more information about paths, see [IAM identifiers] 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]) 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. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html + // [regex pattern]: http://wikipedia.org/wiki/regex 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. + // tagging, see [Tagging IAM resources]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. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -106,25 +120,25 @@ func (c *Client) addOperationCreateVirtualMFADeviceMiddlewares(stack *middleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -139,13 +153,19 @@ func (c *Client) addOperationCreateVirtualMFADeviceMiddlewares(stack *middleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVirtualMFADeviceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVirtualMFADevice(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 27c8c664..390dc81e 100644 --- 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 @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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) +// 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] // in the IAM User Guide. +// +// [Enabling a virtual multi-factor authentication (MFA) device]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html func (c *Client) DeactivateMFADevice(ctx context.Context, params *DeactivateMFADeviceInput, optFns ...func(*Options)) (*DeactivateMFADeviceOutput, error) { if params == nil { params = &DeactivateMFADeviceInput{} @@ -34,18 +35,24 @@ func (c *Client) DeactivateMFADevice(ctx context.Context, params *DeactivateMFAD 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: =,.@:/- + // devices, the serial number is the device ARN. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: =,.@:/- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the user whose MFA device you want to deactivate. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -82,25 +89,25 @@ func (c *Client) addOperationDeactivateMFADeviceMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -115,13 +122,19 @@ func (c *Client) addOperationDeactivateMFADeviceMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivateMFADeviceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeactivateMFADevice(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index a4a1b13c..0441f5be 100644 --- 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 @@ -6,17 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the 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. +// 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{} @@ -35,17 +36,23 @@ func (c *Client) DeleteAccessKey(ctx context.Context, params *DeleteAccessKeyInp 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. + // delete. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the user whose access key pair you want to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -80,25 +87,25 @@ func (c *Client) addOperationDeleteAccessKeyMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +120,19 @@ func (c *Client) addOperationDeleteAccessKeyMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessKeyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccessKey(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index db040d94..d84bc422 100644 --- 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 @@ -6,15 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the 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. +// 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]in the Amazon Web Services +// Sign-In User Guide. +// +// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html func (c *Client) DeleteAccountAlias(ctx context.Context, params *DeleteAccountAliasInput, optFns ...func(*Options)) (*DeleteAccountAliasOutput, error) { if params == nil { params = &DeleteAccountAliasInput{} @@ -32,10 +33,13 @@ func (c *Client) DeleteAccountAlias(ctx context.Context, params *DeleteAccountAl 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. + // The name of the account alias to delete. + // + // This parameter allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccountAlias *string @@ -72,25 +76,25 @@ func (c *Client) addOperationDeleteAccountAliasMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -105,13 +109,19 @@ func (c *Client) addOperationDeleteAccountAliasMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccountAliasValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountAlias(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 77a65b22..3095a5ac 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -61,25 +60,25 @@ func (c *Client) addOperationDeleteAccountPasswordPolicyMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -94,10 +93,16 @@ func (c *Client) addOperationDeleteAccountPasswordPolicyMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountPasswordPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 130de198..a1dde6d6 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -30,10 +29,13 @@ func (c *Client) DeleteGroup(ctx context.Context, params *DeleteGroupInput, optF 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: _+=,.@- + // The name of the IAM group to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string @@ -70,25 +72,25 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -103,13 +105,19 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroup(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index d6ed14be..746693c4 100644 --- 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 @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the 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. +// 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] in +// the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DeleteGroupPolicy(ctx context.Context, params *DeleteGroupPolicyInput, optFns ...func(*Options)) (*DeleteGroupPolicyOutput, error) { if params == nil { params = &DeleteGroupPolicyInput{} @@ -34,18 +35,24 @@ func (c *Client) DeleteGroupPolicy(ctx context.Context, params *DeleteGroupPolic 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: - // _+=,.@- + // embedded in. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name identifying the policy document to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string @@ -82,25 +89,25 @@ func (c *Client) addOperationDeleteGroupPolicyMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -115,13 +122,19 @@ func (c *Client) addOperationDeleteGroupPolicyMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroupPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 3836dce1..fc18e6b9 100644 --- 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 @@ -6,18 +6,21 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the 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. +// 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] in the IAM User Guide. +// +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html func (c *Client) DeleteInstanceProfile(ctx context.Context, params *DeleteInstanceProfileInput, optFns ...func(*Options)) (*DeleteInstanceProfileOutput, error) { if params == nil { params = &DeleteInstanceProfileInput{} @@ -35,10 +38,13 @@ func (c *Client) DeleteInstanceProfile(ctx context.Context, params *DeleteInstan 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: _+=,.@- + // The name of the instance profile to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string @@ -75,25 +81,25 @@ func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -108,13 +114,19 @@ func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInstanceProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 337f190a..d1061e58 100644 --- 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 @@ -6,21 +6,23 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the 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 . +// Deletes the password for the specified IAM user, For more information, see [Managing passwords for IAM users]. +// +// 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 ChangePasswordto 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 UpdateAccessKeyand DeleteAccessKey. +// +// [Managing passwords for IAM users]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html func (c *Client) DeleteLoginProfile(ctx context.Context, params *DeleteLoginProfileInput, optFns ...func(*Options)) (*DeleteLoginProfileOutput, error) { if params == nil { params = &DeleteLoginProfileInput{} @@ -38,10 +40,13 @@ func (c *Client) DeleteLoginProfile(ctx context.Context, params *DeleteLoginProf 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: _+=,.@- + // The name of the user whose password you want to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -78,25 +83,25 @@ func (c *Client) addOperationDeleteLoginProfileMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -111,13 +116,19 @@ func (c *Client) addOperationDeleteLoginProfileMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoginProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLoginProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 90cd8e22..38c6dc8c 100644 --- 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 @@ -6,17 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes an 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. +// 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{} @@ -36,7 +37,7 @@ 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. + // using the ListOpenIDConnectProvidersoperation. // // This member is required. OpenIDConnectProviderArn *string @@ -73,25 +74,25 @@ func (c *Client) addOperationDeleteOpenIDConnectProviderMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -106,13 +107,19 @@ func (c *Client) addOperationDeleteOpenIDConnectProviderMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOpenIDConnectProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index d3ce200d..4a9cf7fc 100644 --- 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 @@ -6,28 +6,32 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the 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: +// 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. +// 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 DeletePolicyVersionto 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. +// For information about managed policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, optFns ...func(*Options)) (*DeletePolicyOutput, error) { if params == nil { params = &DeletePolicyInput{} @@ -45,9 +49,12 @@ func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, op 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. + // The Amazon Resource Name (ARN) of the IAM policy you want to delete. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string @@ -84,25 +91,25 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +124,19 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 0482098d..a136ef86 100644 --- 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 @@ -6,18 +6,19 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the 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. +// 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] in the IAM User Guide. +// +// [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html func (c *Client) DeletePolicyVersion(ctx context.Context, params *DeletePolicyVersionInput, optFns ...func(*Options)) (*DeletePolicyVersionOutput, error) { if params == nil { params = &DeletePolicyVersionInput{} @@ -36,18 +37,26 @@ func (c *Client) DeletePolicyVersion(ctx context.Context, params *DeletePolicyVe 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. + // a version. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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. + // The policy version to delete. + // + // This parameter allows (through its [regex pattern]) 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] in the IAM User Guide. + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html // // This member is required. VersionId *string @@ -84,25 +93,25 @@ func (c *Client) addOperationDeletePolicyVersionMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +126,19 @@ func (c *Client) addOperationDeletePolicyVersionMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyVersionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePolicyVersion(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 4f999ecb..cae15f3c 100644 --- 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 @@ -6,25 +6,29 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the 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 ) +// the role manually, or the deletion fails. For more information, see [Deleting an IAM role]. 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 ) +// 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. +// +// [Deleting an IAM role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_delete.html#roles-managingrole-deleting-cli func (c *Client) DeleteRole(ctx context.Context, params *DeleteRoleInput, optFns ...func(*Options)) (*DeleteRoleOutput, error) { if params == nil { params = &DeleteRoleInput{} @@ -42,10 +46,13 @@ func (c *Client) DeleteRole(ctx context.Context, params *DeleteRoleInput, optFns 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: - // _+=,.@- + // The name of the role to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -82,25 +89,25 @@ func (c *Client) addOperationDeleteRoleMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -115,13 +122,19 @@ func (c *Client) addOperationDeleteRoleMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRole(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index d986b7b3..7f172b1c 100644 --- 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 @@ -6,15 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the 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. +// 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{} @@ -70,25 +72,25 @@ func (c *Client) addOperationDeleteRolePermissionsBoundaryMiddlewares(stack *mid if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -103,13 +105,19 @@ func (c *Client) addOperationDeleteRolePermissionsBoundaryMiddlewares(stack *mid if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRolePermissionsBoundaryValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRolePermissionsBoundary(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 7125665f..85fdf9e1 100644 --- 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 @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the 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. +// +// 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] in the +// IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DeleteRolePolicy(ctx context.Context, params *DeleteRolePolicyInput, optFns ...func(*Options)) (*DeleteRolePolicyOutput, error) { if params == nil { params = &DeleteRolePolicyInput{} @@ -33,19 +34,25 @@ func (c *Client) DeleteRolePolicy(ctx context.Context, params *DeleteRolePolicyI 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: _+=,.@- + // The name of the inline policy to delete from the specified IAM role. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: - // _+=,.@- + // embedded in. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -82,25 +89,25 @@ func (c *Client) addOperationDeleteRolePolicyMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -115,13 +122,19 @@ func (c *Client) addOperationDeleteRolePolicyMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRolePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRolePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index bef6b3d6..d76a0218 100644 --- 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 @@ -6,17 +6,20 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a 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) -// . +// 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]. +// +// [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{} @@ -71,25 +74,25 @@ func (c *Client) addOperationDeleteSAMLProviderMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -104,13 +107,19 @@ func (c *Client) addOperationDeleteSAMLProviderMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSAMLProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSAMLProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index f4c993ea..08f4f66c 100644 --- 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 @@ -6,16 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the 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. +// 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]in the +// CodeCommit User Guide. +// +// [Set up CodeCommit for SSH connections]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html func (c *Client) DeleteSSHPublicKey(ctx context.Context, params *DeleteSSHPublicKeyInput, optFns ...func(*Options)) (*DeleteSSHPublicKeyOutput, error) { if params == nil { params = &DeleteSSHPublicKeyInput{} @@ -33,17 +35,23 @@ func (c *Client) DeleteSSHPublicKey(ctx context.Context, params *DeleteSSHPublic 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. + // The unique identifier for the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the IAM user associated with the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -80,25 +88,25 @@ func (c *Client) addOperationDeleteSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +121,19 @@ func (c *Client) addOperationDeleteSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSSHPublicKeyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSSHPublicKey(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index abde85cb..b576da97 100644 --- 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 @@ -6,23 +6,26 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the 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 +// Deletes the specified server certificate. +// +// For more information about working with server certificates, see [Working with server certificates] 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. +// more information, see [DeleteLoadBalancerListeners]in the Elastic Load Balancing API Reference. +// +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [DeleteLoadBalancerListeners]: https://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_DeleteLoadBalancerListeners.html func (c *Client) DeleteServerCertificate(ctx context.Context, params *DeleteServerCertificateInput, optFns ...func(*Options)) (*DeleteServerCertificateOutput, error) { if params == nil { params = &DeleteServerCertificateInput{} @@ -40,10 +43,13 @@ func (c *Client) DeleteServerCertificate(ctx context.Context, params *DeleteServ 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: _+=,.@- + // The name of the server certificate you want to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string @@ -80,25 +86,25 @@ func (c *Client) addOperationDeleteServerCertificateMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +119,19 @@ func (c *Client) addOperationDeleteServerCertificateMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServerCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteServerCertificate(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 747c1479..6ce0f1a0 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -16,18 +15,21 @@ import ( // 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. +// 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]for your +// service. +// +// For more information about service-linked roles, see [Roles terms and concepts: Amazon Web Services service-linked role] in the IAM User Guide. +// +// [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 +// [Amazon Web Services documentation]: http://docs.aws.amazon.com/ func (c *Client) DeleteServiceLinkedRole(ctx context.Context, params *DeleteServiceLinkedRoleInput, optFns ...func(*Options)) (*DeleteServiceLinkedRoleOutput, error) { if params == nil { params = &DeleteServiceLinkedRoleInput{} @@ -89,25 +91,25 @@ func (c *Client) addOperationDeleteServiceLinkedRoleMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +124,19 @@ func (c *Client) addOperationDeleteServiceLinkedRoleMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceLinkedRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteServiceLinkedRole(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index baa16330..5e8ede90 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -30,19 +29,25 @@ func (c *Client) DeleteServiceSpecificCredential(ctx context.Context, params *De 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. + // value by calling ListServiceSpecificCredentials. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // credentials are used to call the operation. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -77,25 +82,25 @@ func (c *Client) addOperationDeleteServiceSpecificCredentialMiddlewares(stack *m if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +115,19 @@ func (c *Client) addOperationDeleteServiceSpecificCredentialMiddlewares(stack *m if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteServiceSpecificCredential(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index dc06e2fb..3a0f71a7 100644 --- 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 @@ -6,17 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a 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. +// 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{} @@ -34,17 +35,23 @@ func (c *Client) DeleteSigningCertificate(ctx context.Context, params *DeleteSig 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. + // The ID of the signing certificate to delete. + // + // The format of this parameter, as described by its [regex] pattern, is a string of + // characters that can be upper- or lower-cased letters or digits. + // + // [regex]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the user the signing certificate belongs to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -79,25 +86,25 @@ func (c *Client) addOperationDeleteSigningCertificateMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -112,13 +119,19 @@ func (c *Client) addOperationDeleteSigningCertificateMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSigningCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSigningCertificate(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index b5fd3890..753e9a8a 100644 --- 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 @@ -6,26 +6,34 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the 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) +// attached to the user manually, or the deletion fails. For more information, see [Deleting an IAM user] // . 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 ) +// +// - 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 ) +// +// [Deleting an IAM user]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_deleting_cli func (c *Client) DeleteUser(ctx context.Context, params *DeleteUserInput, optFns ...func(*Options)) (*DeleteUserOutput, error) { if params == nil { params = &DeleteUserInput{} @@ -43,10 +51,13 @@ func (c *Client) DeleteUser(ctx context.Context, params *DeleteUserInput, optFns 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: - // _+=,.@- + // The name of the user to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -83,25 +94,25 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -116,13 +127,19 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 942bd159..c5a082c2 100644 --- 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 @@ -6,14 +6,15 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the 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. +// 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{} @@ -69,25 +70,25 @@ func (c *Client) addOperationDeleteUserPermissionsBoundaryMiddlewares(stack *mid if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -102,13 +103,19 @@ func (c *Client) addOperationDeleteUserPermissionsBoundaryMiddlewares(stack *mid if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserPermissionsBoundaryValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUserPermissionsBoundary(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index d627ec50..4adfc7d5 100644 --- 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 @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the 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. +// +// 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] in the +// IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DeleteUserPolicy(ctx context.Context, params *DeleteUserPolicyInput, optFns ...func(*Options)) (*DeleteUserPolicyOutput, error) { if params == nil { params = &DeleteUserPolicyInput{} @@ -33,19 +34,25 @@ func (c *Client) DeleteUserPolicy(ctx context.Context, params *DeleteUserPolicyI 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: _+=,.@- + // The name identifying the policy document to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: - // _+=,.@- + // embedded in. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -82,25 +89,25 @@ func (c *Client) addOperationDeleteUserPolicyMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -115,13 +122,19 @@ func (c *Client) addOperationDeleteUserPolicyMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUserPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 17bb8ed4..1298b29f 100644 --- 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 @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a 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 . +// 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{} @@ -32,10 +32,13 @@ func (c *Client) DeleteVirtualMFADevice(ctx context.Context, params *DeleteVirtu 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: =,.@:/- + // devices, the serial number is the same as the ARN. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: =,.@:/- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string @@ -72,25 +75,25 @@ func (c *Client) addOperationDeleteVirtualMFADeviceMiddlewares(stack *middleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -105,13 +108,19 @@ func (c *Client) addOperationDeleteVirtualMFADeviceMiddlewares(stack *middleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVirtualMFADeviceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVirtualMFADevice(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 68485376..5d2456b2 100644 --- 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 @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DetachGroupPolicy(ctx context.Context, params *DetachGroupPolicyInput, optFns ...func(*Options)) (*DetachGroupPolicyOutput, error) { if params == nil { params = &DetachGroupPolicyInput{} @@ -34,17 +34,22 @@ func (c *Client) DetachGroupPolicy(ctx context.Context, params *DetachGroupPolic 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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. + // The Amazon Resource Name (ARN) of the IAM policy you want to detach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string @@ -81,25 +86,25 @@ func (c *Client) addOperationDetachGroupPolicyMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +119,19 @@ func (c *Client) addOperationDetachGroupPolicyMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachGroupPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachGroupPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 912de07d..1450d982 100644 --- 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 @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DetachRolePolicy(ctx context.Context, params *DetachRolePolicyInput, optFns ...func(*Options)) (*DetachRolePolicyOutput, error) { if params == nil { params = &DetachRolePolicyInput{} @@ -33,18 +33,23 @@ func (c *Client) DetachRolePolicy(ctx context.Context, params *DetachRolePolicyI 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. + // The Amazon Resource Name (ARN) of the IAM policy you want to detach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -81,25 +86,25 @@ func (c *Client) addOperationDetachRolePolicyMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +119,19 @@ func (c *Client) addOperationDetachRolePolicyMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachRolePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachRolePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index ce0f924d..067db8a4 100644 --- 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 @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DetachUserPolicy(ctx context.Context, params *DetachUserPolicyInput, optFns ...func(*Options)) (*DetachUserPolicyOutput, error) { if params == nil { params = &DetachUserPolicyInput{} @@ -33,18 +33,23 @@ func (c *Client) DetachUserPolicy(ctx context.Context, params *DetachUserPolicyI 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. + // The Amazon Resource Name (ARN) of the IAM policy you want to detach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -81,25 +86,25 @@ func (c *Client) addOperationDetachUserPolicyMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +119,19 @@ func (c *Client) addOperationDetachUserPolicyMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachUserPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachUserPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 9dda8f1c..20054bc4 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -31,43 +30,55 @@ func (c *Client) EnableMFADevice(ctx context.Context, params *EnableMFADeviceInp 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) - // . + // 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]. + // + // [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) - // . + // 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]. + // + // [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: =,.@:/- + // devices, the serial number is the device ARN. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: =,.@:/- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the IAM user for whom you want to enable the MFA device. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -104,25 +115,25 @@ func (c *Client) addOperationEnableMFADeviceMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -137,13 +148,19 @@ func (c *Client) addOperationEnableMFADeviceMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableMFADeviceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableMFADevice(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 2068fef4..96296dc3 100644 --- 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 @@ -6,15 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// Generates a credential report for the Amazon Web Services account. For more +// +// information about the credential report, see [Getting credential reports]in the IAM User Guide. +// +// [Getting credential reports]: https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html func (c *Client) GenerateCredentialReport(ctx context.Context, params *GenerateCredentialReportInput, optFns ...func(*Options)) (*GenerateCredentialReportOutput, error) { if params == nil { params = &GenerateCredentialReportInput{} @@ -71,25 +72,25 @@ func (c *Client) addOperationGenerateCredentialReportMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -104,10 +105,16 @@ func (c *Client) addOperationGenerateCredentialReportMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateCredentialReport(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index f0c7c47d..6b3ce12f 100644 --- 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 @@ -6,61 +6,69 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// 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]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]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]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 @@ -69,6 +77,7 @@ import ( // 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 @@ -76,6 +85,7 @@ import ( // 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 @@ -84,11 +94,13 @@ import ( // 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. @@ -100,10 +112,16 @@ import ( // 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. +// For more about the evaluation of policy types, see [Evaluating policies]in the IAM User Guide. +// +// For more information about service last accessed data, see [Reducing policy scope by viewing user activity] in the IAM User +// Guide. +// +// [Logging IAM events with CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html +// [Refining permissions using service last accessed data]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html +// [Reducing permissions using service last accessed data]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html +// [Evaluating policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics +// [Reducing policy scope by viewing user activity]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html func (c *Client) GenerateOrganizationsAccessReport(ctx context.Context, params *GenerateOrganizationsAccessReportInput, optFns ...func(*Options)) (*GenerateOrganizationsAccessReportOutput, error) { if params == nil { params = &GenerateOrganizationsAccessReportInput{} @@ -132,9 +150,10 @@ type GenerateOrganizationsAccessReportInput struct { 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. + // 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 @@ -142,8 +161,7 @@ type GenerateOrganizationsAccessReportInput struct { type GenerateOrganizationsAccessReportOutput struct { - // The job identifier that you can use in the GetOrganizationsAccessReport - // operation. + // The job identifier that you can use in the GetOrganizationsAccessReport operation. JobId *string // Metadata pertaining to the operation's result. @@ -174,25 +192,25 @@ func (c *Client) addOperationGenerateOrganizationsAccessReportMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -207,13 +225,19 @@ func (c *Client) addOperationGenerateOrganizationsAccessReportMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateOrganizationsAccessReportValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateOrganizationsAccessReport(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index f4b9b3ea..9dec730a 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -16,46 +15,62 @@ import ( // 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 +// supporting this feature within the last year. For more information, see [Regions where data is tracked]. For +// more information about services and actions for which action last accessed +// information is displayed, see [IAM action last accessed information services and actions]. +// +// 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. +// and whether they were successful or denied access. For more information, see [Logging IAM events with CloudTrail]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. +// parameter. +// +// For additional information about the permissions policies that allow an +// identity (user, group, or role) to access specific services, use the ListPoliciesGrantingServiceAccessoperation. +// +// 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]in +// the IAM User Guide. +// +// For more information about service and action last accessed data, see [Reducing permissions using service last accessed data] in the +// IAM User Guide. +// +// [Logging IAM events with CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html +// [Reducing permissions using service last accessed data]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html +// [Regions where data is tracked]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period +// [Evaluating policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics +// [IAM action last accessed information services and actions]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor-action-last-accessed.html func (c *Client) GenerateServiceLastAccessedDetails(ctx context.Context, params *GenerateServiceLastAccessedDetailsInput, optFns ...func(*Options)) (*GenerateServiceLastAccessedDetailsOutput, error) { if params == nil { params = &GenerateServiceLastAccessedDetailsInput{} @@ -93,8 +108,7 @@ type GenerateServiceLastAccessedDetailsInput struct { type GenerateServiceLastAccessedDetailsOutput struct { - // The JobId that you can use in the GetServiceLastAccessedDetails or - // GetServiceLastAccessedDetailsWithEntities operations. The JobId returned by + // 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 @@ -127,25 +141,25 @@ func (c *Client) addOperationGenerateServiceLastAccessedDetailsMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -160,13 +174,19 @@ func (c *Client) addOperationGenerateServiceLastAccessedDetailsMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateServiceLastAccessedDetailsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateServiceLastAccessedDetails(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 6436f71e..e39438c4 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -33,9 +32,12 @@ func (c *Client) GetAccessKeyLastUsed(ctx context.Context, params *GetAccessKeyL 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. + // The identifier of an access key. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccessKeyId *string @@ -43,9 +45,8 @@ type GetAccessKeyLastUsedInput struct { 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. +// Contains the response to a successful GetAccessKeyLastUsed request. It is also returned as a member +// of the AccessKeyMetaDatastructure returned by the ListAccessKeys action. type GetAccessKeyLastUsedOutput struct { // Contains information about the last time the access key was used. @@ -82,25 +83,25 @@ func (c *Client) addOperationGetAccessKeyLastUsedMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -115,13 +116,19 @@ func (c *Client) addOperationGetAccessKeyLastUsedMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccessKeyLastUsedValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessKeyLastUsed(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 33d5fb5b..c55c15ca 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,14 +14,18 @@ import ( // 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 +// (users, groups, roles, and policies) in your account. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. 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. +// provide similar functionality. +// +// You can optionally filter the results using the Filter parameter. You can +// paginate the results using the MaxItems and Marker parameters. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 func (c *Client) GetAccountAuthorizationDetails(ctx context.Context, params *GetAccountAuthorizationDetailsInput, optFns ...func(*Options)) (*GetAccountAuthorizationDetailsOutput, error) { if params == nil { params = &GetAccountAuthorizationDetailsInput{} @@ -42,9 +45,11 @@ 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. + // 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 @@ -55,11 +60,13 @@ type GetAccountAuthorizationDetailsInput 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. + // 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 @@ -120,25 +127,25 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -153,10 +160,16 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountAuthorizationDetails(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -174,24 +187,18 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi 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. + // 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 @@ -254,6 +261,9 @@ func (p *GetAccountAuthorizationDetailsPaginator) NextPage(ctx context.Context, } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAccountAuthorizationDetails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +283,14 @@ func (p *GetAccountAuthorizationDetailsPaginator) NextPage(ctx context.Context, return result, 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) + func newServiceMetadataMiddleware_opGetAccountAuthorizationDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 19c2e4c6..effb8723 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,8 +14,9 @@ import ( // 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) -// . +// see [Managing an IAM password policy]. +// +// [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{} @@ -72,25 +72,25 @@ func (c *Client) addOperationGetAccountPasswordPolicyMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -105,10 +105,16 @@ func (c *Client) addOperationGetAccountPasswordPolicyMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountPasswordPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index b3f81d13..3ea71697 100644 --- 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 @@ -6,14 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// Services account. +// +// For information about IAM quotas, see [IAM and STS quotas] in the IAM User Guide. +// +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html func (c *Client) GetAccountSummary(ctx context.Context, params *GetAccountSummaryInput, optFns ...func(*Options)) (*GetAccountSummaryOutput, error) { if params == nil { params = &GetAccountSummaryInput{} @@ -68,25 +70,25 @@ func (c *Client) addOperationGetAccountSummaryMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -101,10 +103,16 @@ func (c *Client) addOperationGetAccountSummaryMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSummary(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 216567a6..7dc7c485 100644 --- 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 @@ -6,21 +6,21 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// 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{} @@ -40,24 +40,29 @@ 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: + // valid JSON text of an IAM policy. + // + // The [regex pattern] 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 ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. PolicyInputList []string noSmithyDocumentSerde } -// Contains the response to a successful GetContextKeysForPrincipalPolicy or -// GetContextKeysForCustomPolicy request. +// 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. @@ -91,25 +96,25 @@ func (c *Client) addOperationGetContextKeysForCustomPolicyMiddlewares(stack *mid if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -124,13 +129,19 @@ func (c *Client) addOperationGetContextKeysForCustomPolicyMiddlewares(stack *mid if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContextKeysForCustomPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContextKeysForCustomPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index f81593a9..5d47169d 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -14,17 +13,20 @@ import ( // 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 . +// 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 GetContextKeysForCustomPolicyinstead. +// +// 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 GetContextKeysForPrincipalPolicyto 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{} @@ -48,30 +50,38 @@ type GetContextKeysForPrincipalPolicyInput struct { // 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. + // 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)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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: + // keys that are referenced. + // + // The [regex pattern] 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 ) + // + // [regex pattern]: http://wikipedia.org/wiki/regex PolicyInputList []string noSmithyDocumentSerde } -// Contains the response to a successful GetContextKeysForPrincipalPolicy or -// GetContextKeysForCustomPolicy request. +// 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. @@ -105,25 +115,25 @@ func (c *Client) addOperationGetContextKeysForPrincipalPolicyMiddlewares(stack * if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -138,13 +148,19 @@ func (c *Client) addOperationGetContextKeysForPrincipalPolicyMiddlewares(stack * if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContextKeysForPrincipalPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContextKeysForPrincipalPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 2bfad004..abf7df46 100644 --- 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 @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// Retrieves a credential report for the Amazon Web Services account. For more +// +// information about the credential report, see [Getting credential reports]in the IAM User Guide. +// +// [Getting credential reports]: https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html func (c *Client) GetCredentialReport(ctx context.Context, params *GetCredentialReportInput, optFns ...func(*Options)) (*GetCredentialReportOutput, error) { if params == nil { params = &GetCredentialReportInput{} @@ -41,8 +42,9 @@ 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) . + // The date and time when the credential report was created, in [ISO 8601 date-time format]. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 GeneratedTime *time.Time // The format (MIME type) of the credential report. @@ -76,25 +78,25 @@ func (c *Client) addOperationGetCredentialReportMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -109,10 +111,16 @@ func (c *Client) addOperationGetCredentialReportMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCredentialReport(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 79ed52a7..ab844d00 100644 --- 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 @@ -6,13 +6,13 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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 +// 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 { @@ -31,10 +31,13 @@ func (c *Client) GetGroup(ctx context.Context, params *GetGroupInput, optFns ... 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: - // _+=,.@- + // The name of the group. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string @@ -47,11 +50,13 @@ type GetGroupInput 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. + // 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 @@ -110,25 +115,25 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -143,13 +148,19 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroup(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -167,22 +178,17 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option 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. + // 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 @@ -243,6 +249,9 @@ func (p *GetGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetGroup(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +271,13 @@ func (p *GetGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, 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) + func newServiceMetadataMiddleware_opGetGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index a29c558c..fd01808e 100644 --- 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 @@ -6,23 +6,27 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// specified IAM group. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. 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 GetPolicyto determine the +// policy's default version, then use GetPolicyVersionto retrieve the policy document. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) GetGroupPolicy(ctx context.Context, params *GetGroupPolicyInput, optFns ...func(*Options)) (*GetGroupPolicyOutput, error) { if params == nil { params = &GetGroupPolicyInput{} @@ -40,18 +44,24 @@ func (c *Client) GetGroupPolicy(ctx context.Context, params *GetGroupPolicyInput 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: _+=,.@- + // The name of the group the policy is associated with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the policy document to get. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string @@ -67,10 +77,11 @@ type GetGroupPolicyOutput struct { // 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. + // 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 @@ -108,25 +119,25 @@ func (c *Client) addOperationGetGroupPolicyMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,13 +152,19 @@ func (c *Client) addOperationGetGroupPolicyMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroupPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 10075995..618689e8 100644 --- 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 @@ -7,7 +7,6 @@ import ( "errors" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" @@ -16,10 +15,12 @@ import ( "time" ) -// Retrieves information about the specified instance profile, including the +// 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. +// instance profiles, see [Using instance profiles]in the IAM User Guide. +// +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html func (c *Client) GetInstanceProfile(ctx context.Context, params *GetInstanceProfileInput, optFns ...func(*Options)) (*GetInstanceProfileOutput, error) { if params == nil { params = &GetInstanceProfileInput{} @@ -37,10 +38,13 @@ func (c *Client) GetInstanceProfile(ctx context.Context, params *GetInstanceProf 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: _+=,.@- + // The name of the instance profile to get information about. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string @@ -84,25 +88,25 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +121,19 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInstanceProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -141,14 +151,6 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta 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 { @@ -156,8 +158,17 @@ 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. @@ -174,12 +185,13 @@ type InstanceProfileExistsWaiterOptions struct { // 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. + // 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) } @@ -256,7 +268,16 @@ func (w *InstanceProfileExistsWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetInstanceProfile(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } }) retryable, err := options.Retryable(ctx, params, out, err) @@ -305,6 +326,14 @@ func instanceProfileExistsStateRetryable(ctx context.Context, input *GetInstance return true, 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) + func newServiceMetadataMiddleware_opGetInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 6f2f224d..a67e9852 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,13 +14,16 @@ import ( // 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. +// 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{} @@ -39,10 +41,13 @@ func (c *Client) GetLoginProfile(ctx context.Context, params *GetLoginProfileInp 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: _+=,.@- + // The name of the user whose login profile you want to retrieve. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -86,25 +91,25 @@ func (c *Client) addOperationGetLoginProfileMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -119,13 +124,19 @@ func (c *Client) addOperationGetLoginProfileMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoginProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLoginProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 3ba1e538..45d77234 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" @@ -31,8 +30,9 @@ func (c *Client) GetMFADevice(ctx context.Context, params *GetMFADeviceInput, op 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) - // . + // accept FIDO security key [ARNs]. + // + // [ARNs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html // // This member is required. SerialNumber *string @@ -46,15 +46,17 @@ type GetMFADeviceInput struct { 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) - // . + // accept FIDO security key [ARNs]. + // + // [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/) . + // FIPS-140-2, FIPS-140-3, and FIDO certification levels obtained from [FIDO Alliance Metadata Service (MDS)]. + // + // [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. @@ -91,25 +93,25 @@ func (c *Client) addOperationGetMFADeviceMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -124,13 +126,19 @@ func (c *Client) addOperationGetMFADeviceMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMFADeviceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMFADevice(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 59c1e934..4f5cf748 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -34,9 +33,12 @@ 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. + // the ListOpenIDConnectProvidersoperation. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. OpenIDConnectProviderArn *string @@ -48,8 +50,7 @@ type GetOpenIDConnectProviderInput struct { 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 . + // 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 @@ -58,17 +59,17 @@ type GetOpenIDConnectProviderOutput struct { // 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. + // see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // A list of certificate thumbprints that are associated with the specified IAM - // OIDC provider resource object. For more information, see - // CreateOpenIDConnectProvider . + // 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 . + // information, see CreateOpenIDConnectProvider. Url *string // Metadata pertaining to the operation's result. @@ -99,25 +100,25 @@ func (c *Client) addOperationGetOpenIDConnectProviderMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -132,13 +133,19 @@ func (c *Client) addOperationGetOpenIDConnectProviderMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOpenIDConnectProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 8f470ead..60e6b989 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,20 +13,26 @@ import ( ) // 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. +// previously generated using the GenerateOrganizationsAccessReportoperation. 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. +// 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]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. +// +// [Refining permissions using service last accessed data]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html func (c *Client) GetOrganizationsAccessReport(ctx context.Context, params *GetOrganizationsAccessReportInput, optFns ...func(*Options)) (*GetOrganizationsAccessReportOutput, error) { if params == nil { params = &GetOrganizationsAccessReportInput{} @@ -45,8 +50,7 @@ func (c *Client) GetOrganizationsAccessReport(ctx context.Context, params *GetOr type GetOrganizationsAccessReportInput struct { - // The identifier of the request generated by the GenerateOrganizationsAccessReport - // operation. + // The identifier of the request generated by the GenerateOrganizationsAccessReport operation. // // This member is required. JobId *string @@ -59,11 +63,13 @@ type GetOrganizationsAccessReportInput 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. + // 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 @@ -76,8 +82,9 @@ type GetOrganizationsAccessReportInput struct { 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. + // The date and time, in [ISO 8601 date-time format], when the report job was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. JobCreationDate *time.Time @@ -91,10 +98,9 @@ type GetOrganizationsAccessReportOutput struct { // 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. + // 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 @@ -105,9 +111,12 @@ type GetOrganizationsAccessReportOutput struct { // 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 . + // The date and time, in [ISO 8601 date-time format], 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 . + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 JobCompletionDate *time.Time // When IsTruncated is true , this element is present and contains the value to use @@ -150,25 +159,25 @@ func (c *Client) addOperationGetOrganizationsAccessReportMiddlewares(stack *midd if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -183,13 +192,19 @@ func (c *Client) addOperationGetOrganizationsAccessReportMiddlewares(stack *midd if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOrganizationsAccessReportValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOrganizationsAccessReport(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 67a8f9b0..97bb0a52 100644 --- 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 @@ -7,7 +7,6 @@ import ( "errors" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" @@ -20,14 +19,17 @@ import ( // 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) GetPolicy(ctx context.Context, params *GetPolicyInput, optFns ...func(*Options)) (*GetPolicyOutput, error) { if params == nil { params = &GetPolicyInput{} @@ -46,8 +48,12 @@ func (c *Client) GetPolicy(ctx context.Context, params *GetPolicyInput, optFns . 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. + // about. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string @@ -89,25 +95,25 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +128,19 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -146,21 +158,23 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio 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. @@ -176,12 +190,13 @@ type PolicyExistsWaiterOptions struct { // 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. + // 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) } @@ -257,7 +272,16 @@ func (w *PolicyExistsWaiter) WaitForOutput(ctx context.Context, params *GetPolic } out, err := w.client.GetPolicy(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } }) retryable, err := options.Retryable(ctx, params, out, err) @@ -311,6 +335,13 @@ func policyExistsStateRetryable(ctx context.Context, input *GetPolicyInput, outp return true, 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) + func newServiceMetadataMiddleware_opGetPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 310223e8..a61c2803 100644 --- 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 @@ -6,27 +6,33 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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 +// policy, including the policy document. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. 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. +// 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] in the IAM User Guide. +// +// For more information about managed policy versions, see [Versioning for managed policies] in the IAM User Guide. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 +// [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) GetPolicyVersion(ctx context.Context, params *GetPolicyVersionInput, optFns ...func(*Options)) (*GetPolicyVersionOutput, error) { if params == nil { params = &GetPolicyVersionInput{} @@ -45,16 +51,23 @@ func (c *Client) GetPolicyVersion(ctx context.Context, params *GetPolicyVersionI 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. + // about. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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. + // Identifies the policy version to retrieve. + // + // This parameter allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. VersionId *string @@ -96,25 +109,25 @@ func (c *Client) addOperationGetPolicyVersionMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -129,13 +142,19 @@ func (c *Client) addOperationGetPolicyVersionMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyVersionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPolicyVersion(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 60bbd24e..6d2312d7 100644 --- 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 @@ -7,7 +7,6 @@ import ( "errors" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" @@ -19,13 +18,16 @@ import ( // 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. +// role. For more information about roles, see [IAM roles]in the IAM User Guide. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. 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. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html func (c *Client) GetRole(ctx context.Context, params *GetRoleInput, optFns ...func(*Options)) (*GetRoleOutput, error) { if params == nil { params = &GetRoleInput{} @@ -43,10 +45,13 @@ func (c *Client) GetRole(ctx context.Context, params *GetRoleInput, optFns ...fu 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: _+=,.@- + // The name of the IAM role to get information about. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -90,25 +95,25 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -123,13 +128,19 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRole(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -147,21 +158,23 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options 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. @@ -177,12 +190,13 @@ type RoleExistsWaiterOptions struct { // 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. + // 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) } @@ -258,7 +272,16 @@ func (w *RoleExistsWaiter) WaitForOutput(ctx context.Context, params *GetRoleInp } out, err := w.client.GetRole(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } }) retryable, err := options.Retryable(ctx, params, out, err) @@ -312,6 +335,13 @@ func roleExistsStateRetryable(ctx context.Context, input *GetRoleInput, output * return true, 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) + func newServiceMetadataMiddleware_opGetRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index a1761c53..d3cd2878 100644 --- 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 @@ -6,24 +6,30 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// specified IAM role. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. 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 GetPolicyto determine the +// policy's default version, then use GetPolicyVersionto retrieve the policy document. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// For more information about roles, see [IAM roles] in the IAM User Guide. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) GetRolePolicy(ctx context.Context, params *GetRolePolicyInput, optFns ...func(*Options)) (*GetRolePolicyOutput, error) { if params == nil { params = &GetRolePolicyInput{} @@ -41,18 +47,24 @@ func (c *Client) GetRolePolicy(ctx context.Context, params *GetRolePolicyInput, 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: _+=,.@- + // The name of the policy document to get. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the role associated with the policy. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -63,10 +75,11 @@ type GetRolePolicyInput struct { // 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. + // 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 @@ -109,25 +122,25 @@ func (c *Client) addOperationGetRolePolicyMiddlewares(stack *middleware.Stack, o if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -142,13 +155,19 @@ func (c *Client) addOperationGetRolePolicyMiddlewares(stack *middleware.Stack, o if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRolePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRolePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 07ce0952..08fa99e4 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,9 +13,11 @@ import ( ) // 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) -// . +// provider resource object was created or updated. +// +// This operation requires [Signature Version 4]. +// +// [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{} @@ -35,9 +36,12 @@ func (c *Client) GetSAMLProvider(ctx context.Context, params *GetSAMLProviderInp 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. + // get information about. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. SAMLProviderArn *string @@ -56,8 +60,9 @@ type GetSAMLProviderOutput struct { // 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. + // see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // The expiration date and time for the SAML provider. @@ -91,25 +96,25 @@ func (c *Client) addOperationGetSAMLProviderMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -124,13 +129,19 @@ func (c *Client) addOperationGetSAMLProviderMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSAMLProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSAMLProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 0b65aa19..7bc9673d 100644 --- 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 @@ -6,18 +6,19 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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]in the +// CodeCommit User Guide. +// +// [Set up CodeCommit for SSH connections]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html func (c *Client) GetSSHPublicKey(ctx context.Context, params *GetSSHPublicKeyInput, optFns ...func(*Options)) (*GetSSHPublicKeyOutput, error) { if params == nil { params = &GetSSHPublicKeyInput{} @@ -42,17 +43,23 @@ type GetSSHPublicKeyInput struct { // 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. + // The unique identifier for the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the IAM user associated with the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -94,25 +101,25 @@ func (c *Client) addOperationGetSSHPublicKeyMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -127,13 +134,19 @@ func (c *Client) addOperationGetSSHPublicKeyMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSSHPublicKeyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSSHPublicKey(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 64f2dd64..22cb7b8c 100644 --- 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 @@ -6,17 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// Retrieves information about the specified server certificate stored in IAM. +// +// For more information about working with server certificates, see [Working with server certificates] 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. +// +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html func (c *Client) GetServerCertificate(ctx context.Context, params *GetServerCertificateInput, optFns ...func(*Options)) (*GetServerCertificateOutput, error) { if params == nil { params = &GetServerCertificateInput{} @@ -34,10 +35,13 @@ func (c *Client) GetServerCertificate(ctx context.Context, params *GetServerCert 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: _+=,.@- + // The name of the server certificate you want to retrieve information about. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string @@ -81,25 +85,25 @@ func (c *Client) addOperationGetServerCertificateMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +118,19 @@ func (c *Client) addOperationGetServerCertificateMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServerCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServerCertificate(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index d126d9f2..f16423db 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -18,35 +17,49 @@ import ( // 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: +// 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]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. +// 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] in the +// IAM User Guide. +// +// [Reducing permissions using service last accessed data]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html +// [Evaluating policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics func (c *Client) GetServiceLastAccessedDetails(ctx context.Context, params *GetServiceLastAccessedDetailsInput, optFns ...func(*Options)) (*GetServiceLastAccessedDetailsOutput, error) { if params == nil { params = &GetServiceLastAccessedDetailsInput{} @@ -64,10 +77,9 @@ func (c *Client) GetServiceLastAccessedDetails(ctx context.Context, params *GetS 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 . + // 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 @@ -80,11 +92,13 @@ type GetServiceLastAccessedDetailsInput 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. + // 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 @@ -92,15 +106,19 @@ type GetServiceLastAccessedDetailsInput struct { 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 . + // The date and time, in [ISO 8601 date-time format], 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 . + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // 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. + // The date and time, in [ISO 8601 date-time format], when the report job was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. JobCreationDate *time.Time @@ -110,7 +128,7 @@ type GetServiceLastAccessedDetailsOutput struct { // This member is required. JobStatus types.JobStatusType - // A ServiceLastAccessed object that contains details about the most recent + // A ServiceLastAccessed object that contains details about the most recent // attempt to access the service. // // This member is required. @@ -164,25 +182,25 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsMiddlewares(stack *mid if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -197,13 +215,19 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsMiddlewares(stack *mid if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceLastAccessedDetailsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceLastAccessedDetails(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 30f1d56d..3fa77e9e 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -18,18 +17,23 @@ import ( // 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. +// 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{} @@ -55,13 +59,16 @@ type GetServiceLastAccessedDetailsWithEntitiesInput struct { // 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. + // service. + // + // To learn the service namespace for a service, see [Actions, resources, and condition keys for Amazon Web Services services] 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]in the Amazon Web Services + // General Reference. + // + // [Amazon Web Services service namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces + // [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 // // This member is required. ServiceNamespace *string @@ -74,11 +81,13 @@ type GetServiceLastAccessedDetailsWithEntitiesInput 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. + // 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 @@ -93,15 +102,19 @@ type GetServiceLastAccessedDetailsWithEntitiesOutput struct { // 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 . + // The date and time, in [ISO 8601 date-time format], 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 . + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // 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. + // The date and time, in [ISO 8601 date-time format], when the report job was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. JobCreationDate *time.Time @@ -154,25 +167,25 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsWithEntitiesMiddleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -187,13 +200,19 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsWithEntitiesMiddleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceLastAccessedDetailsWithEntitiesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceLastAccessedDetailsWithEntities(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 8e717f78..59a4503c 100644 --- 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 @@ -6,17 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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{} @@ -34,8 +33,8 @@ func (c *Client) GetServiceLinkedRoleDeletionStatus(ctx context.Context, params type GetServiceLinkedRoleDeletionStatusInput struct { - // The deletion task identifier. This identifier is returned by the - // DeleteServiceLinkedRole operation in the format task/aws-service-role/// . + // 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 @@ -81,25 +80,25 @@ func (c *Client) addOperationGetServiceLinkedRoleDeletionStatusMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +113,19 @@ func (c *Client) addOperationGetServiceLinkedRoleDeletionStatusMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceLinkedRoleDeletionStatusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceLinkedRoleDeletionStatus(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 2e441dd6..f4d8b712 100644 --- 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 @@ -7,7 +7,6 @@ import ( "errors" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" @@ -18,9 +17,11 @@ import ( ) // 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. +// 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{} @@ -38,11 +39,14 @@ func (c *Client) GetUser(ctx context.Context, params *GetUserInput, optFns ...fu 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: _+=,.@- + // 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]) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -51,21 +55,26 @@ type GetUserInput struct { // 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. + // 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]dates shown + // in the IAM console and password last used dates in the [IAM credential report], 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. + // + // [IAM credential report]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html + // [last sign-in]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html // // This member is required. User *types.User @@ -98,25 +107,25 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -131,10 +140,16 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -152,21 +167,23 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options 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. @@ -182,12 +199,13 @@ type UserExistsWaiterOptions struct { // 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. + // 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) } @@ -263,7 +281,16 @@ func (w *UserExistsWaiter) WaitForOutput(ctx context.Context, params *GetUserInp } out, err := w.client.GetUser(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } }) retryable, err := options.Retryable(ctx, params, out, err) @@ -317,6 +344,13 @@ func userExistsStateRetryable(ctx context.Context, input *GetUserInput, output * return true, 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) + func newServiceMetadataMiddleware_opGetUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 13fdff15..05d46d64 100644 --- 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 @@ -6,23 +6,27 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// specified IAM user. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. 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 GetPolicyto determine the +// policy's default version. Then use GetPolicyVersionto retrieve the policy document. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) GetUserPolicy(ctx context.Context, params *GetUserPolicyInput, optFns ...func(*Options)) (*GetUserPolicyOutput, error) { if params == nil { params = &GetUserPolicyInput{} @@ -40,18 +44,24 @@ func (c *Client) GetUserPolicy(ctx context.Context, params *GetUserPolicyInput, 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: _+=,.@- + // The name of the policy document to get. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the user who the policy is associated with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -62,10 +72,11 @@ type GetUserPolicyInput struct { // 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. + // 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 @@ -108,25 +119,25 @@ func (c *Client) addOperationGetUserPolicyMiddlewares(stack *middleware.Stack, o if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,13 +152,19 @@ func (c *Client) addOperationGetUserPolicyMiddlewares(stack *middleware.Stack, o if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUserPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index cb4226c8..5b5f619a 100644 --- 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 @@ -6,24 +6,28 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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{} @@ -49,17 +53,22 @@ type ListAccessKeysInput 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. + // 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: - // _+=,.@- + // The name of the user. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -113,25 +122,25 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -146,10 +155,16 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessKeys(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -167,23 +182,17 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, 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. + // 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 @@ -244,6 +253,9 @@ func (p *ListAccessKeysPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +275,14 @@ func (p *ListAccessKeysPaginator) NextPage(ctx context.Context, optFns ...func(* return result, 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) + func newServiceMetadataMiddleware_opListAccessKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 95ba3e5b..52f2855f 100644 --- 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 @@ -6,16 +6,15 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the IAM User Guide. +// +// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/IAM/latest/UserGuide/console_account-alias.html#CreateAccountAlias func (c *Client) ListAccountAliases(ctx context.Context, params *ListAccountAliasesInput, optFns ...func(*Options)) (*ListAccountAliasesOutput, error) { if params == nil { params = &ListAccountAliasesInput{} @@ -41,11 +40,13 @@ type ListAccountAliasesInput 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. + // 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 @@ -100,25 +101,25 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -133,10 +134,16 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountAliases(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -154,24 +161,18 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta 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. + // 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 @@ -232,6 +233,9 @@ func (p *ListAccountAliasesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +255,14 @@ func (p *ListAccountAliasesPaginator) NextPage(ctx context.Context, optFns ...fu return result, 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) + func newServiceMetadataMiddleware_opListAccountAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 420ea7b3..1be507e5 100644 --- 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 @@ -6,21 +6,24 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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] 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. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListAttachedGroupPolicies(ctx context.Context, params *ListAttachedGroupPoliciesInput, optFns ...func(*Options)) (*ListAttachedGroupPoliciesOutput, error) { if params == nil { params = &ListAttachedGroupPoliciesInput{} @@ -39,10 +42,12 @@ func (c *Client) ListAttachedGroupPolicies(ctx context.Context, params *ListAtta 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string @@ -55,20 +60,25 @@ type ListAttachedGroupPoliciesInput 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. + // 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. + // not included, it defaults to a slash (/), listing all policies. + // + // This parameter allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -120,25 +130,25 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -153,13 +163,19 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttachedGroupPoliciesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttachedGroupPolicies(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -177,24 +193,18 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew 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. + // 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 @@ -256,6 +266,9 @@ func (p *ListAttachedGroupPoliciesPaginator) NextPage(ctx context.Context, optFn } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedGroupPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +288,14 @@ func (p *ListAttachedGroupPoliciesPaginator) NextPage(ctx context.Context, optFn return result, 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) + func newServiceMetadataMiddleware_opListAttachedGroupPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 630a6f54..ed7f5a5f 100644 --- 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 @@ -6,21 +6,24 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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] 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. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListAttachedRolePolicies(ctx context.Context, params *ListAttachedRolePoliciesInput, optFns ...func(*Options)) (*ListAttachedRolePoliciesOutput, error) { if params == nil { params = &ListAttachedRolePoliciesInput{} @@ -39,10 +42,12 @@ func (c *Client) ListAttachedRolePolicies(ctx context.Context, params *ListAttac 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -55,20 +60,25 @@ type ListAttachedRolePoliciesInput 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. + // 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. + // not included, it defaults to a slash (/), listing all policies. + // + // This parameter allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -120,25 +130,25 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -153,13 +163,19 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttachedRolePoliciesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttachedRolePolicies(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -177,24 +193,18 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa 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. + // 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 @@ -256,6 +266,9 @@ func (p *ListAttachedRolePoliciesPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedRolePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +288,14 @@ func (p *ListAttachedRolePoliciesPaginator) NextPage(ctx context.Context, optFns return result, 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) + func newServiceMetadataMiddleware_opListAttachedRolePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 3bef6d18..b71e0341 100644 --- 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 @@ -6,21 +6,24 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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] 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. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListAttachedUserPolicies(ctx context.Context, params *ListAttachedUserPoliciesInput, optFns ...func(*Options)) (*ListAttachedUserPoliciesOutput, error) { if params == nil { params = &ListAttachedUserPoliciesInput{} @@ -39,10 +42,12 @@ func (c *Client) ListAttachedUserPolicies(ctx context.Context, params *ListAttac 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -55,20 +60,25 @@ type ListAttachedUserPoliciesInput 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. + // 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. + // not included, it defaults to a slash (/), listing all policies. + // + // This parameter allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -120,25 +130,25 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -153,13 +163,19 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttachedUserPoliciesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttachedUserPolicies(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -177,24 +193,18 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa 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. + // 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 @@ -256,6 +266,9 @@ func (p *ListAttachedUserPoliciesPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedUserPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +288,14 @@ func (p *ListAttachedUserPoliciesPaginator) NextPage(ctx context.Context, optFns return result, 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) + func newServiceMetadataMiddleware_opListAttachedUserPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 37ce031e..17a4bac7 100644 --- 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 @@ -6,18 +6,19 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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{} @@ -36,17 +37,22 @@ func (c *Client) ListEntitiesForPolicy(ctx context.Context, params *ListEntities 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. + // versions. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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. + // 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 @@ -57,27 +63,34 @@ type ListEntitiesForPolicyInput 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. + // 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. + // not included, it defaults to a slash (/), listing all entities. + // + // This parameter allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex 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. + // 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 @@ -135,25 +148,25 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -168,13 +181,19 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEntitiesForPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEntitiesForPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -192,24 +211,18 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. 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. + // 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 @@ -270,6 +283,9 @@ func (p *ListEntitiesForPolicyPaginator) NextPage(ctx context.Context, optFns .. } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEntitiesForPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -289,6 +305,14 @@ func (p *ListEntitiesForPolicyPaginator) NextPage(ctx context.Context, optFns .. return result, 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) + func newServiceMetadataMiddleware_opListEntitiesForPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 791a8e7a..1949a118 100644 --- 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 @@ -6,18 +6,22 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// 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]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. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListGroupPolicies(ctx context.Context, params *ListGroupPoliciesInput, optFns ...func(*Options)) (*ListGroupPoliciesOutput, error) { if params == nil { params = &ListGroupPoliciesInput{} @@ -35,10 +39,13 @@ func (c *Client) ListGroupPolicies(ctx context.Context, params *ListGroupPolicie 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: _+=,.@- + // The name of the group to list policies for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string @@ -51,11 +58,13 @@ type ListGroupPoliciesInput 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. + // 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 @@ -64,10 +73,13 @@ type ListGroupPoliciesInput struct { // 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: - // _+=,.@- + // A list of policy names. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyNames []string @@ -112,25 +124,25 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -145,13 +157,19 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupPoliciesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroupPolicies(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -169,23 +187,17 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac 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. + // 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 @@ -246,6 +258,9 @@ func (p *ListGroupPoliciesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +280,14 @@ func (p *ListGroupPoliciesPaginator) NextPage(ctx context.Context, optFns ...fun return result, 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) + func newServiceMetadataMiddleware_opListGroupPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 0bf6b871..74bfed37 100644 --- 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 @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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{} @@ -39,22 +39,27 @@ type ListGroupsInput 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. + // 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 + // 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. + // /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]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -108,25 +113,25 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,10 +146,16 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroups(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -162,22 +173,17 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti 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. + // 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 @@ -238,6 +244,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +266,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, 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) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 05b74108..50d27022 100644 --- 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 @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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{} @@ -31,10 +31,13 @@ func (c *Client) ListGroupsForUser(ctx context.Context, params *ListGroupsForUse 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: _+=,.@- + // The name of the user to list groups for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -47,11 +50,13 @@ type ListGroupsForUserInput 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. + // 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 @@ -105,25 +110,25 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -138,13 +143,19 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsForUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroupsForUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -162,23 +173,17 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac 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. + // 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 @@ -239,6 +244,9 @@ func (p *ListGroupsForUserPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupsForUser(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +266,14 @@ func (p *ListGroupsForUserPaginator) NextPage(ctx context.Context, optFns ...fun return result, 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) + func newServiceMetadataMiddleware_opListGroupsForUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index d1c74761..8f20f6b1 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,8 +13,9 @@ import ( // 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. +// see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListInstanceProfileTags(ctx context.Context, params *ListInstanceProfileTagsInput, optFns ...func(*Options)) (*ListInstanceProfileTagsOutput, error) { if params == nil { params = &ListInstanceProfileTagsInput{} @@ -33,10 +33,13 @@ func (c *Client) ListInstanceProfileTags(ctx context.Context, params *ListInstan 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: _+=,.@- + // The name of the IAM instance profile whose tags you want to see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string @@ -49,11 +52,13 @@ type ListInstanceProfileTagsInput 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. + // 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 @@ -108,25 +113,25 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,13 +146,19 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstanceProfileTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstanceProfileTags(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -165,24 +176,18 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar 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. + // 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 @@ -244,6 +249,9 @@ func (p *ListInstanceProfileTagsPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceProfileTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +271,14 @@ func (p *ListInstanceProfileTagsPaginator) NextPage(ctx context.Context, optFns return result, 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) + func newServiceMetadataMiddleware_opListInstanceProfileTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index cfad3dba..939b1a13 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,12 +13,16 @@ import ( // 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. +// profiles, see [Using instance profiles]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. +// +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html func (c *Client) ListInstanceProfiles(ctx context.Context, params *ListInstanceProfilesInput, optFns ...func(*Options)) (*ListInstanceProfilesOutput, error) { if params == nil { params = &ListInstanceProfilesInput{} @@ -45,22 +48,27 @@ type ListInstanceProfilesInput 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. + // 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 + // 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. + // 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]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -114,25 +122,25 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -147,10 +155,16 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstanceProfiles(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -168,24 +182,18 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S 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. + // 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 @@ -246,6 +254,9 @@ func (p *ListInstanceProfilesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +276,14 @@ func (p *ListInstanceProfilesPaginator) NextPage(ctx context.Context, optFns ... return result, 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) + func newServiceMetadataMiddleware_opListInstanceProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 23719fa5..83237faf 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,9 +13,11 @@ import ( // 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. +// instance profiles, go to [Using instance profiles]in the IAM User Guide. +// +// You can paginate the results using the MaxItems and Marker parameters. +// +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html func (c *Client) ListInstanceProfilesForRole(ctx context.Context, params *ListInstanceProfilesForRoleInput, optFns ...func(*Options)) (*ListInstanceProfilesForRoleOutput, error) { if params == nil { params = &ListInstanceProfilesForRoleInput{} @@ -34,10 +35,13 @@ func (c *Client) ListInstanceProfilesForRole(ctx context.Context, params *ListIn 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: _+=,.@- + // The name of the role to list instance profiles for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -50,11 +54,13 @@ type ListInstanceProfilesForRoleInput 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. + // 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 @@ -108,25 +114,25 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,13 +147,19 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstanceProfilesForRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstanceProfilesForRole(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -165,24 +177,18 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl 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. + // 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 @@ -245,6 +251,9 @@ func (p *ListInstanceProfilesForRolePaginator) NextPage(ctx context.Context, opt } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceProfilesForRole(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +273,14 @@ func (p *ListInstanceProfilesForRolePaginator) NextPage(ctx context.Context, opt return result, 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) + func newServiceMetadataMiddleware_opListInstanceProfilesForRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 783448bf..3807505d 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,8 +13,9 @@ import ( // 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. +// more information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListMFADeviceTags(ctx context.Context, params *ListMFADeviceTagsInput, optFns ...func(*Options)) (*ListMFADeviceTagsOutput, error) { if params == nil { params = &ListMFADeviceTagsInput{} @@ -34,10 +34,13 @@ func (c *Client) ListMFADeviceTags(ctx context.Context, params *ListMFADeviceTag 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: _+=,.@- + // see. For virtual MFA devices, the serial number is the same as the ARN. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string @@ -50,11 +53,13 @@ type ListMFADeviceTagsInput 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. + // 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 @@ -109,25 +114,25 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -142,13 +147,19 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMFADeviceTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMFADeviceTags(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -166,23 +177,17 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac 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. + // 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 @@ -243,6 +248,9 @@ func (p *ListMFADeviceTagsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMFADeviceTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +270,14 @@ func (p *ListMFADeviceTagsPaginator) NextPage(ctx context.Context, optFns ...fun return result, 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) + func newServiceMetadataMiddleware_opListMFADeviceTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index f7cdc879..7a4ed1ea 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -16,8 +15,9 @@ import ( // 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. +// 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{} @@ -43,17 +43,22 @@ type ListMFADevicesInput 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. + // 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: _+=,.@- + // The name of the user whose MFA devices you want to list. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -107,25 +112,25 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -140,10 +145,16 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMFADevices(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -161,23 +172,17 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, 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. + // 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 @@ -238,6 +243,9 @@ func (p *ListMFADevicesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMFADevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +265,14 @@ func (p *ListMFADevicesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, 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) + func newServiceMetadataMiddleware_opListMFADevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index c89a5040..2deb644f 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,9 +13,12 @@ import ( // 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. +// key. For more information, see [About web identity federation]. +// +// For more information about tagging, see [Tagging IAM resources] in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [About web identity federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html func (c *Client) ListOpenIDConnectProviderTags(ctx context.Context, params *ListOpenIDConnectProviderTagsInput, optFns ...func(*Options)) (*ListOpenIDConnectProviderTagsOutput, error) { if params == nil { params = &ListOpenIDConnectProviderTagsInput{} @@ -35,10 +37,13 @@ func (c *Client) ListOpenIDConnectProviderTags(ctx context.Context, params *List 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: - // _+=,.@- + // see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. OpenIDConnectProviderArn *string @@ -51,11 +56,13 @@ type ListOpenIDConnectProviderTagsInput 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. + // 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 @@ -111,25 +118,25 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -144,13 +151,19 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOpenIDConnectProviderTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpenIDConnectProviderTags(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -168,24 +181,18 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid 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. + // 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 @@ -248,6 +255,9 @@ func (p *ListOpenIDConnectProviderTagsPaginator) NextPage(ctx context.Context, o } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOpenIDConnectProviderTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +277,14 @@ func (p *ListOpenIDConnectProviderTagsPaginator) NextPage(ctx context.Context, o return result, 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) + func newServiceMetadataMiddleware_opListOpenIDConnectProviderTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 522c8d53..54fc8650 100644 --- 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 @@ -6,18 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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 . +// 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{} @@ -72,25 +72,25 @@ func (c *Client) addOperationListOpenIDConnectProvidersMiddlewares(stack *middle if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -105,10 +105,16 @@ func (c *Client) addOperationListOpenIDConnectProvidersMiddlewares(stack *middle if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpenIDConnectProviders(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index c28d037c..10b13b1e 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,17 +13,23 @@ import ( // 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 . +// 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] 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. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListPolicies(ctx context.Context, params *ListPoliciesInput, optFns ...func(*Options)) (*ListPoliciesOutput, error) { if params == nil { params = &ListPoliciesInput{} @@ -50,40 +55,50 @@ type ListPoliciesInput 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. + // 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. + // 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. + // allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex 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. + // 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. + // 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 @@ -135,25 +150,25 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -168,10 +183,16 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicies(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -189,22 +210,17 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op 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. + // 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 @@ -265,6 +281,9 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -284,6 +303,13 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, 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) + func newServiceMetadataMiddleware_opListPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index d5f5b6d6..4fd6f3ac 100644 --- 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 @@ -6,38 +6,45 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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]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. +// policy types, see [Managed policies and inline policies]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 GetUseror GetRole operations. +// +// [Evaluating policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html func (c *Client) ListPoliciesGrantingServiceAccess(ctx context.Context, params *ListPoliciesGrantingServiceAccessInput, optFns ...func(*Options)) (*ListPoliciesGrantingServiceAccessOutput, error) { if params == nil { params = &ListPoliciesGrantingServiceAccessInput{} @@ -62,13 +69,16 @@ type ListPoliciesGrantingServiceAccessInput struct { 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. + // want to list. + // + // To learn the service namespace for a service, see [Actions, resources, and condition keys for Amazon Web Services services] 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]in the Amazon Web Services + // General Reference. + // + // [Amazon Web Services service namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces + // [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 // // This member is required. ServiceNamespaces []string @@ -128,25 +138,25 @@ func (c *Client) addOperationListPoliciesGrantingServiceAccessMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -161,13 +171,19 @@ func (c *Client) addOperationListPoliciesGrantingServiceAccessMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPoliciesGrantingServiceAccessValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPoliciesGrantingServiceAccess(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 73f4a73f..c1f0a559 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,8 +13,9 @@ import ( // 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. +// tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListPolicyTags(ctx context.Context, params *ListPolicyTagsInput, optFns ...func(*Options)) (*ListPolicyTagsOutput, error) { if params == nil { params = &ListPolicyTagsInput{} @@ -33,10 +33,13 @@ func (c *Client) ListPolicyTags(ctx context.Context, params *ListPolicyTagsInput 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: _+=,.@- + // The ARN of the IAM customer managed policy whose tags you want to see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyArn *string @@ -49,11 +52,13 @@ type ListPolicyTagsInput 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. + // 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 @@ -108,25 +113,25 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,13 +146,19 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPolicyTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicyTags(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -165,23 +176,17 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, 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. + // 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 @@ -242,6 +247,9 @@ func (p *ListPolicyTagsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +269,14 @@ func (p *ListPolicyTagsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, 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) + func newServiceMetadataMiddleware_opListPolicyTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 1aa611a8..f4f5ef14 100644 --- 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 @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// the version that is currently set as the policy's default version. +// +// For more information about managed policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListPolicyVersions(ctx context.Context, params *ListPolicyVersionsInput, optFns ...func(*Options)) (*ListPolicyVersionsOutput, error) { if params == nil { params = &ListPolicyVersionsInput{} @@ -34,8 +35,12 @@ func (c *Client) ListPolicyVersions(ctx context.Context, params *ListPolicyVersi 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. + // versions. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string @@ -48,11 +53,13 @@ type ListPolicyVersionsInput 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. + // 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 @@ -73,9 +80,11 @@ type ListPolicyVersionsOutput struct { // 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. + // A list of policy versions. + // + // For more information about managed policy versions, see [Versioning for managed policies] in the IAM User Guide. + // + // [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html Versions []types.PolicyVersion // Metadata pertaining to the operation's result. @@ -106,25 +115,25 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -139,13 +148,19 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPolicyVersionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicyVersions(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -163,24 +178,18 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta 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. + // 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 @@ -241,6 +250,9 @@ func (p *ListPolicyVersionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +272,14 @@ func (p *ListPolicyVersionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, 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) + func newServiceMetadataMiddleware_opListPolicyVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index a44f551c..15a17eb9 100644 --- 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 @@ -6,18 +6,22 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// 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]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. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListRolePolicies(ctx context.Context, params *ListRolePoliciesInput, optFns ...func(*Options)) (*ListRolePoliciesOutput, error) { if params == nil { params = &ListRolePoliciesInput{} @@ -35,10 +39,13 @@ func (c *Client) ListRolePolicies(ctx context.Context, params *ListRolePoliciesI 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: _+=,.@- + // The name of the role to list policies for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -51,11 +58,13 @@ type ListRolePoliciesInput 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. + // 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 @@ -109,25 +118,25 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -142,13 +151,19 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRolePoliciesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRolePolicies(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -166,23 +181,17 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack 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. + // 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 @@ -243,6 +252,9 @@ func (p *ListRolePoliciesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRolePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +274,14 @@ func (p *ListRolePoliciesPaginator) NextPage(ctx context.Context, optFns ...func return result, 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) + func newServiceMetadataMiddleware_opListRolePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 28fe1a61..e24e37eb 100644 --- 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 @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// tags is sorted by tag key. For more information about tagging, see [Tagging IAM resources]in the IAM +// User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListRoleTags(ctx context.Context, params *ListRoleTagsInput, optFns ...func(*Options)) (*ListRoleTagsOutput, error) { if params == nil { params = &ListRoleTagsInput{} @@ -33,11 +33,13 @@ func (c *Client) ListRoleTags(ctx context.Context, params *ListRoleTagsInput, op 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: - // _+=,.@- + // The name of the IAM role for which you want to see the list of tags. + // + // This parameter accepts (through its [regex pattern]) a string of characters that consist of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -50,11 +52,13 @@ type ListRoleTagsInput 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. + // 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 @@ -109,25 +113,25 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -142,13 +146,19 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRoleTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoleTags(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -166,22 +176,17 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op 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. + // 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 @@ -242,6 +247,9 @@ func (p *ListRoleTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoleTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +269,13 @@ func (p *ListRoleTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, 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) + func newServiceMetadataMiddleware_opListRoleTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 6ba2b460..6aea245c 100644 --- 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 @@ -6,23 +6,30 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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: +// operation returns an empty list. For more information about roles, see [IAM roles]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. +// To view all of the information for a role, see GetRole. +// +// You can paginate the results using the MaxItems and Marker parameters. +// +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html func (c *Client) ListRoles(ctx context.Context, params *ListRolesInput, optFns ...func(*Options)) (*ListRolesOutput, error) { if params == nil { params = &ListRolesInput{} @@ -48,22 +55,27 @@ type ListRolesInput 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. + // 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 + // 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. + // /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]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -117,25 +129,25 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -150,10 +162,16 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoles(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -171,22 +189,17 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio 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. + // 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 @@ -247,6 +260,9 @@ func (p *ListRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +282,13 @@ func (p *ListRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, 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) + func newServiceMetadataMiddleware_opListRoles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index a7aefbe0..4bc8b0de 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,9 +13,12 @@ import ( // 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. +// key. For more information, see [About SAML 2.0-based federation]. +// +// For more information about tagging, see [Tagging IAM resources] in the IAM User Guide. +// +// [About SAML 2.0-based federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListSAMLProviderTags(ctx context.Context, params *ListSAMLProviderTagsInput, optFns ...func(*Options)) (*ListSAMLProviderTagsOutput, error) { if params == nil { params = &ListSAMLProviderTagsInput{} @@ -35,10 +37,13 @@ func (c *Client) ListSAMLProviderTags(ctx context.Context, params *ListSAMLProvi 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: - // _+=,.@- + // whose tags you want to see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SAMLProviderArn *string @@ -51,11 +56,13 @@ type ListSAMLProviderTagsInput 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. + // 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 @@ -111,25 +118,25 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -144,13 +151,19 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSAMLProviderTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSAMLProviderTags(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -168,24 +181,18 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S 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. + // 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 @@ -246,6 +253,9 @@ func (p *ListSAMLProviderTagsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSAMLProviderTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +275,14 @@ func (p *ListSAMLProviderTagsPaginator) NextPage(ctx context.Context, optFns ... return result, 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) + func newServiceMetadataMiddleware_opListSAMLProviderTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 31fbac01..6fa3322a 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -16,8 +15,11 @@ import ( // 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) -// . +// provider, see GetSAMLProvider. +// +// This operation requires [Signature Version 4]. +// +// [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{} @@ -72,25 +74,25 @@ func (c *Client) addOperationListSAMLProvidersMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -105,10 +107,16 @@ func (c *Client) addOperationListSAMLProvidersMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSAMLProviders(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 3d13a56a..5fbd400a 100644 --- 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 @@ -6,20 +6,23 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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]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. +// +// [Set up CodeCommit for SSH connections]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html func (c *Client) ListSSHPublicKeys(ctx context.Context, params *ListSSHPublicKeysInput, optFns ...func(*Options)) (*ListSSHPublicKeysOutput, error) { if params == nil { params = &ListSSHPublicKeysInput{} @@ -45,19 +48,24 @@ type ListSSHPublicKeysInput 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. + // 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: - // _+=,.@- + // key used to sign the request. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -109,25 +117,25 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -142,10 +150,16 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSSHPublicKeys(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -163,23 +177,17 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac 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. + // 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 @@ -240,6 +248,9 @@ func (p *ListSSHPublicKeysPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSSHPublicKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +270,14 @@ func (p *ListSSHPublicKeysPaginator) NextPage(ctx context.Context, optFns ...fun return result, 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) + func newServiceMetadataMiddleware_opListSSHPublicKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 8523a9a7..fd09b36a 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,12 +13,15 @@ import ( // 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. +// see [Tagging IAM resources]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]in the IAM User Guide. +// +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListServerCertificateTags(ctx context.Context, params *ListServerCertificateTagsInput, optFns ...func(*Options)) (*ListServerCertificateTagsOutput, error) { if params == nil { params = &ListServerCertificateTagsInput{} @@ -37,10 +39,13 @@ func (c *Client) ListServerCertificateTags(ctx context.Context, params *ListServ 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: _+=,.@- + // The name of the IAM server certificate whose tags you want to see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string @@ -53,11 +58,13 @@ type ListServerCertificateTagsInput 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. + // 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 @@ -112,25 +119,25 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -145,13 +152,19 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServerCertificateTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServerCertificateTags(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -169,24 +182,18 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew 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. + // 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 @@ -248,6 +255,9 @@ func (p *ListServerCertificateTagsPaginator) NextPage(ctx context.Context, optFn } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServerCertificateTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +277,14 @@ func (p *ListServerCertificateTagsPaginator) NextPage(ctx context.Context, optFn return result, 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) + func newServiceMetadataMiddleware_opListServerCertificateTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 07771e3d..76fec0e1 100644 --- 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 @@ -6,22 +6,26 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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 . +// 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] 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. +// +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html func (c *Client) ListServerCertificates(ctx context.Context, params *ListServerCertificatesInput, optFns ...func(*Options)) (*ListServerCertificatesOutput, error) { if params == nil { params = &ListServerCertificatesInput{} @@ -47,22 +51,27 @@ type ListServerCertificatesInput 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. + // 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 + // 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. + // /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]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -116,25 +125,25 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -149,10 +158,16 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServerCertificates(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -170,24 +185,18 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware 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. + // 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 @@ -248,6 +257,9 @@ func (p *ListServerCertificatesPaginator) NextPage(ctx context.Context, optFns . } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServerCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +279,14 @@ func (p *ListServerCertificatesPaginator) NextPage(ctx context.Context, optFns . return result, 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) + func newServiceMetadataMiddleware_opListServerCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 8daed0d7..74d617e0 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -17,8 +16,9 @@ import ( // 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. +// service, see [Set up service-specific credentials]in the CodeCommit User Guide. +// +// [Set up service-specific credentials]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html func (c *Client) ListServiceSpecificCredentials(ctx context.Context, params *ListServiceSpecificCredentialsInput, optFns ...func(*Options)) (*ListServiceSpecificCredentialsOutput, error) { if params == nil { params = &ListServiceSpecificCredentialsInput{} @@ -43,10 +43,13 @@ type ListServiceSpecificCredentialsInput struct { // 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: _+=,.@- + // credentials are used to call the operation. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -86,25 +89,25 @@ func (c *Client) addOperationListServiceSpecificCredentialsMiddlewares(stack *mi if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -119,10 +122,16 @@ func (c *Client) addOperationListServiceSpecificCredentialsMiddlewares(stack *mi if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceSpecificCredentials(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index f66d6688..b5ae2b21 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,10 +13,12 @@ import ( // 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 +// +// 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 @@ -47,17 +48,22 @@ type ListSigningCertificatesInput 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. + // 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: _+=,.@- + // The name of the IAM user whose signing certificates you want to examine. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -111,25 +117,25 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -144,10 +150,16 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSigningCertificates(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -165,24 +177,18 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar 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. + // 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 @@ -244,6 +250,9 @@ func (p *ListSigningCertificatesPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSigningCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +272,14 @@ func (p *ListSigningCertificatesPaginator) NextPage(ctx context.Context, optFns return result, 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) + func newServiceMetadataMiddleware_opListSigningCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 5d22713b..11b7db9b 100644 --- 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 @@ -6,18 +6,21 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// 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. +// 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]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. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListUserPolicies(ctx context.Context, params *ListUserPoliciesInput, optFns ...func(*Options)) (*ListUserPoliciesOutput, error) { if params == nil { params = &ListUserPoliciesInput{} @@ -35,10 +38,13 @@ func (c *Client) ListUserPolicies(ctx context.Context, params *ListUserPoliciesI 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: _+=,.@- + // The name of the user to list policies for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -51,11 +57,13 @@ type ListUserPoliciesInput 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. + // 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 @@ -109,25 +117,25 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -142,13 +150,19 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserPoliciesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUserPolicies(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -166,23 +180,17 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack 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. + // 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 @@ -243,6 +251,9 @@ func (p *ListUserPoliciesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +273,14 @@ func (p *ListUserPoliciesPaginator) NextPage(ctx context.Context, optFns ...func return result, 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) + func newServiceMetadataMiddleware_opListUserPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 2ea40970..7dc9c05e 100644 --- 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 @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// of tags is sorted by tag key. For more information about tagging, see [Tagging IAM resources]in the +// IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListUserTags(ctx context.Context, params *ListUserTagsInput, optFns ...func(*Options)) (*ListUserTagsOutput, error) { if params == nil { params = &ListUserTagsInput{} @@ -33,10 +33,13 @@ func (c *Client) ListUserTags(ctx context.Context, params *ListUserTagsInput, op 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: _+=,.@- + // The name of the IAM user whose tags you want to see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -49,11 +52,13 @@ type ListUserTagsInput 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. + // 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 @@ -108,25 +113,25 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,13 +146,19 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserTagsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUserTags(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -165,22 +176,17 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op 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. + // 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 @@ -241,6 +247,9 @@ func (p *ListUserTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +269,13 @@ func (p *ListUserTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, 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) + func newServiceMetadataMiddleware_opListUserTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 69d0ddb5..f6366f94 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,15 +13,19 @@ import ( // 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: +// 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. +// 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{} @@ -48,22 +51,27 @@ type ListUsersInput 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. + // 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 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. + // 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]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -117,25 +125,25 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -150,10 +158,16 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsers(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -171,22 +185,17 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio 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. + // 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 @@ -247,6 +256,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +278,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, 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) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index a064e2c4..299fafff 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,11 +14,14 @@ import ( // 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. +// 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{} @@ -37,7 +39,7 @@ func (c *Client) ListVirtualMFADevices(ctx context.Context, params *ListVirtualM type ListVirtualMFADevicesInput struct { - // The status ( Unassigned or Assigned ) of the devices to list. If you do not + // 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 @@ -50,11 +52,13 @@ type ListVirtualMFADevicesInput 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. + // 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 @@ -63,7 +67,7 @@ type ListVirtualMFADevicesInput struct { // Contains the response to a successful ListVirtualMFADevices request. type ListVirtualMFADevicesOutput struct { - // The list of virtual MFA devices in the current account that match the + // 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. @@ -109,25 +113,25 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -142,10 +146,16 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVirtualMFADevices(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -163,24 +173,18 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. 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. + // 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 @@ -241,6 +245,9 @@ func (p *ListVirtualMFADevicesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVirtualMFADevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +267,14 @@ func (p *ListVirtualMFADevicesPaginator) NextPage(ctx context.Context, optFns .. return result, 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) + func newServiceMetadataMiddleware_opListVirtualMFADevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 072c9892..2f1e8c59 100644 --- 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 @@ -6,22 +6,29 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// group. +// +// A user can also have managed policies attached to it. To attach a managed +// policy to a group, use [AttachGroupPolicy]AttachGroupPolicy . To create a new managed policy, use [CreatePolicy] +// CreatePolicy . For information about policies, see [Managed policies and inline policies] 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]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]in the IAM User Guide. +// +// [CreatePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// [Making query requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html +// [AttachGroupPolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachGroupPolicy.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) PutGroupPolicy(ctx context.Context, params *PutGroupPolicyInput, optFns ...func(*Options)) (*PutGroupPolicyOutput, error) { if params == nil { params = &PutGroupPolicyInput{} @@ -39,34 +46,48 @@ func (c *Client) PutGroupPolicy(ctx context.Context, params *PutGroupPolicyInput 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: _+=,.@-. + // The name of the group to associate the policy with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@-. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: + // 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] 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 ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // 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: _+=,.@- + // The name of the policy document. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string @@ -103,25 +124,25 @@ func (c *Client) addOperationPutGroupPolicyMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -136,13 +157,19 @@ func (c *Client) addOperationPutGroupPolicyMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutGroupPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutGroupPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 40f12835..a6065574 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -15,12 +14,15 @@ import ( // 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. +// 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]in the IAM User Guide. +// +// [IAM JSON policy evaluation logic]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html func (c *Client) PutRolePermissionsBoundary(ctx context.Context, params *PutRolePermissionsBoundaryInput, optFns ...func(*Options)) (*PutRolePermissionsBoundaryOutput, error) { if params == nil { params = &PutRolePermissionsBoundaryInput{} @@ -39,14 +41,18 @@ func (c *Client) PutRolePermissionsBoundary(ctx context.Context, params *PutRole 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 + // 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. + // resource-based policy can grant to an entity. To learn more, see [Permissions boundaries for IAM entities]in the IAM + // User Guide. + // + // For more information about policy types, see [Policy types] in the IAM User Guide. + // + // [Policy types]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html // // This member is required. PermissionsBoundary *string @@ -89,25 +95,25 @@ func (c *Client) addOperationPutRolePermissionsBoundaryMiddlewares(stack *middle if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +128,19 @@ func (c *Client) addOperationPutRolePermissionsBoundaryMiddlewares(stack *middle if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRolePermissionsBoundaryValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRolePermissionsBoundary(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index fe277438..7977a8f7 100644 --- 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 @@ -6,27 +6,38 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// 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]CreateRole . You can update a role's trust +// policy using [UpdateAssumeRolePolicy]UpdateAssumeRolePolicy . For more information about roles, see [IAM roles] 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]AttachRolePolicy . To create a new managed policy, use [CreatePolicy] +// CreatePolicy . For information about policies, see [Managed policies and inline policies] 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]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]in the IAM User Guide. +// +// [UpdateAssumeRolePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html +// [AttachRolePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachRolePolicy.html +// [CreatePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// [Making query requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html +// [CreateRole]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) PutRolePolicy(ctx context.Context, params *PutRolePolicyInput, optFns ...func(*Options)) (*PutRolePolicyOutput, error) { if params == nil { params = &PutRolePolicyInput{} @@ -44,34 +55,48 @@ func (c *Client) PutRolePolicy(ctx context.Context, params *PutRolePolicyInput, 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: + // 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] 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 ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // 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: _+=,.@- + // The name of the policy document. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the role to associate the policy with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -108,25 +133,25 @@ func (c *Client) addOperationPutRolePolicyMiddlewares(stack *middleware.Stack, o if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,13 +166,19 @@ func (c *Client) addOperationPutRolePolicyMiddlewares(stack *middleware.Stack, o if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRolePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRolePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 6fe0666a..b076030b 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -15,11 +14,13 @@ import ( // 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. +// 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]in the IAM User Guide. +// +// [IAM JSON policy evaluation logic]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html func (c *Client) PutUserPermissionsBoundary(ctx context.Context, params *PutUserPermissionsBoundaryInput, optFns ...func(*Options)) (*PutUserPermissionsBoundaryOutput, error) { if params == nil { params = &PutUserPermissionsBoundaryInput{} @@ -38,14 +39,18 @@ func (c *Client) PutUserPermissionsBoundary(ctx context.Context, params *PutUser 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 + // 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. + // resource-based policy can grant to an entity. To learn more, see [Permissions boundaries for IAM entities]in the IAM + // User Guide. + // + // For more information about policy types, see [Policy types] in the IAM User Guide. + // + // [Policy types]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html // // This member is required. PermissionsBoundary *string @@ -88,25 +93,25 @@ func (c *Client) addOperationPutUserPermissionsBoundaryMiddlewares(stack *middle if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -121,13 +126,19 @@ func (c *Client) addOperationPutUserPermissionsBoundaryMiddlewares(stack *middle if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutUserPermissionsBoundaryValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutUserPermissionsBoundary(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index f800cc93..eb2e1376 100644 --- 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 @@ -6,22 +6,29 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// user. +// +// An IAM user can also have a managed policy attached to it. To attach a managed +// policy to a user, use [AttachUserPolicy]AttachUserPolicy . To create a new managed policy, use [CreatePolicy] +// CreatePolicy . For information about policies, see [Managed policies and inline policies] 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]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]in the IAM User Guide. +// +// [CreatePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// [Making query requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html +// [AttachUserPolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachUserPolicy.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) PutUserPolicy(ctx context.Context, params *PutUserPolicyInput, optFns ...func(*Options)) (*PutUserPolicyOutput, error) { if params == nil { params = &PutUserPolicyInput{} @@ -39,34 +46,48 @@ func (c *Client) PutUserPolicy(ctx context.Context, params *PutUserPolicyInput, 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: + // 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] 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 ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // 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: _+=,.@- + // The name of the policy document. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the user to associate the policy with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -103,25 +124,25 @@ func (c *Client) addOperationPutUserPolicyMiddlewares(stack *middleware.Stack, o if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -136,13 +157,19 @@ func (c *Client) addOperationPutUserPolicyMiddlewares(stack *middleware.Stack, o if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutUserPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutUserPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 4f91bcc3..71975b0a 100644 --- 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 @@ -6,15 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the 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. +// 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{} @@ -33,17 +34,18 @@ func (c *Client) RemoveClientIDFromOpenIDConnectProvider(ctx context.Context, pa 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 - // . + // 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. + // client ID from. You can get a list of OIDC provider ARNs by using the ListOpenIDConnectProvidersoperation. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. OpenIDConnectProviderArn *string @@ -80,25 +82,25 @@ func (c *Client) addOperationRemoveClientIDFromOpenIDConnectProviderMiddlewares( if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +115,19 @@ func (c *Client) addOperationRemoveClientIDFromOpenIDConnectProviderMiddlewares( if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveClientIDFromOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveClientIDFromOpenIDConnectProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 7791ee47..02ee3aa9 100644 --- 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 @@ -6,19 +6,22 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the 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. +// Removes the specified IAM role from the specified Amazon 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] in the IAM User Guide. For more +// information about instance profiles, see [Using instance profiles]in the IAM User Guide. +// +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html func (c *Client) RemoveRoleFromInstanceProfile(ctx context.Context, params *RemoveRoleFromInstanceProfileInput, optFns ...func(*Options)) (*RemoveRoleFromInstanceProfileOutput, error) { if params == nil { params = &RemoveRoleFromInstanceProfileInput{} @@ -36,18 +39,24 @@ func (c *Client) RemoveRoleFromInstanceProfile(ctx context.Context, params *Remo 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: _+=,.@- + // The name of the instance profile to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: - // _+=,.@- + // The name of the role to remove. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -84,25 +93,25 @@ func (c *Client) addOperationRemoveRoleFromInstanceProfileMiddlewares(stack *mid if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +126,19 @@ func (c *Client) addOperationRemoveRoleFromInstanceProfileMiddlewares(stack *mid if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveRoleFromInstanceProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveRoleFromInstanceProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 89f8e6c8..0640669b 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -29,18 +28,24 @@ func (c *Client) RemoveUserFromGroup(ctx context.Context, params *RemoveUserFrom 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: _+=,.@- + // The name of the group to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: - // _+=,.@- + // The name of the user to remove. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -77,25 +82,25 @@ func (c *Client) addOperationRemoveUserFromGroupMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +115,19 @@ func (c *Client) addOperationRemoveUserFromGroupMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveUserFromGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveUserFromGroup(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 081e9d57..85f0710e 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -33,19 +32,25 @@ func (c *Client) ResetServiceSpecificCredential(ctx context.Context, params *Res 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. + // The unique identifier of the service-specific credential. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // credentials are used to call the operation. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -54,8 +59,10 @@ type ResetServiceSpecificCredentialInput struct { 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. + // 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. @@ -86,25 +93,25 @@ func (c *Client) addOperationResetServiceSpecificCredentialMiddlewares(stack *mi if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -119,13 +126,19 @@ func (c *Client) addOperationResetServiceSpecificCredentialMiddlewares(stack *mi if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetServiceSpecificCredential(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index bc91f799..bd53a03b 100644 --- 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 @@ -6,15 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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) +// Amazon Web Services servers. +// +// For more information about creating and working with virtual MFA devices, see [Using a virtual MFA device] // in the IAM User Guide. +// +// [Using a virtual MFA device]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html func (c *Client) ResyncMFADevice(ctx context.Context, params *ResyncMFADeviceInput, optFns ...func(*Options)) (*ResyncMFADeviceOutput, error) { if params == nil { params = &ResyncMFADeviceInput{} @@ -32,30 +34,38 @@ func (c *Client) ResyncMFADevice(ctx context.Context, params *ResyncMFADeviceInp type ResyncMFADeviceInput struct { - // An authentication code emitted by the device. The format for this parameter is - // a sequence of six digits. + // 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. + // 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: _+=,.@- + // Serial number that uniquely identifies the MFA device. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: _+=,.@- + // The name of the user whose MFA device you want to resynchronize. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -92,25 +102,25 @@ func (c *Client) addOperationResyncMFADeviceMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -125,13 +135,19 @@ func (c *Client) addOperationResyncMFADeviceMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResyncMFADeviceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResyncMFADevice(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index d1087c19..5aa954a9 100644 --- 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 @@ -6,17 +6,19 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// (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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) SetDefaultPolicyVersion(ctx context.Context, params *SetDefaultPolicyVersionInput, optFns ...func(*Options)) (*SetDefaultPolicyVersionOutput, error) { if params == nil { params = &SetDefaultPolicyVersionInput{} @@ -35,15 +37,21 @@ func (c *Client) SetDefaultPolicyVersion(ctx context.Context, params *SetDefault 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. + // to set. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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. + // The version of the policy to set as the default (operative) version. + // + // For more information about managed policy versions, see [Versioning for managed policies] in the IAM User Guide. + // + // [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html // // This member is required. VersionId *string @@ -80,25 +88,25 @@ func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +121,19 @@ func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetDefaultPolicyVersionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetDefaultPolicyVersion(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 2d0250f5..e0ffc10e 100644 --- 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 @@ -6,31 +6,33 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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]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]in the IAM User Guide. +// +// To view the current session token version, see the GlobalEndpointTokenVersion +// entry in the response of the GetAccountSummaryoperation. +// +// [Activating and deactivating STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html +// [Security Token Service endpoints and quotas]: https://docs.aws.amazon.com/general/latest/gr/sts.html func (c *Client) SetSecurityTokenServicePreferences(ctx context.Context, params *SetSecurityTokenServicePreferencesInput, optFns ...func(*Options)) (*SetSecurityTokenServicePreferencesOutput, error) { if params == nil { params = &SetSecurityTokenServicePreferencesInput{} @@ -52,9 +54,11 @@ type SetSecurityTokenServicePreferencesInput struct { // 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. + // affect systems where you temporarily store tokens. + // + // For information, see [Activating and deactivating STS in an Amazon Web Services Region] in the IAM User Guide. + // + // [Activating and deactivating STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html // // This member is required. GlobalEndpointTokenVersion types.GlobalEndpointTokenVersion @@ -91,25 +95,25 @@ func (c *Client) addOperationSetSecurityTokenServicePreferencesMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -124,13 +128,19 @@ func (c *Client) addOperationSetSecurityTokenServicePreferencesMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetSecurityTokenServicePreferencesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetSecurityTokenServicePreferences(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 325495c4..dc49d9b1 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,25 +13,33 @@ import ( // 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. +// 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 SimulatePrincipalPolicyinstead. +// +// 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]in the IAM User +// Guide. +// +// [Testing IAM policies with the IAM policy simulator]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html func (c *Client) SimulateCustomPolicy(ctx context.Context, params *SimulateCustomPolicyInput, optFns ...func(*Options)) (*SimulateCustomPolicyOutput, error) { if params == nil { params = &SimulateCustomPolicyInput{} @@ -62,31 +69,40 @@ type SimulateCustomPolicyInput struct { // 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) + // be "scope-down" policies, such as you could include in a call to [GetFederationToken]or one of the [AssumeRole] // 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: + // 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]. + // + // The [regex pattern] 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 ) // + // [AssumeRole]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_AssumeRole.html + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // [GetFederationToken]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetFederationToken.html + // // 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. + // 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. @@ -102,31 +118,41 @@ type SimulateCustomPolicyInput 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. + // 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: + // information about permissions boundaries, see [Permissions boundaries for IAM entities]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]. + // + // The [regex pattern] 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 ) + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundaryPolicyInputList []string // A list of ARNs of Amazon Web Services resources to include in the simulation. @@ -134,15 +160,21 @@ type SimulateCustomPolicyInput struct { // 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. + // 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)] in the Amazon Web Services General + // Reference. + // + // Simulation of resource-based policies isn't supported for IAM roles. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ResourceArns []string // Specifies the type of simulation to run. Different API operations that support @@ -152,19 +184,31 @@ type SimulateCustomPolicyInput struct { // 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 + // + // Each of the Amazon 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 + // specify that volume as a resource. If the Amazon 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 Amazon + // EC2 scenario options, see [Supported platforms]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 + // + // [Supported platforms]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html ResourceHandlingOption *string // An ARN representing the Amazon Web Services account ID that specifies the owner @@ -175,34 +219,43 @@ type SimulateCustomPolicyInput struct { // 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 . + // 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: + // 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]. + // + // The [regex pattern] 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length ResourcePolicy *string noSmithyDocumentSerde } -// Contains the response to a successful SimulatePrincipalPolicy or -// SimulateCustomPolicy request. +// Contains the response to a successful SimulatePrincipalPolicy or SimulateCustomPolicy request. type SimulateCustomPolicyOutput struct { // The results of the simulation. @@ -248,25 +301,25 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -281,13 +334,19 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSimulateCustomPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimulateCustomPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -305,24 +364,18 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S 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. + // 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 @@ -383,6 +436,9 @@ func (p *SimulateCustomPolicyPaginator) NextPage(ctx context.Context, optFns ... } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SimulateCustomPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -402,6 +458,14 @@ func (p *SimulateCustomPolicyPaginator) NextPage(ctx context.Context, optFns ... return result, 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) + func newServiceMetadataMiddleware_opSimulateCustomPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index 50c4edd0..af3a3fe6 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -17,30 +16,40 @@ import ( // 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 +// 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 SimulateCustomPolicyinstead. +// +// 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. +// 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 SimulateCustomPolicyinstead. +// // 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. +// 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]in the IAM User +// Guide. +// +// [Testing IAM policies with the IAM policy simulator]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html func (c *Client) SimulatePrincipalPolicy(ctx context.Context, params *SimulatePrincipalPolicyInput, optFns ...func(*Options)) (*SimulatePrincipalPolicyOutput, error) { if params == nil { params = &SimulatePrincipalPolicyInput{} @@ -69,12 +78,17 @@ type SimulatePrincipalPolicyInput struct { // 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. + // 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]. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicySourceArn *string @@ -85,14 +99,19 @@ type SimulatePrincipalPolicyInput struct { // 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. + // 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)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html CallerArn *string // A list of context keys and corresponding values for the simulation to use. @@ -108,11 +127,13 @@ type SimulatePrincipalPolicyInput 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. + // 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 @@ -122,32 +143,48 @@ type SimulatePrincipalPolicyInput struct { // 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: + // permissions boundaries, see [Permissions boundaries for IAM entities]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]. + // + // The [regex pattern] 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 ) + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html 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: + // of an IAM policy. + // + // The [regex pattern] 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 ) + // + // [regex pattern]: http://wikipedia.org/wiki/regex PolicyInputList []string // A list of ARNs of Amazon Web Services resources to include in the simulation. @@ -155,13 +192,18 @@ type SimulatePrincipalPolicyInput struct { // 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. + // 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)] in the Amazon Web Services General + // Reference. + // + // Simulation of resource-based policies isn't supported for IAM roles. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ResourceArns []string // Specifies the type of simulation to run. Different API operations that support @@ -171,19 +213,31 @@ type SimulatePrincipalPolicyInput struct { // 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 + // + // Each of the Amazon 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 + // specify that volume as a resource. If the Amazon 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 Amazon + // EC2 scenario options, see [Supported platforms]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 + // + // [Supported platforms]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html ResourceHandlingOption *string // An Amazon Web Services account ID that specifies the owner of any simulated @@ -199,26 +253,34 @@ type SimulatePrincipalPolicyInput struct { // 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: + // 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]. + // + // The [regex pattern] 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length ResourcePolicy *string noSmithyDocumentSerde } -// Contains the response to a successful SimulatePrincipalPolicy or -// SimulateCustomPolicy request. +// Contains the response to a successful SimulatePrincipalPolicy or SimulateCustomPolicy request. type SimulatePrincipalPolicyOutput struct { // The results of the simulation. @@ -264,25 +326,25 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -297,13 +359,19 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSimulatePrincipalPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimulatePrincipalPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -321,24 +389,18 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar 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. + // 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 @@ -400,6 +462,9 @@ func (p *SimulatePrincipalPolicyPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SimulatePrincipalPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -419,6 +484,14 @@ func (p *SimulatePrincipalPolicyPaginator) NextPage(ctx context.Context, optFns return result, 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) + func newServiceMetadataMiddleware_opSimulatePrincipalPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, 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 index b41a53eb..d191802e 100644 --- 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 @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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: +// 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 @@ -25,17 +25,18 @@ import ( // - 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. +// tags to control access, see [Control access using IAM tags]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. +// For more information about tagging, see [Tagging IAM resources]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. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagInstanceProfile(ctx context.Context, params *TagInstanceProfileInput, optFns ...func(*Options)) (*TagInstanceProfileOutput, error) { if params == nil { params = &TagInstanceProfileInput{} @@ -53,10 +54,13 @@ func (c *Client) TagInstanceProfile(ctx context.Context, params *TagInstanceProf 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: _+=,.@- + // The name of the IAM instance profile to which you want to add tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string @@ -99,25 +103,25 @@ func (c *Client) addOperationTagInstanceProfileMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -132,13 +136,19 @@ func (c *Client) addOperationTagInstanceProfileMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagInstanceProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagInstanceProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 1dda7dca..9a41c683 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,8 +13,10 @@ import ( // 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: +// 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 @@ -25,17 +26,18 @@ import ( // - 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. +// tags to control access, see [Control access using IAM tags]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. +// For more information about tagging, see [Tagging IAM resources]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. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagMFADevice(ctx context.Context, params *TagMFADeviceInput, optFns ...func(*Options)) (*TagMFADeviceOutput, error) { if params == nil { params = &TagMFADeviceInput{} @@ -54,10 +56,13 @@ func (c *Client) TagMFADevice(ctx context.Context, params *TagMFADeviceInput, op 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: _+=,.@- + // tags. For virtual MFA devices, the serial number is the same as the ARN. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string @@ -100,25 +105,25 @@ func (c *Client) addOperationTagMFADeviceMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -133,13 +138,19 @@ func (c *Client) addOperationTagMFADeviceMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagMFADeviceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagMFADevice(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index b2295c64..6a98eaf4 100644 --- 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 @@ -6,17 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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: +// For more information about these providers, see [About web identity federation]. 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 @@ -26,17 +26,19 @@ import ( // - 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. +// control access, see [Control access using IAM tags]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. +// For more information about tagging, see [Tagging IAM resources]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. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [About web identity federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html func (c *Client) TagOpenIDConnectProvider(ctx context.Context, params *TagOpenIDConnectProviderInput, optFns ...func(*Options)) (*TagOpenIDConnectProviderOutput, error) { if params == nil { params = &TagOpenIDConnectProviderInput{} @@ -55,10 +57,12 @@ func (c *Client) TagOpenIDConnectProvider(ctx context.Context, params *TagOpenID 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. OpenIDConnectProviderArn *string @@ -101,25 +105,25 @@ func (c *Client) addOperationTagOpenIDConnectProviderMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -134,13 +138,19 @@ func (c *Client) addOperationTagOpenIDConnectProviderMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagOpenIDConnectProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 52c57190..5a012efe 100644 --- 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 @@ -6,15 +6,15 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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 +// 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 @@ -25,17 +25,18 @@ import ( // - 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. +// to use tags to control access, see [Control access using IAM tags]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. +// For more information about tagging, see [Tagging IAM resources]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. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagPolicy(ctx context.Context, params *TagPolicyInput, optFns ...func(*Options)) (*TagPolicyOutput, error) { if params == nil { params = &TagPolicyInput{} @@ -53,10 +54,13 @@ func (c *Client) TagPolicy(ctx context.Context, params *TagPolicyInput, optFns . 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: _+=,.@- + // The ARN of the IAM customer managed policy to which you want to add tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyArn *string @@ -99,25 +103,25 @@ func (c *Client) addOperationTagPolicyMiddlewares(stack *middleware.Stack, optio if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -132,13 +136,19 @@ func (c *Client) addOperationTagPolicyMiddlewares(stack *middleware.Stack, optio if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index d3c779dd..6ed2bacc 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,8 +13,10 @@ import ( // 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: +// 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 @@ -26,23 +27,24 @@ import ( // 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. +// tags to control access, see [Control access using IAM tags]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. +// For more information about tagging, see [Tagging IAM resources]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. +// For more information about tagging, see [Tagging IAM identities] in the IAM User Guide. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [Tagging IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagRole(ctx context.Context, params *TagRoleInput, optFns ...func(*Options)) (*TagRoleOutput, error) { if params == nil { params = &TagRoleInput{} @@ -60,10 +62,13 @@ func (c *Client) TagRole(ctx context.Context, params *TagRoleInput, optFns ...fu 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: _+=,.@- + // The name of the IAM role to which you want to add tags. + // + // This parameter accepts (through its [regex pattern]) a string of characters that consist of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -106,25 +111,25 @@ func (c *Client) addOperationTagRoleMiddlewares(stack *middleware.Stack, options if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -139,13 +144,19 @@ func (c *Client) addOperationTagRoleMiddlewares(stack *middleware.Stack, options if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagRole(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 3d48b379..797d4af1 100644 --- 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 @@ -6,18 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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: +// provider. For more information about these providers, see [About SAML 2.0-based federation]. 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 @@ -27,17 +26,19 @@ import ( // - 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. +// tags to control access, see [Control access using IAM tags]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. +// For more information about tagging, see [Tagging IAM resources]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. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [About SAML 2.0-based federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagSAMLProvider(ctx context.Context, params *TagSAMLProviderInput, optFns ...func(*Options)) (*TagSAMLProviderOutput, error) { if params == nil { params = &TagSAMLProviderInput{} @@ -56,10 +57,12 @@ func (c *Client) TagSAMLProvider(ctx context.Context, params *TagSAMLProviderInp 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SAMLProviderArn *string @@ -102,25 +105,25 @@ func (c *Client) addOperationTagSAMLProviderMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -135,13 +138,19 @@ func (c *Client) addOperationTagSAMLProviderMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagSAMLProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagSAMLProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 0075e020..c23d2347 100644 --- 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 @@ -6,20 +6,21 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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: +// 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]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 @@ -29,20 +30,22 @@ import ( // - 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. +// to control access, see [Control access using IAM tags]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. +// For more information about tagging, see [Tagging IAM resources]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. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagServerCertificate(ctx context.Context, params *TagServerCertificateInput, optFns ...func(*Options)) (*TagServerCertificateOutput, error) { if params == nil { params = &TagServerCertificateInput{} @@ -60,10 +63,13 @@ func (c *Client) TagServerCertificate(ctx context.Context, params *TagServerCert 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: _+=,.@- + // The name of the IAM server certificate to which you want to add tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string @@ -106,25 +112,25 @@ func (c *Client) addOperationTagServerCertificateMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -139,13 +145,19 @@ func (c *Client) addOperationTagServerCertificateMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagServerCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagServerCertificate(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 6b9fad88..a7286044 100644 --- 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 @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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: +// 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 @@ -26,23 +26,24 @@ import ( // 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. +// how to use tags to control access, see [Control access using IAM tags]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. +// For more information about tagging, see [Tagging IAM resources]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. +// For more information about tagging, see [Tagging IAM identities] in the IAM User Guide. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [Tagging IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagUser(ctx context.Context, params *TagUserInput, optFns ...func(*Options)) (*TagUserOutput, error) { if params == nil { params = &TagUserInput{} @@ -66,10 +67,13 @@ type TagUserInput struct { // 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: _+=,.@- + // The name of the IAM user to which you want to add tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -106,25 +110,25 @@ func (c *Client) addOperationTagUserMiddlewares(stack *middleware.Stack, options if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -139,13 +143,19 @@ func (c *Client) addOperationTagUserMiddlewares(stack *middleware.Stack, options if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index fb3a8d31..37e60957 100644 --- 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 @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the 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. +// about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagInstanceProfile(ctx context.Context, params *UntagInstanceProfileInput, optFns ...func(*Options)) (*UntagInstanceProfileOutput, error) { if params == nil { params = &UntagInstanceProfileInput{} @@ -31,10 +31,13 @@ func (c *Client) UntagInstanceProfile(ctx context.Context, params *UntagInstance 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: _+=,.@- + // The name of the IAM instance profile from which you want to remove tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string @@ -77,25 +80,25 @@ func (c *Client) addOperationUntagInstanceProfileMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +113,19 @@ func (c *Client) addOperationUntagInstanceProfileMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagInstanceProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagInstanceProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 283186f7..1c69ae33 100644 --- 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 @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the 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. +// (MFA) device. For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagMFADevice(ctx context.Context, params *UntagMFADeviceInput, optFns ...func(*Options)) (*UntagMFADeviceOutput, error) { if params == nil { params = &UntagMFADeviceInput{} @@ -33,10 +33,12 @@ 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string @@ -79,25 +81,25 @@ func (c *Client) addOperationUntagMFADeviceMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -112,13 +114,19 @@ func (c *Client) addOperationUntagMFADeviceMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagMFADeviceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagMFADevice(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 497f2d7b..4797c501 100644 --- 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 @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the 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. +// identity provider in IAM. For more information about OIDC providers, see [About web identity federation]. For +// more information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [About web identity federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html func (c *Client) UntagOpenIDConnectProvider(ctx context.Context, params *UntagOpenIDConnectProviderInput, optFns ...func(*Options)) (*UntagOpenIDConnectProviderOutput, error) { if params == nil { params = &UntagOpenIDConnectProviderInput{} @@ -33,10 +33,13 @@ func (c *Client) UntagOpenIDConnectProvider(ctx context.Context, params *UntagOp 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: _+=,.@- + // The ARN of the OIDC provider in IAM from which you want to remove tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. OpenIDConnectProviderArn *string @@ -79,25 +82,25 @@ func (c *Client) addOperationUntagOpenIDConnectProviderMiddlewares(stack *middle if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -112,13 +115,19 @@ func (c *Client) addOperationUntagOpenIDConnectProviderMiddlewares(stack *middle if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagOpenIDConnectProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 0acfebd8..5e2f2252 100644 --- 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 @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the 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. +// information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagPolicy(ctx context.Context, params *UntagPolicyInput, optFns ...func(*Options)) (*UntagPolicyOutput, error) { if params == nil { params = &UntagPolicyInput{} @@ -32,10 +32,12 @@ func (c *Client) UntagPolicy(ctx context.Context, params *UntagPolicyInput, optF 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 parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyArn *string @@ -78,25 +80,25 @@ func (c *Client) addOperationUntagPolicyMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -111,13 +113,19 @@ func (c *Client) addOperationUntagPolicyMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 7b8ddd6f..ce486e00 100644 --- 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 @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the 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. +// see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagRole(ctx context.Context, params *UntagRoleInput, optFns ...func(*Options)) (*UntagRoleOutput, error) { if params == nil { params = &UntagRoleInput{} @@ -31,10 +31,13 @@ func (c *Client) UntagRole(ctx context.Context, params *UntagRoleInput, optFns . 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: _+=,.@- + // The name of the IAM role from which you want to remove tags. + // + // This parameter accepts (through its [regex pattern]) a string of characters that consist of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -77,25 +80,25 @@ func (c *Client) addOperationUntagRoleMiddlewares(stack *middleware.Stack, optio if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +113,19 @@ func (c *Client) addOperationUntagRoleMiddlewares(stack *middleware.Stack, optio if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagRole(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 59be689c..bbd0d11e 100644 --- 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 @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the 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. +// providers, see [About web identity federation]. For more information about tagging, see [Tagging IAM resources] in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [About web identity federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html func (c *Client) UntagSAMLProvider(ctx context.Context, params *UntagSAMLProviderInput, optFns ...func(*Options)) (*UntagSAMLProviderOutput, error) { if params == nil { params = &UntagSAMLProviderInput{} @@ -33,11 +33,13 @@ func (c *Client) UntagSAMLProvider(ctx context.Context, params *UntagSAMLProvide 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: - // _+=,.@- + // The ARN of the SAML identity provider in IAM from which you want to remove tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SAMLProviderArn *string @@ -80,25 +82,25 @@ func (c *Client) addOperationUntagSAMLProviderMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +115,19 @@ func (c *Client) addOperationUntagSAMLProviderMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagSAMLProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagSAMLProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index d5463a89..f0b2edcf 100644 --- 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 @@ -6,18 +6,20 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the 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. +// information about tagging, see [Tagging IAM resources]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]in the IAM User Guide. +// +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagServerCertificate(ctx context.Context, params *UntagServerCertificateInput, optFns ...func(*Options)) (*UntagServerCertificateOutput, error) { if params == nil { params = &UntagServerCertificateInput{} @@ -35,10 +37,13 @@ func (c *Client) UntagServerCertificate(ctx context.Context, params *UntagServer 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: _+=,.@- + // The name of the IAM server certificate from which you want to remove tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string @@ -81,25 +86,25 @@ func (c *Client) addOperationUntagServerCertificateMiddlewares(stack *middleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +119,19 @@ func (c *Client) addOperationUntagServerCertificateMiddlewares(stack *middleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagServerCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagServerCertificate(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 60926951..718b9d30 100644 --- 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 @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the 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. +// see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagUser(ctx context.Context, params *UntagUserInput, optFns ...func(*Options)) (*UntagUserOutput, error) { if params == nil { params = &UntagUserInput{} @@ -37,10 +37,13 @@ type UntagUserInput struct { // 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: _+=,.@- + // The name of the IAM user from which you want to remove tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -77,25 +80,25 @@ func (c *Client) addOperationUntagUserMiddlewares(stack *middleware.Stack, optio if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +113,19 @@ func (c *Client) addOperationUntagUserMiddlewares(stack *middleware.Stack, optio if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index b38391fb..20bab543 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,15 +13,19 @@ import ( // 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. +// 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] in the IAM User Guide. +// +// [Managing keys and certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html func (c *Client) UpdateAccessKey(ctx context.Context, params *UpdateAccessKeyInput, optFns ...func(*Options)) (*UpdateAccessKeyOutput, error) { if params == nil { params = &UpdateAccessKeyInput{} @@ -40,24 +43,30 @@ func (c *Client) UpdateAccessKey(ctx context.Context, params *UpdateAccessKeyInp 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. + // The access key ID of the secret access key you want to update. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccessKeyId *string - // The status you want to assign to the secret access key. Active means that the + // 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: _+=,.@- + // The name of the user whose key you want to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -92,25 +101,25 @@ func (c *Client) addOperationUpdateAccessKeyMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -125,13 +134,19 @@ func (c *Client) addOperationUpdateAccessKeyMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccessKeyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccessKey(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 0d3e26a5..b386b6ea 100644 --- 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 @@ -6,20 +6,22 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// 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 +// 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. +// parameter when you invoke the operation. +// +// For more information about using a password policy, see [Managing an IAM password policy] in the IAM User Guide. +// +// [Managing an IAM password policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html func (c *Client) UpdateAccountPasswordPolicy(ctx context.Context, params *UpdateAccountPasswordPolicyInput, optFns ...func(*Options)) (*UpdateAccountPasswordPolicyOutput, error) { if params == nil { params = &UpdateAccountPasswordPolicyInput{} @@ -37,22 +39,28 @@ func (c *Client) UpdateAccountPasswordPolicy(ctx context.Context, params *Update 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. + // 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]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. + // + // [Permitting IAM users to change their own passwords]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_enable-user-change.html AllowUsersToChangePassword bool - // Prevents IAM users who are accessing the account via the Amazon Web Services + // 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 + // 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 @@ -60,45 +68,58 @@ type UpdateAccountPasswordPolicyInput struct { // 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. + // 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 . + // 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. + // 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. + // 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. + // 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. + // 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. + // 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 @@ -133,25 +154,25 @@ func (c *Client) addOperationUpdateAccountPasswordPolicyMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -166,10 +187,16 @@ func (c *Client) addOperationUpdateAccountPasswordPolicyMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountPasswordPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index ab5dff05..d02c0d85 100644 --- 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 @@ -6,15 +6,15 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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) -// . +// roles, see [Using roles to delegate permissions and federate identities]. +// +// [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{} @@ -32,26 +32,37 @@ func (c *Client) UpdateAssumeRolePolicy(ctx context.Context, params *UpdateAssum 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. + // 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: + // to IAM. + // + // The [regex pattern] 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 ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // 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: _+=,.@- + // The name of the role to update with the new policy. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -88,25 +99,25 @@ func (c *Client) addOperationUpdateAssumeRolePolicyMiddlewares(stack *middleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -121,13 +132,19 @@ func (c *Client) addOperationUpdateAssumeRolePolicyMiddlewares(stack *middleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssumeRolePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAssumeRolePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index bf86977e..a5ca9f0b 100644 --- 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 @@ -6,21 +6,24 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// 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) -// . +// 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]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]. +// +// [Access management]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html +// [Renaming users and groups]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html func (c *Client) UpdateGroup(ctx context.Context, params *UpdateGroupInput, optFns ...func(*Options)) (*UpdateGroupOutput, error) { if params == nil { params = &UpdateGroupInput{} @@ -39,26 +42,33 @@ func (c *Client) UpdateGroup(ctx context.Context, params *UpdateGroupInput, optF 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: - // _+=,.@- + // is the original name. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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". + // 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. + // + // This parameter allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex NewPath *string noSmithyDocumentSerde @@ -93,25 +103,25 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -126,13 +136,19 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGroup(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 51c69d2e..406fa0a4 100644 --- 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 @@ -6,17 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. +// password for any IAM user. Use ChangePasswordto 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] in the IAM User Guide. +// +// [Managing passwords]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html func (c *Client) UpdateLoginProfile(ctx context.Context, params *UpdateLoginProfileInput, optFns ...func(*Options)) (*UpdateLoginProfileOutput, error) { if params == nil { params = &UpdateLoginProfileInput{} @@ -34,26 +35,36 @@ func (c *Client) UpdateLoginProfile(ctx context.Context, params *UpdateLoginProf 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: _+=,.@- + // The name of the user whose password you want to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: + // The new password for the specified IAM user. + // + // The [regex pattern] 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 . + // information, see UpdateAccountPasswordPolicy. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Password *string // Allows this new password to be used only once by requiring the specified IAM @@ -92,25 +103,25 @@ func (c *Client) addOperationUpdateLoginProfileMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -125,13 +136,19 @@ func (c *Client) addOperationUpdateLoginProfileMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLoginProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLoginProfile(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index a36c4bba..d4c8aa62 100644 --- 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 @@ -6,28 +6,30 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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. These OIDC IdPs include Auth0, GitHub, -// Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) -// endpoint. In these cases, your legacy thumbprint remains in your configuration, -// but is no longer used for validation. 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. +// +// 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 OIDC identity providers (IdPs) +// using our library of trusted root certificate authorities (CAs) to verify the +// JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP relies on a +// certificate that is not signed by one of these trusted CAs, only then we secure +// communication using the thumbprints set in the IdP's configuration. +// +// 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{} @@ -47,15 +49,18 @@ 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. + // ARNs by using the ListOpenIDConnectProvidersoperation. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // 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 . + // OpenID Connect provider. For more information, see CreateOpenIDConnectProvider. // // This member is required. ThumbprintList []string @@ -92,25 +97,25 @@ func (c *Client) addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares(st if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -125,13 +130,19 @@ func (c *Client) addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares(st if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOpenIDConnectProviderThumbprintValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOpenIDConnectProviderThumbprint(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index bae60803..ce439ad0 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -40,16 +39,22 @@ type UpdateRoleInput struct { // 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. + // 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]in the IAM User + // Guide. + // + // IAM role credentials provided by Amazon EC2 instances assigned to the role are + // not subject to the specified maximum session duration. + // + // [Using IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html MaxSessionDuration *int32 noSmithyDocumentSerde @@ -84,25 +89,25 @@ func (c *Client) addOperationUpdateRoleMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +122,19 @@ func (c *Client) addOperationUpdateRoleMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRole(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 09fd1c79..afff26bb 100644 --- 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 @@ -6,15 +6,15 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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{} @@ -78,25 +78,25 @@ func (c *Client) addOperationUpdateRoleDescriptionMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -111,13 +111,19 @@ func (c *Client) addOperationUpdateRoleDescriptionMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoleDescriptionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRoleDescription(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 8dfacee0..a7e71354 100644 --- 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 @@ -6,14 +6,15 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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) -// . +// +// This operation requires [Signature Version 4]. +// +// [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{} @@ -40,9 +41,12 @@ type UpdateSAMLProviderInput struct { // 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. + // The Amazon Resource Name (ARN) of the SAML provider to update. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. SAMLProviderArn *string @@ -84,25 +88,25 @@ func (c *Client) addOperationUpdateSAMLProviderMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +121,19 @@ func (c *Client) addOperationUpdateSAMLProviderMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSAMLProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSAMLProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 8b556ac5..eee0fd49 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,11 +14,14 @@ import ( // 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. +// 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]in the +// CodeCommit User Guide. +// +// [Set up CodeCommit for SSH connections]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html func (c *Client) UpdateSSHPublicKey(ctx context.Context, params *UpdateSSHPublicKeyInput, optFns ...func(*Options)) (*UpdateSSHPublicKeyOutput, error) { if params == nil { params = &UpdateSSHPublicKeyInput{} @@ -37,9 +39,12 @@ func (c *Client) UpdateSSHPublicKey(ctx context.Context, params *UpdateSSHPublic 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. + // The unique identifier for the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SSHPublicKeyId *string @@ -51,10 +56,13 @@ type UpdateSSHPublicKeyInput struct { // 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: _+=,.@- + // The name of the IAM user associated with the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -91,25 +99,25 @@ func (c *Client) addOperationUpdateSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -124,13 +132,19 @@ func (c *Client) addOperationUpdateSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSSHPublicKeyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSSHPublicKey(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 9f0365e7..587c2332 100644 --- 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 @@ -6,26 +6,31 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // 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) +// IAM. +// +// For more information about working with server certificates, see [Working with server certificates] 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]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] // in the IAM User Guide. +// +// [Renaming a server certificate]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#RenamingServerCerts +// [Access management]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html func (c *Client) UpdateServerCertificate(ctx context.Context, params *UpdateServerCertificateInput, optFns ...func(*Options)) (*UpdateServerCertificateOutput, error) { if params == nil { params = &UpdateServerCertificateInput{} @@ -43,28 +48,38 @@ func (c *Client) UpdateServerCertificate(ctx context.Context, params *UpdateServ 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: _+=,.@- + // The name of the server certificate that you want to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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. + // the server certificate's path. + // + // This parameter allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex 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: - // _+=,.@- + // spaces. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex NewServerCertificateName *string noSmithyDocumentSerde @@ -99,25 +114,25 @@ func (c *Client) addOperationUpdateServerCertificateMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -132,13 +147,19 @@ func (c *Client) addOperationUpdateServerCertificateMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServerCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServerCertificate(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 3bf4c4bc..251aa831 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -33,9 +32,12 @@ func (c *Client) UpdateServiceSpecificCredential(ctx context.Context, params *Up 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. + // The unique identifier of the service-specific credential. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServiceSpecificCredentialId *string @@ -47,10 +49,13 @@ type UpdateServiceSpecificCredentialInput struct { // 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: _+=,.@- + // credentials are used to call the operation. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -85,25 +90,25 @@ func (c *Client) addOperationUpdateServiceSpecificCredentialMiddlewares(stack *m if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -118,13 +123,19 @@ func (c *Client) addOperationUpdateServiceSpecificCredentialMiddlewares(stack *m if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServiceSpecificCredential(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 6f0510f9..7f670417 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,12 +13,14 @@ import ( // 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. +// 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{} @@ -37,24 +38,30 @@ func (c *Client) UpdateSigningCertificate(ctx context.Context, params *UpdateSig 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. + // The ID of the signing certificate you want to update. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. CertificateId *string - // The status you want to assign to the certificate. Active means that the + // 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: _+=,.@- + // The name of the IAM user the signing certificate belongs to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -89,25 +96,25 @@ func (c *Client) addOperationUpdateSigningCertificateMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +129,19 @@ func (c *Client) addOperationUpdateSigningCertificateMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSigningCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSigningCertificate(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index cb7f6387..fc494f2f 100644 --- 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 @@ -6,21 +6,23 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// 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) -// . +// 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]and [Renaming an IAM group] 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]. +// +// [Renaming an IAM user]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_renaming +// [Renaming an IAM group]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_rename.html +// [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{} @@ -39,26 +41,35 @@ func (c *Client) UpdateUser(ctx context.Context, params *UpdateUserInput, optFns 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: - // _+=,.@- + // the original user name. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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. + // user's path. + // + // This parameter allows (through its [regex pattern]) 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. + // + // [regex pattern]: http://wikipedia.org/wiki/regex 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". + // 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 @@ -93,25 +104,25 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -126,13 +137,19 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 65cb8c52..f15c7265 100644 --- 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 @@ -6,18 +6,19 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/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. +// 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]in the CodeCommit User Guide. +// +// [Set up CodeCommit for SSH connections]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html func (c *Client) UploadSSHPublicKey(ctx context.Context, params *UploadSSHPublicKeyInput, optFns ...func(*Options)) (*UploadSSHPublicKeyOutput, error) { if params == nil { params = &UploadSSHPublicKeyInput{} @@ -37,23 +38,32 @@ 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: + // can generate a 2048-bit key, and the resulting PEM file is 1679 bytes long. + // + // The [regex pattern] 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 ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // 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: _+=,.@- + // The name of the IAM user to associate the SSH public key with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -95,25 +105,25 @@ func (c *Client) addOperationUploadSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -128,13 +138,19 @@ func (c *Client) addOperationUploadSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadSSHPublicKeyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadSSHPublicKey(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 62778306..c3a9eb09 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,26 +13,34 @@ import ( // 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. +// an optional certificate chain, which should all be PEM-encoded. +// +// We recommend that you use [Certificate Manager] 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]. +// +// For more information about working with server certificates, see [Working with server certificates] 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] 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]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]in +// the IAM User Guide. +// +// [Certificate Manager]: https://docs.aws.amazon.com/acm/ +// [Certificate Manager User Guide]: https://docs.aws.amazon.com/acm/latest/userguide/ +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [Signing Amazon Web Services API requests]: https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html +// [Calling the API by making HTTP query requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/programming.html func (c *Client) UploadServerCertificate(ctx context.Context, params *UploadServerCertificateInput, optFns ...func(*Options)) (*UploadServerCertificateOutput, error) { if params == nil { params = &UploadServerCertificateInput{} @@ -51,73 +58,101 @@ func (c *Client) UploadServerCertificate(ctx context.Context, params *UploadServ 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: + // The contents of the public key certificate in PEM-encoded format. + // + // The [regex pattern] 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 ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // 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: + // The contents of the private key in PEM-encoded format. + // + // The [regex pattern] 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 ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // 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: _+=,.@- + // name of the certificate cannot contain any spaces. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // 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: + // PEM-encoded public key certificates of the chain. + // + // The [regex pattern] 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 ) + // + // [regex pattern]: http://wikipedia.org/wiki/regex 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. + // The path for the server certificate. For more information about paths, see [IAM identifiers] 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]) 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/ ). + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html + // [regex pattern]: http://wikipedia.org/wiki/regex 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. + // information about tagging, see [Tagging IAM resources]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. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -132,8 +167,9 @@ type UploadServerCertificateOutput struct { // 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. + // see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // Metadata pertaining to the operation's result. @@ -164,25 +200,25 @@ func (c *Client) addOperationUploadServerCertificateMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -197,13 +233,19 @@ func (c *Client) addOperationUploadServerCertificateMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadServerCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadServerCertificate(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 00ae6ec4..db7f07b5 100644 --- 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 @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,21 +14,27 @@ import ( // 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. +// 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] 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]in the Amazon Web +// Services General Reference. For general information about using the Query API +// with IAM, see [Making query requests]in the IAM User Guide. +// +// [Managing server certificates in IAM]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [Making query requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html +// [Signing Amazon Web Services API requests]: https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html func (c *Client) UploadSigningCertificate(ctx context.Context, params *UploadSigningCertificateInput, optFns ...func(*Options)) (*UploadSigningCertificateOutput, error) { if params == nil { params = &UploadSigningCertificateInput{} @@ -47,23 +52,32 @@ func (c *Client) UploadSigningCertificate(ctx context.Context, params *UploadSig 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: + // The contents of the signing certificate. + // + // The [regex pattern] 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 ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // 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: _+=,.@- + // The name of the user the signing certificate is for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -105,25 +119,25 @@ func (c *Client) addOperationUploadSigningCertificateMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -138,13 +152,19 @@ func (c *Client) addOperationUploadSigningCertificateMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadSigningCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadSigningCertificate(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { 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 index 143895f4..27aaba12 100644 --- 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 @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { params.Region = options.Region } @@ -52,6 +52,34 @@ 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 { @@ -62,12 +90,12 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(params, input, options) + bindAuthParamsRegion(ctx, params, input, options) return params } @@ -117,10 +145,10 @@ func (*resolveAuthSchemeMiddleware) ID() string { 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) + params := bindAuthResolverParams(ctx, 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: %v", err) + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) } scheme, ok := m.selectScheme(options) @@ -200,7 +228,7 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) if err != nil { - return out, metadata, fmt.Errorf("get identity: %v", err) + return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) @@ -249,7 +277,7 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar } if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { - return out, metadata, fmt.Errorf("sign request: %v", err) + 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 index 93813d5b..4f310b77 100644 --- 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 @@ -22,8 +22,17 @@ import ( "io/ioutil" "strconv" "strings" + "time" ) +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + type awsAwsquery_deserializeOpAddClientIDToOpenIDConnectProvider struct { } @@ -1276,6 +1285,9 @@ func awsAwsquery_deserializeOpErrorCreateOpenIDConnectProvider(response *smithyh case strings.EqualFold("LimitExceeded", errorCode): return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("OpenIdIdpCommunicationError", errorCode): + return awsAwsquery_deserializeErrorOpenIdIdpCommunicationErrorException(response, errorBody) + case strings.EqualFold("ServiceFailure", errorCode): return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) @@ -16554,6 +16566,50 @@ func awsAwsquery_deserializeErrorNoSuchEntityException(response *smithyhttp.Resp return output } +func awsAwsquery_deserializeErrorOpenIdIdpCommunicationErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OpenIdIdpCommunicationErrorException{} + 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_deserializeDocumentOpenIdIdpCommunicationErrorException(&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 @@ -21035,6 +21091,55 @@ func awsAwsquery_deserializeDocumentOpenIDConnectProviderListTypeUnwrapped(v *[] *v = sv return nil } +func awsAwsquery_deserializeDocumentOpenIdIdpCommunicationErrorException(v **types.OpenIdIdpCommunicationErrorException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OpenIdIdpCommunicationErrorException + if *v == nil { + sv = &types.OpenIdIdpCommunicationErrorException{} + } 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_deserializeDocumentOrganizationsDecisionDetail(v **types.OrganizationsDecisionDetail, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) 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 index c849c3b7..68383bba 100644 --- 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 @@ -3,12 +3,14 @@ // 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/) -// . +// # 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)]and the [Identity and Access Management User Guide]. +// +// [Identity and Access Management User Guide]: https://docs.aws.amazon.com/IAM/latest/UserGuide/ +// [Identity and Access Management (IAM)]: http://aws.amazon.com/iam/ 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 index 63c2b352..3c0775b8 100644 --- 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 @@ -217,6 +217,13 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) { } } +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 { @@ -282,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, @@ -746,10 +764,10 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} - params.Region = aws.String(endpoints.MapFIPSRegion(options.Region)) + 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 @@ -776,6 +794,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return next.HandleFinalize(ctx, in) } + if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { + return out, metadata, fmt.Errorf("invalid accountID set: %w", err) + } + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -785,7 +807,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(getOperationInput(ctx), m.options) + params := bindEndpointParams(ctx, 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) 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 index ef4b1d51..26ce6bfc 100644 --- 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 @@ -3,8 +3,7 @@ "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", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", @@ -180,6 +179,7 @@ "options.go", "protocol_test.go", "serializers.go", + "snapshot_test.go", "types/enums.go", "types/errors.go", "types/types.go", 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 index 0e973666..5bbda923 100644 --- 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 @@ -3,4 +3,4 @@ package iam // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.27.3" +const goModuleVersion = "1.35.0" 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 index 2861cb10..e4abdd7c 100644 --- 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 @@ -24,6 +24,9 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error + // Indicates how aws account ID is applied in endpoint2.0 routing + AccountIDEndpointMode aws.AccountIDEndpointMode + // The optional application specific identifier appended to the User-Agent header. AppID string @@ -50,8 +53,10 @@ type Options struct { // 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. + // 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 @@ -70,19 +75,20 @@ type Options struct { // 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. 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. 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. + // 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. + // 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 @@ -99,8 +105,9 @@ type Options struct { // 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. + // 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 @@ -145,6 +152,7 @@ func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { // 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) { @@ -213,7 +221,7 @@ func WithSigV4SigningRegion(region string) func(*Options) { } func ignoreAnonymousAuth(options *Options) { - if _, ok := options.Credentials.(aws.AnonymousCredentials); ok { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { options.Credentials = 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 index 0100b4f3..cc0dc2e0 100644 --- 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 @@ -12,8 +12,9 @@ const ( // 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. +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. func (AccessAdvisorUsageGranularityType) Values() []AccessAdvisorUsageGranularityType { return []AccessAdvisorUsageGranularityType{ "SERVICE_LEVEL", @@ -31,8 +32,9 @@ const ( ) // 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. +// 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", @@ -60,8 +62,9 @@ const ( ) // 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. +// 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", @@ -90,8 +93,9 @@ const ( ) // 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. +// 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", @@ -110,8 +114,9 @@ const ( ) // 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. +// 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", @@ -131,8 +136,9 @@ const ( ) // 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. +// 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", @@ -153,6 +159,7 @@ const ( // 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{ @@ -171,8 +178,9 @@ const ( ) // 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. +// 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", @@ -190,8 +198,9 @@ const ( // 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. +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. func (PermissionsBoundaryAttachmentType) Values() []PermissionsBoundaryAttachmentType { return []PermissionsBoundaryAttachmentType{ "PermissionsBoundaryPolicy", @@ -209,8 +218,9 @@ const ( // 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. +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. func (PolicyEvaluationDecisionType) Values() []PolicyEvaluationDecisionType { return []PolicyEvaluationDecisionType{ "allowed", @@ -229,8 +239,9 @@ const ( ) // 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. +// 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", @@ -249,8 +260,9 @@ const ( ) // 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. +// 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", @@ -273,8 +285,9 @@ const ( ) // 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. +// 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", @@ -296,8 +309,9 @@ const ( ) // 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. +// 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", @@ -314,8 +328,9 @@ const ( ) // 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. +// 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", @@ -331,8 +346,9 @@ const ( ) // 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. +// 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", @@ -349,8 +365,9 @@ const ( ) // 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. +// 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", @@ -370,8 +387,9 @@ const ( ) // 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. +// 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", @@ -390,8 +408,9 @@ const ( ) // 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. +// 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", @@ -432,8 +451,9 @@ const ( ) // 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. +// 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", 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 index cf3ad6a2..1fc1d63b 100644 --- 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 @@ -35,9 +35,10 @@ func (e *ConcurrentModificationException) ErrorCode() string { 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. +// To generate a new credential report, use GenerateCredentialReport. For more information about +// credential report expiration, see [Getting credential reports]in the IAM User Guide. +// +// [Getting credential reports]: https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html type CredentialReportExpiredException struct { Message *string @@ -64,7 +65,7 @@ func (e *CredentialReportExpiredException) ErrorCode() string { 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 . +// generate a credential report, use GenerateCredentialReport. type CredentialReportNotPresentException struct { Message *string @@ -529,6 +530,35 @@ func (e *NoSuchEntityException) ErrorCode() string { } func (e *NoSuchEntityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The request failed because IAM cannot connect to the OpenID Connect identity +// provider URL. +type OpenIdIdpCommunicationErrorException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpenIdIdpCommunicationErrorException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpenIdIdpCommunicationErrorException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpenIdIdpCommunicationErrorException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpenIdIdpCommunicationError" + } + return *e.ErrorCodeOverride +} +func (e *OpenIdIdpCommunicationErrorException) 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 { 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 index 5de4fb10..e3798d88 100644 --- 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 @@ -10,8 +10,9 @@ import ( // 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. +// 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. @@ -19,38 +20,47 @@ type AccessDetail struct { // 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. + // 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] 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]in the Amazon Web Services + // General Reference. + // + // [Amazon Web Services service namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces + // [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 // // 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) - // . + // 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]. + // + // [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) - // . + // The date and time, in [ISO 8601 date-time format], 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]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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) - // . + // 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]. + // + // [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 @@ -60,12 +70,14 @@ type AccessDetail struct { 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. +// 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. @@ -96,50 +108,62 @@ type AccessKey struct { } // 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. +// 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. + // + // For more information about Amazon Web Services Regions, see [Regions and endpoints] in the Amazon Web + // Services General Reference. + // + // [Regions and endpoints]: https://docs.aws.amazon.com/general/latest/gr/rande.html // // 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 + // The date and time, in [ISO 8601 date-time format], 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. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 + LastUsedDate *time.Time + 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. +// secret key. +// +// This data type is used as a response element in the ListAccessKeys operation. type AccessKeyMetadata struct { // The ID for this access key. @@ -158,37 +182,46 @@ type AccessKeyMetadata struct { 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. +// 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] in the IAM User Guide. +// +// [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html type AttachedPermissionsBoundary struct { - // The ARN of the policy used to set the permissions boundary for the user or role. + // 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 . + // 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html 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. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html PolicyArn *string // The friendly name of the attached policy. @@ -200,8 +233,9 @@ type AttachedPolicy struct { // 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 . +// 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 @@ -220,8 +254,9 @@ type ContextEntry struct { noSmithyDocumentSerde } -// The reason that the service-linked role deletion failed. This data type is used -// as a response element in the GetServiceLinkedRoleDeletionStatus operation. +// 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. @@ -240,8 +275,9 @@ type DeletionTaskFailureReasonType struct { // 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. +// 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). @@ -249,24 +285,32 @@ type EntityDetails struct { // 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) - // . + // The date and time, in [ISO 8601 date-time format], 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]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 LastAuthenticated *time.Time noSmithyDocumentSerde } -// Contains details about the specified entity (user or role). This data type is -// an element of the EntityDetails object. +// 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. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. Arn *string @@ -286,18 +330,18 @@ type EntityInfo struct { // 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) + // The path to the entity (user or role). For more information about paths, see [IAM identifiers] // in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 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. +// 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. @@ -313,8 +357,9 @@ type ErrorDetails struct { noSmithyDocumentSerde } -// Contains the results of a simulation. This data type is used by the return -// parameter of SimulateCustomPolicy and SimulatePrincipalPolicy . +// 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. @@ -330,17 +375,23 @@ type EvaluationResult struct { // 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 + // 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]. + // + // 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. + // + // [Evaluating policies within a single account]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics EvalDecisionDetails map[string]PolicyEvaluationDecisionType // The ARN of the resource that the indicated API operation was tested on. @@ -358,8 +409,7 @@ type EvaluationResult struct { // 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 . + // discover the context keys used by a set of policies, you can call GetContextKeysForCustomPolicyor GetContextKeysForPrincipalPolicy. MissingContextValues []string // A structure that details how Organizations and its service control policies @@ -378,29 +428,36 @@ type EvaluationResult struct { noSmithyDocumentSerde } -// Contains information about an IAM group entity. This data type is used as a -// response element in the following operations: -// - CreateGroup -// - GetGroup -// - ListGroups +// 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. + // The Amazon Resource Name (ARN) specifying the group. For more information + // about ARNs and how to use them in policies, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // 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. + // The date and time, in [ISO 8601 date-time format], when the group was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // 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. + // The stable and unique string identifying the group. For more information about + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. GroupId *string @@ -410,8 +467,10 @@ type Group struct { // 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. + // The path to the group. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Path *string @@ -420,26 +479,31 @@ type Group struct { } // 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. +// +// 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. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html 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. + // The date and time, in [ISO 8601 date-time format], when the group was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html GroupId *string // The friendly name that identifies the group. @@ -448,24 +512,33 @@ type GroupDetail struct { // 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. + // The path to the group. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 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 +// 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. + // The Amazon Resource Name (ARN) specifying the instance profile. For more + // information about ARNs and how to use them in policies, see [IAM identifiers]in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Arn *string @@ -475,9 +548,10 @@ type InstanceProfile struct { // 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. + // The stable and unique string identifying the instance profile. For more + // information about IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. InstanceProfileId *string @@ -487,9 +561,10 @@ type InstanceProfile struct { // 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. + // The path to the instance profile. For more information about paths, see [IAM identifiers] in + // the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Path *string @@ -500,37 +575,41 @@ type InstanceProfile struct { 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. + // about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html 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. +// 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. + // 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] 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]in the Amazon Web Services + // General Reference. + // + // [Amazon Web Services service namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces + // [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 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. +// 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. @@ -552,30 +631,39 @@ type LoginProfile struct { // 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html 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. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html 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. + // The date and time, in [ISO 8601 date-time format], when the policy was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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. + // (operative) version. + // + // For more information about policy versions, see [Versioning for managed policies] in the IAM User Guide. + // + // [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html DefaultVersionId *string // A friendly description of the policy. @@ -584,19 +672,26 @@ type ManagedPolicyDetail struct { // 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. + // The path to the policy. + // + // For more information about paths, see [IAM identifiers] in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 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. + // permissions boundary. + // + // For more information about permissions boundaries, see [Permissions boundaries for IAM identities] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html 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. + // The stable and unique string identifying the policy. + // + // For more information about IDs, see [IAM identifiers] in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html PolicyId *string // The friendly name (not ARN) identifying the policy. @@ -605,18 +700,21 @@ type ManagedPolicyDetail struct { // 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. + // The date and time, in [ISO 8601 date-time format], 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. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 UpdateDate *time.Time noSmithyDocumentSerde } -// Contains information about an MFA device. This data type is used as a response -// element in the ListMFADevices operation. +// 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. @@ -642,9 +740,12 @@ type MFADevice struct { 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. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Arn *string noSmithyDocumentSerde @@ -661,8 +762,9 @@ type OrganizationsDecisionDetail struct { noSmithyDocumentSerde } -// Contains information about the account password policy. This data type is used -// as a response element in the GetAccountPasswordPolicy operation. +// 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 @@ -703,7 +805,9 @@ type PasswordPolicy struct { RequireNumbers bool // Specifies whether IAM user passwords must contain at least one of the following - // symbols: ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' + // symbols: + // + // ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' RequireSymbols bool // Specifies whether IAM user passwords must contain at least one uppercase @@ -730,74 +834,91 @@ type PermissionsBoundaryDecisionDetail struct { 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html 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. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html 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. + // The date and time, in [ISO 8601 date-time format], when the policy was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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. + // 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 ListPoliciesoperation. 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. + // The path to the policy. + // + // For more information about paths, see [IAM identifiers] in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 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. + // the permissions boundary. + // + // For more information about permissions boundaries, see [Permissions boundaries for IAM identities] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html 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. + // The stable and unique string identifying the policy. + // + // For more information about IDs, see [IAM identifiers] in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 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. + // about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html 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. + // The date and time, in [ISO 8601 date-time format], 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. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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. +// 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. @@ -810,8 +931,9 @@ type PolicyDetail struct { } // 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. +// specified identity (user, group, or role). +// +// This data type is an element of the ListPoliciesGrantingServiceAccessEntry object. type PolicyGrantingServiceAccess struct { // The policy name. @@ -819,45 +941,56 @@ type PolicyGrantingServiceAccess struct { // 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. + // The policy type. For more information about these policy types, see [Managed policies and inline policies] in the IAM + // User Guide. + // + // [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html // // 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. + // + // This field is null for managed policies. For more information about these + // policy types, see [Managed policies and inline policies]in the IAM User Guide. + // + // [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html 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. + // 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]in the IAM User Guide. + // + // [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html 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. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html 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. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html GroupId *string // The name (friendly name, not ARN) identifying the group. @@ -866,16 +999,19 @@ type PolicyGroup struct { 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html 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. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html RoleId *string // The name (friendly name, not ARN) identifying the role. @@ -884,16 +1020,19 @@ type PolicyRole struct { 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html 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. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html UserId *string // The name (friendly name, not ARN) identifying the user. @@ -902,42 +1041,50 @@ type PolicyUser struct { 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. +// 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] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html 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. + // The date and time, in [ISO 8601 date-time format], when the policy version was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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. + // 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 CreatePolicyVersionor ListPolicyVersions operations. + // + // The policy document returned in this structure is URL-encoded compliant with [RFC 3986]. + // 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. + // + // [RFC 3986]: https://tools.ietf.org/html/rfc3986 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 . + // 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. +// 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. @@ -950,8 +1097,9 @@ type Position struct { } // 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. +// 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 @@ -984,8 +1132,7 @@ type ResourceSpecificResult struct { // 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 . + // keys used by a set of policies, you can call GetContextKeysForCustomPolicyor GetContextKeysForPrincipalPolicy. MissingContextValues []string // Contains information about the effect that a permissions boundary has on a @@ -999,28 +1146,33 @@ type ResourceSpecificResult struct { // 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. + // The Amazon Resource Name (ARN) specifying the role. For more information about + // ARNs and how to use them in policies, see [IAM identifiers]in the IAM User Guide guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // 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. + // The date and time, in [ISO 8601 date-time format], when the role was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // 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. + // The path to the role. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // 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. + // The stable and unique string identifying the role. For more information about + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. RoleId *string @@ -1041,38 +1193,44 @@ type Role struct { // 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. + // 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] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html 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. + // might have been used more than 400 days ago. For more information, see [Regions where data is tracked]in the + // IAM user Guide. + // + // [Regions where data is tracked]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period 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. + // tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html 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. +// +// 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. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Arn *string // The trust policy that grants permission to assume the role. @@ -1082,35 +1240,41 @@ type RoleDetail struct { // 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. + // The date and time, in [ISO 8601 date-time format], when the role was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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. + // The path to the role. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 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. + // 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] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html 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. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 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. + // might have been used more than 400 days ago. For more information, see [Regions where data is tracked]in the + // IAM User Guide. + // + // [Regions where data is tracked]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period RoleLastUsed *RoleLastUsed // The friendly name that identifies the role. @@ -1121,8 +1285,9 @@ type RoleDetail struct { 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. + // tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []Tag noSmithyDocumentSerde @@ -1132,17 +1297,22 @@ type RoleDetail struct { // 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. +// might have been used more than 400 days ago. For more information, see [Regions where data is tracked]in the +// IAM user Guide. +// +// This data type is returned as a response element in the GetRole and GetAccountAuthorizationDetails operations. +// +// [Regions where data is tracked]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period 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. + // The date and time, in [ISO 8601 date-time format] 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]in the IAM User + // Guide. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 + // [Regions where data is tracked]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period LastUsedDate *time.Time // The name of the Amazon Web Services Region in which the role was last used. @@ -1152,8 +1322,9 @@ type RoleLastUsed struct { } // 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. +// 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. @@ -1180,8 +1351,9 @@ type SAMLProviderListEntry struct { noSmithyDocumentSerde } -// Contains information about a server certificate. This data type is used as a -// response element in the GetServerCertificate operation. +// 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. @@ -1199,35 +1371,41 @@ type ServerCertificate struct { 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. + // information about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html 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. +// 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. + // The Amazon Resource Name (ARN) specifying the server certificate. For more + // information about ARNs and how to use them in policies, see [IAM identifiers]in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // 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. + // The path to the server certificate. For more information about paths, see [IAM identifiers] in + // the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // 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. + // The stable and unique string identifying the server certificate. For more + // information about IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. ServerCertificateId *string @@ -1246,9 +1424,9 @@ type ServerCertificateMetadata struct { 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. +// 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. @@ -1256,52 +1434,68 @@ type ServiceLastAccessed struct { // 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. + // 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] 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]in the Amazon Web Services + // General Reference. + // + // [Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces + // [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 // // 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) - // . + // The date and time, in [ISO 8601 date-time format], 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]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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) - // . + // requests. + // + // This field is null if no IAM entities attempted to access the service within + // the [tracking period]. + // + // [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) - // . + // requests. + // + // This field is null if no IAM entities attempted to access the service within + // the [tracking period]. + // + // [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) - // . + // roles) that have attempted to access the service. + // + // This field is null if no principals attempted to access the service within the [tracking period]. + // + // [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 . + // 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]. 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. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period TrackedActionsLastAccessed []TrackedActionLastAccessed noSmithyDocumentSerde @@ -1310,8 +1504,9 @@ type ServiceLastAccessed struct { // 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. + // The date and time, in [ISO 8601 date-time format], when the service-specific credential were created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. CreateDate *time.Time @@ -1356,8 +1551,9 @@ type ServiceSpecificCredential struct { // 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. + // The date and time, in [ISO 8601 date-time format], when the service-specific credential were created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. CreateDate *time.Time @@ -1391,9 +1587,9 @@ type ServiceSpecificCredentialMetadata struct { noSmithyDocumentSerde } -// Contains information about an X.509 signing certificate. This data type is used -// as a response element in the UploadSigningCertificate and -// ListSigningCertificates operations. +// 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. @@ -1423,8 +1619,9 @@ type SigningCertificate struct { noSmithyDocumentSerde } -// Contains information about an SSH public key. This data type is used as a -// response element in the GetSSHPublicKey and UploadSSHPublicKey operations. +// 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. @@ -1454,16 +1651,18 @@ type SSHPublicKey struct { // 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. + // The date and time, in [ISO 8601 date-time format], when the SSH public key was uploaded. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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. +// 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. @@ -1478,8 +1677,9 @@ type SSHPublicKeyMetadata struct { // 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. + // The date and time, in [ISO 8601 date-time format], when the SSH public key was uploaded. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. UploadDate *time.Time @@ -1493,8 +1693,9 @@ type SSHPublicKeyMetadata struct { } // 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. +// 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. @@ -1513,8 +1714,9 @@ type Statement struct { } // 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. +// an IAM resource. For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html type Tag struct { // The key name that can be used to look up or retrieve the associated value. For @@ -1528,6 +1730,7 @@ type Tag struct { // . 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. @@ -1539,8 +1742,9 @@ type Tag struct { } // 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. +// 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 @@ -1548,59 +1752,78 @@ type TrackedActionLastAccessed struct { 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. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html 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) - // . + // requests. + // + // This field is null if no IAM entities attempted to access the service within + // the [tracking period]. + // + // [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) - // . + // The date and time, in [ISO 8601 date-time format], 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]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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 +// 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. + // about ARNs and how to use ARNs in policies, see [IAM Identifiers]in the IAM User Guide. + // + // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // 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. + // The date and time, in [ISO 8601 date-time format], when the user was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // 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. + // The path to the user. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // The ARN of the policy used to set the permissions boundary for the user. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // 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. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. UserId *string @@ -1610,75 +1833,91 @@ type User struct { // 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 date and time, in [ISO 8601 date-time format], 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]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. + // contains the date and time the most recent password was used. + // + // This value is returned only in the GetUser and ListUsers operations. + // + // [Credential reports]: https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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. + // For more information about permissions boundaries, see [Permissions boundaries for IAM identities] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html 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. + // tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html 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. +// 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. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html 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. + // The date and time, in [ISO 8601 date-time format], when the user was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 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. + // The path to the user. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html 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. + // 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] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html 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. + // tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html 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. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html UserId *string // The friendly name identifying the user. @@ -1698,14 +1937,16 @@ type VirtualMFADevice struct { // 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. + // The base32 seed defined as specified in [RFC3548]. The Base32StringSeed is + // base32-encoded. + // + // [RFC3548]: https://tools.ietf.org/html/rfc3548.txt Base32StringSeed []byte // The date and time on which the virtual MFA device was enabled. EnableDate *time.Time - // A QR code PNG image that encodes + // 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 @@ -1713,8 +1954,9 @@ type VirtualMFADevice struct { 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. + // information about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []Tag // The IAM user associated with this virtual MFA device. 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 index 69084268..156f324a 100644 --- 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 @@ -3487,9 +3487,6 @@ func validateOpCreateOpenIDConnectProviderInput(v *CreateOpenIDConnectProviderIn 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)) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/CHANGELOG.md index 8694bbd9..8be2be40 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/CHANGELOG.md @@ -1,3 +1,156 @@ +# v1.25.4 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.24.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.13 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.12 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.11 (2024-06-04) + +* No change notes available for this release. + +# v1.23.10 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.9 (2024-05-23) + +* No change notes available for this release. + +# v1.23.8 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.7 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.6 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + +# v1.23.5 (2024-03-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.4 (2024-03-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.3 (2024-03-15) + +* No change notes available for this release. + +# v1.23.2 (2024-03-07) + +* **Bug Fix**: Remove dependency on go-cmp. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.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.23.0 (2024-02-22) + +* **Feature**: Add middleware stack snapshot tests. + +# v1.22.3 (2024-02-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.2 (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.22.1 (2024-02-15) + +* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field. + +# v1.22.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.21.8 (2024-01-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.7 (2023-12-19) + +* No change notes available for this release. + +# v1.21.6 (2023-12-18) + +* No change notes available for this release. + +# v1.21.5 (2023-12-08) + +* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. + +# v1.21.4 (2023-12-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.3 (2023-12-06) + +* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. + +# v1.21.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.21.1 (2023-11-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.0 (2023-11-29) + +* **Feature**: Expose Options() accessor on service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.5 (2023-11-28.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.4 (2023-11-28) + +* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. + # v1.20.3 (2023-11-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_client.go index 99b15a89..fbf19970 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_client.go @@ -14,13 +14,16 @@ import ( 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" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" 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" + "sync/atomic" "time" ) @@ -31,6 +34,9 @@ const ServiceAPIVersion = "2020-06-15" // Store. type Client struct { options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 } // New returns an initialized Client based on the functional options. Provide @@ -57,17 +63,32 @@ func New(options Options, optFns ...func(*Options)) *Client { fn(&options) } + finalizeRetryMaxAttempts(&options) + ignoreAnonymousAuth(&options) + wrapWithAnonymousAuth(&options) + resolveAuthSchemes(&options) client := &Client{ options: options, } + initializeTimeOffsetResolver(client) + 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) @@ -77,7 +98,7 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf fn(&options) } - finalizeRetryMaxAttemptOptions(&options, *c) + finalizeOperationRetryMaxAttempts(&options, *c) finalizeClientEndpointResolverOptions(&options) @@ -131,7 +152,7 @@ func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in mi 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: %v", err) + 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) @@ -140,7 +161,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o return fmt.Errorf("add ResolveEndpointV2: %v", err) } if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %v", err) + return fmt.Errorf("add Signing: %w", err) } return nil } @@ -217,15 +238,16 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AccountIDEndpointMode: cfg.AccountIDEndpointMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -325,7 +347,15 @@ func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { o.RetryMaxAttempts = cfg.RetryMaxAttempts } -func finalizeRetryMaxAttemptOptions(o *Options, client Client) { +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 } @@ -341,17 +371,37 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { } func addClientUserAgent(stack *middleware.Stack, options Options) error { - if err := awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "identitystore", goModuleVersion)(stack); err != nil { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { return err } + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "identitystore", goModuleVersion) if len(options.AppID) > 0 { - return awsmiddleware.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)(stack) + 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 } @@ -370,12 +420,72 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func addRetryMiddlewares(stack *middleware.Stack, o Options) error { - mo := retry.AddRetryMiddlewaresOptions{ - Retryer: o.Retryer, - LogRetryAttempts: o.ClientLogMode.IsRetries(), +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 addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + +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 } - return retry.AddRetryMiddlewares(stack, mo) + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil } // resolves dual-stack endpoint configuration @@ -408,12 +518,75 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { + switch mode { + case aws.AccountIDEndpointModeUnset: + case aws.AccountIDEndpointModePreferred: + case aws.AccountIDEndpointModeDisabled: + case aws.AccountIDEndpointModeRequired: + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { + return fmt.Errorf("accountID is required but not set") + } else if ca.Credentials.AccountID == "" { + return fmt.Errorf("accountID is required but not set") + } + // default check in case invalid mode is configured through request config + default: + return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) + } + + return nil +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + } func addResponseErrorMiddleware(stack *middleware.Stack) error { - return awshttp.AddResponseErrorMiddleware(stack) + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroup.go index 497c95d7..7b1ef095 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroup.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -85,25 +84,25 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -118,13 +117,19 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGroup(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroupMembership.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroupMembership.go index 90d74147..a4074ae5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroupMembership.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateGroupMembership.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -91,25 +90,25 @@ func (c *Client) addOperationCreateGroupMembershipMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -124,13 +123,19 @@ func (c *Client) addOperationCreateGroupMembershipMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupMembershipValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGroupMembership(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateUser.go index eaf4ba78..0fb60f74 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_CreateUser.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -125,25 +124,25 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -158,13 +157,19 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroup.go index 8340d7ab..fc2403c1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroup.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -71,25 +70,25 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -104,13 +103,19 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroup(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroupMembership.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroupMembership.go index 42839f6f..f68986a2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroupMembership.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteGroupMembership.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -71,25 +70,25 @@ func (c *Client) addOperationDeleteGroupMembershipMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -104,13 +103,19 @@ func (c *Client) addOperationDeleteGroupMembershipMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupMembershipValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroupMembership(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteUser.go index 5d008a8c..3539c014 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DeleteUser.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -71,25 +70,25 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -104,13 +103,19 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroup.go index f36ef47f..1a2bbddd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroup.go @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the group metadata and attributes from GroupId in an identity store. +// // If you have administrator access to a member account, you can use this API from -// the member account. Read about member accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) DescribeGroup(ctx context.Context, params *DescribeGroupInput, optFns ...func(*Options)) (*DescribeGroupOutput, error) { if params == nil { params = &DescribeGroupInput{} @@ -103,25 +104,25 @@ func (c *Client) addOperationDescribeGroupMiddlewares(stack *middleware.Stack, o if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -136,13 +137,19 @@ func (c *Client) addOperationDescribeGroupMiddlewares(stack *middleware.Stack, o if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGroup(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroupMembership.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroupMembership.go index 99873311..50a1dd06 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroupMembership.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeGroupMembership.go @@ -6,16 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves membership metadata and attributes from MembershipId in an identity -// store. If you have administrator access to a member account, you can use this -// API from the member account. Read about member accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// store. +// +// If you have administrator access to a member account, you can use this API from +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) DescribeGroupMembership(ctx context.Context, params *DescribeGroupMembershipInput, optFns ...func(*Options)) (*DescribeGroupMembershipOutput, error) { if params == nil { params = &DescribeGroupMembershipInput{} @@ -96,25 +98,25 @@ func (c *Client) addOperationDescribeGroupMembershipMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -129,13 +131,19 @@ func (c *Client) addOperationDescribeGroupMembershipMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGroupMembershipValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGroupMembership(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeUser.go index 18b378d4..b1bd56e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_DescribeUser.go @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the user metadata and attributes from the UserId in an identity -// store. If you have administrator access to a member account, you can use this -// API from the member account. Read about member accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// Retrieves the user metadata and attributes from the UserId in an identity store. +// +// If you have administrator access to a member account, you can use this API from +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) DescribeUser(ctx context.Context, params *DescribeUserInput, optFns ...func(*Options)) (*DescribeUserOutput, error) { if params == nil { params = &DescribeUserInput{} @@ -135,25 +136,25 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -168,13 +169,19 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupId.go index 8b9d1ee4..b733bbf9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupId.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupId.go @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves GroupId in an identity store. If you have administrator access to a -// member account, you can use this API from the member account. Read about member -// accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// Retrieves GroupId in an identity store. +// +// If you have administrator access to a member account, you can use this API from +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) GetGroupId(ctx context.Context, params *GetGroupIdInput, optFns ...func(*Options)) (*GetGroupIdOutput, error) { if params == nil { params = &GetGroupIdInput{} @@ -89,25 +90,25 @@ func (c *Client) addOperationGetGroupIdMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +123,19 @@ func (c *Client) addOperationGetGroupIdMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupIdValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroupId(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupMembershipId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupMembershipId.go index 86df837e..46503a7f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupMembershipId.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetGroupMembershipId.go @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the MembershipId in an identity store. If you have administrator -// access to a member account, you can use this API from the member account. Read -// about member accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// Retrieves the MembershipId in an identity store. +// +// If you have administrator access to a member account, you can use this API from +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) GetGroupMembershipId(ctx context.Context, params *GetGroupMembershipIdInput, optFns ...func(*Options)) (*GetGroupMembershipIdOutput, error) { if params == nil { params = &GetGroupMembershipIdInput{} @@ -93,25 +94,25 @@ func (c *Client) addOperationGetGroupMembershipIdMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -126,13 +127,19 @@ func (c *Client) addOperationGetGroupMembershipIdMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupMembershipIdValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroupMembershipId(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetUserId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetUserId.go index f1ce554b..d57b2a93 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetUserId.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_GetUserId.go @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the UserId in an identity store. If you have administrator access to -// a member account, you can use this API from the member account. Read about -// member accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// Retrieves the UserId in an identity store. +// +// If you have administrator access to a member account, you can use this API from +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) GetUserId(ctx context.Context, params *GetUserIdInput, optFns ...func(*Options)) (*GetUserIdOutput, error) { if params == nil { params = &GetUserIdInput{} @@ -89,25 +90,25 @@ func (c *Client) addOperationGetUserIdMiddlewares(stack *middleware.Stack, optio if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +123,19 @@ func (c *Client) addOperationGetUserIdMiddlewares(stack *middleware.Stack, optio if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserIdValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUserId(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_IsMemberInGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_IsMemberInGroups.go index 93f08423..44e00287 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_IsMemberInGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_IsMemberInGroups.go @@ -6,17 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Checks the user's membership in all requested groups and returns if the member -// exists in all queried groups. If you have administrator access to a member -// account, you can use this API from the member account. Read about member -// accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// exists in all queried groups. +// +// If you have administrator access to a member account, you can use this API from +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) IsMemberInGroups(ctx context.Context, params *IsMemberInGroupsInput, optFns ...func(*Options)) (*IsMemberInGroupsOutput, error) { if params == nil { params = &IsMemberInGroupsInput{} @@ -87,25 +88,25 @@ func (c *Client) addOperationIsMemberInGroupsMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -120,13 +121,19 @@ func (c *Client) addOperationIsMemberInGroupsMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIsMemberInGroupsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opIsMemberInGroups(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMemberships.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMemberships.go index 17d1f1ff..b0507f52 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMemberships.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMemberships.go @@ -6,17 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // For the specified group in the specified identity store, returns the list of -// all GroupMembership objects and returns results in paginated form. If you have -// administrator access to a member account, you can use this API from the member -// account. Read about member accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// all GroupMembership objects and returns results in paginated form. +// +// If you have administrator access to a member account, you can use this API from +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) ListGroupMemberships(ctx context.Context, params *ListGroupMembershipsInput, optFns ...func(*Options)) (*ListGroupMembershipsOutput, error) { if params == nil { params = &ListGroupMembershipsInput{} @@ -100,25 +101,25 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -133,13 +134,19 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupMembershipsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroupMemberships(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -157,14 +164,6 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S return nil } -// ListGroupMembershipsAPIClient is a client that implements the -// ListGroupMemberships operation. -type ListGroupMembershipsAPIClient interface { - ListGroupMemberships(context.Context, *ListGroupMembershipsInput, ...func(*Options)) (*ListGroupMembershipsOutput, error) -} - -var _ ListGroupMembershipsAPIClient = (*Client)(nil) - // ListGroupMembershipsPaginatorOptions is the paginator options for // ListGroupMemberships type ListGroupMembershipsPaginatorOptions struct { @@ -230,6 +229,9 @@ func (p *ListGroupMembershipsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupMemberships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +251,14 @@ func (p *ListGroupMembershipsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListGroupMembershipsAPIClient is a client that implements the +// ListGroupMemberships operation. +type ListGroupMembershipsAPIClient interface { + ListGroupMemberships(context.Context, *ListGroupMembershipsInput, ...func(*Options)) (*ListGroupMembershipsOutput, error) +} + +var _ ListGroupMembershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMembershipsForMember.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMembershipsForMember.go index d3e47808..535efab6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMembershipsForMember.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroupMembershipsForMember.go @@ -6,17 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // For the specified member in the specified identity store, returns the list of -// all GroupMembership objects and returns results in paginated form. If you have -// administrator access to a member account, you can use this API from the member -// account. Read about member accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// all GroupMembership objects and returns results in paginated form. +// +// If you have administrator access to a member account, you can use this API from +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) ListGroupMembershipsForMember(ctx context.Context, params *ListGroupMembershipsForMemberInput, optFns ...func(*Options)) (*ListGroupMembershipsForMemberOutput, error) { if params == nil { params = &ListGroupMembershipsForMemberInput{} @@ -103,25 +104,25 @@ func (c *Client) addOperationListGroupMembershipsForMemberMiddlewares(stack *mid if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -136,13 +137,19 @@ func (c *Client) addOperationListGroupMembershipsForMemberMiddlewares(stack *mid if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupMembershipsForMemberValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroupMembershipsForMember(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -160,14 +167,6 @@ func (c *Client) addOperationListGroupMembershipsForMemberMiddlewares(stack *mid return nil } -// ListGroupMembershipsForMemberAPIClient is a client that implements the -// ListGroupMembershipsForMember operation. -type ListGroupMembershipsForMemberAPIClient interface { - ListGroupMembershipsForMember(context.Context, *ListGroupMembershipsForMemberInput, ...func(*Options)) (*ListGroupMembershipsForMemberOutput, error) -} - -var _ ListGroupMembershipsForMemberAPIClient = (*Client)(nil) - // ListGroupMembershipsForMemberPaginatorOptions is the paginator options for // ListGroupMembershipsForMember type ListGroupMembershipsForMemberPaginatorOptions struct { @@ -236,6 +235,9 @@ func (p *ListGroupMembershipsForMemberPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupMembershipsForMember(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +257,14 @@ func (p *ListGroupMembershipsForMemberPaginator) NextPage(ctx context.Context, o return result, nil } +// ListGroupMembershipsForMemberAPIClient is a client that implements the +// ListGroupMembershipsForMember operation. +type ListGroupMembershipsForMemberAPIClient interface { + ListGroupMembershipsForMember(context.Context, *ListGroupMembershipsForMemberInput, ...func(*Options)) (*ListGroupMembershipsForMemberOutput, error) +} + +var _ ListGroupMembershipsForMemberAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupMembershipsForMember(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroups.go index dcdd41ea..ccdaec59 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListGroups.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,10 +13,12 @@ import ( // Lists all groups in the identity store. Returns a paginated list of complete // Group objects. Filtering for a Group by the DisplayName attribute is -// deprecated. Instead, use the GetGroupId API action. If you have administrator -// access to a member account, you can use this API from the member account. Read -// about member accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// deprecated. Instead, use the GetGroupId API action. +// +// If you have administrator access to a member account, you can use this API from +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) ListGroups(ctx context.Context, params *ListGroupsInput, optFns ...func(*Options)) (*ListGroupsOutput, error) { if params == nil { params = &ListGroupsInput{} @@ -105,25 +106,25 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -138,13 +139,19 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroups(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -162,13 +169,6 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti 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 { // The maximum number of results to be returned per request. This parameter is @@ -234,6 +234,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +256,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, 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) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListUsers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListUsers.go index 454ce04b..0421d72f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListUsers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_ListUsers.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,10 +13,12 @@ import ( // Lists all users in the identity store. Returns a paginated list of complete User // objects. Filtering for a User by the UserName attribute is deprecated. Instead, -// use the GetUserId API action. If you have administrator access to a member -// account, you can use this API from the member account. Read about member -// accounts (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html) -// in the Organizations User Guide. +// use the GetUserId API action. +// +// If you have administrator access to a member account, you can use this API from +// the member account. Read about [member accounts]in the Organizations User Guide. +// +// [member accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html func (c *Client) ListUsers(ctx context.Context, params *ListUsersInput, optFns ...func(*Options)) (*ListUsersOutput, error) { if params == nil { params = &ListUsersInput{} @@ -105,25 +106,25 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -138,13 +139,19 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsers(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -162,13 +169,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio 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 { // The maximum number of results to be returned per request. This parameter is @@ -234,6 +234,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +256,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, 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) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateGroup.go index b64fc0a1..56a1da3b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateGroup.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -79,25 +78,25 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -112,13 +111,19 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGroup(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateUser.go index f8f25683..3d8cdcb2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/api_op_UpdateUser.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -79,25 +78,25 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -112,13 +111,19 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateUser(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/auth.go index eb5af628..26ac0e0d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/auth.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { params.Region = options.Region } @@ -52,6 +52,34 @@ 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 { @@ -62,12 +90,12 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(params, input, options) + bindAuthParamsRegion(ctx, params, input, options) return params } @@ -117,10 +145,10 @@ func (*resolveAuthSchemeMiddleware) ID() string { 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) + params := bindAuthResolverParams(ctx, 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: %v", err) + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) } scheme, ok := m.selectScheme(options) @@ -200,7 +228,7 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) if err != nil { - return out, metadata, fmt.Errorf("get identity: %v", err) + return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) @@ -249,7 +277,7 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar } if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { - return out, metadata, fmt.Errorf("sign request: %v", err) + 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/identitystore/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/deserializers.go index 4ab6e9a4..a6e0097f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/deserializers.go @@ -13,11 +13,21 @@ import ( 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" "strings" + "time" ) +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + type awsAwsjson11_deserializeOpCreateGroup struct { } @@ -86,9 +96,6 @@ func awsAwsjson11_deserializeOpErrorCreateGroup(response *smithyhttp.Response, m errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -96,7 +103,7 @@ func awsAwsjson11_deserializeOpErrorCreateGroup(response *smithyhttp.Response, m body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -108,13 +115,12 @@ func awsAwsjson11_deserializeOpErrorCreateGroup(response *smithyhttp.Response, m } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -215,9 +221,6 @@ func awsAwsjson11_deserializeOpErrorCreateGroupMembership(response *smithyhttp.R errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -225,7 +228,7 @@ func awsAwsjson11_deserializeOpErrorCreateGroupMembership(response *smithyhttp.R body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -237,13 +240,12 @@ func awsAwsjson11_deserializeOpErrorCreateGroupMembership(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -344,9 +346,6 @@ func awsAwsjson11_deserializeOpErrorCreateUser(response *smithyhttp.Response, me errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -354,7 +353,7 @@ func awsAwsjson11_deserializeOpErrorCreateUser(response *smithyhttp.Response, me body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -366,13 +365,12 @@ func awsAwsjson11_deserializeOpErrorCreateUser(response *smithyhttp.Response, me } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -473,9 +471,6 @@ func awsAwsjson11_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, m errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -483,7 +478,7 @@ func awsAwsjson11_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, m body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -495,13 +490,12 @@ func awsAwsjson11_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, m } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -599,9 +593,6 @@ func awsAwsjson11_deserializeOpErrorDeleteGroupMembership(response *smithyhttp.R errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -609,7 +600,7 @@ func awsAwsjson11_deserializeOpErrorDeleteGroupMembership(response *smithyhttp.R body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -621,13 +612,12 @@ func awsAwsjson11_deserializeOpErrorDeleteGroupMembership(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -725,9 +715,6 @@ func awsAwsjson11_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -735,7 +722,7 @@ func awsAwsjson11_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -747,13 +734,12 @@ func awsAwsjson11_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -851,9 +837,6 @@ func awsAwsjson11_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -861,7 +844,7 @@ func awsAwsjson11_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -873,13 +856,12 @@ func awsAwsjson11_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -974,9 +956,6 @@ func awsAwsjson11_deserializeOpErrorDescribeGroupMembership(response *smithyhttp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -984,7 +963,7 @@ func awsAwsjson11_deserializeOpErrorDescribeGroupMembership(response *smithyhttp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -996,13 +975,12 @@ func awsAwsjson11_deserializeOpErrorDescribeGroupMembership(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1097,9 +1075,6 @@ func awsAwsjson11_deserializeOpErrorDescribeUser(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1107,7 +1082,7 @@ func awsAwsjson11_deserializeOpErrorDescribeUser(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1119,13 +1094,12 @@ func awsAwsjson11_deserializeOpErrorDescribeUser(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1220,9 +1194,6 @@ func awsAwsjson11_deserializeOpErrorGetGroupId(response *smithyhttp.Response, me errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1230,7 +1201,7 @@ func awsAwsjson11_deserializeOpErrorGetGroupId(response *smithyhttp.Response, me body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1242,13 +1213,12 @@ func awsAwsjson11_deserializeOpErrorGetGroupId(response *smithyhttp.Response, me } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1343,9 +1313,6 @@ func awsAwsjson11_deserializeOpErrorGetGroupMembershipId(response *smithyhttp.Re errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1353,7 +1320,7 @@ func awsAwsjson11_deserializeOpErrorGetGroupMembershipId(response *smithyhttp.Re body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1365,13 +1332,12 @@ func awsAwsjson11_deserializeOpErrorGetGroupMembershipId(response *smithyhttp.Re } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1466,9 +1432,6 @@ func awsAwsjson11_deserializeOpErrorGetUserId(response *smithyhttp.Response, met errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1476,7 +1439,7 @@ func awsAwsjson11_deserializeOpErrorGetUserId(response *smithyhttp.Response, met body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1488,13 +1451,12 @@ func awsAwsjson11_deserializeOpErrorGetUserId(response *smithyhttp.Response, met } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1589,9 +1551,6 @@ func awsAwsjson11_deserializeOpErrorIsMemberInGroups(response *smithyhttp.Respon errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1599,7 +1558,7 @@ func awsAwsjson11_deserializeOpErrorIsMemberInGroups(response *smithyhttp.Respon body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1611,13 +1570,12 @@ func awsAwsjson11_deserializeOpErrorIsMemberInGroups(response *smithyhttp.Respon } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1712,9 +1670,6 @@ func awsAwsjson11_deserializeOpErrorListGroupMemberships(response *smithyhttp.Re errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1722,7 +1677,7 @@ func awsAwsjson11_deserializeOpErrorListGroupMemberships(response *smithyhttp.Re body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1734,13 +1689,12 @@ func awsAwsjson11_deserializeOpErrorListGroupMemberships(response *smithyhttp.Re } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1835,9 +1789,6 @@ func awsAwsjson11_deserializeOpErrorListGroupMembershipsForMember(response *smit errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1845,7 +1796,7 @@ func awsAwsjson11_deserializeOpErrorListGroupMembershipsForMember(response *smit body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1857,13 +1808,12 @@ func awsAwsjson11_deserializeOpErrorListGroupMembershipsForMember(response *smit } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1958,9 +1908,6 @@ func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, me errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1968,7 +1915,7 @@ func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, me body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1980,13 +1927,12 @@ func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, me } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2081,9 +2027,6 @@ func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, met errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2091,7 +2034,7 @@ func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, met body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2103,13 +2046,12 @@ func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, met } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2204,9 +2146,6 @@ func awsAwsjson11_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, m errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2214,7 +2153,7 @@ func awsAwsjson11_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, m body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2226,13 +2165,12 @@ func awsAwsjson11_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, m } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2333,9 +2271,6 @@ func awsAwsjson11_deserializeOpErrorUpdateUser(response *smithyhttp.Response, me errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2343,7 +2278,7 @@ func awsAwsjson11_deserializeOpErrorUpdateUser(response *smithyhttp.Response, me body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2355,13 +2290,12 @@ func awsAwsjson11_deserializeOpErrorUpdateUser(response *smithyhttp.Response, me } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -5000,3 +4934,32 @@ func awsAwsjson11_deserializeOpDocumentUpdateUserOutput(v **UpdateUserOutput, va *v = sv return nil } + +type protocolErrorInfo struct { + Type string `json:"__type"` + Message string + Code any // nonstandard for awsjson but some services do present the type here +} + +func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) { + var errInfo protocolErrorInfo + if err := decoder.Decode(&errInfo); err != nil { + if err == io.EOF { + return errInfo, nil + } + return errInfo, err + } + + return errInfo, nil +} + +func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) { + if len(headerType) != 0 { + return headerType, true + } else if len(bodyInfo.Type) != 0 { + return bodyInfo.Type, true + } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 { + return code, true + } + return "", false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/doc.go index f566fa8b..a1ff9b11 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/doc.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/doc.go @@ -5,8 +5,12 @@ // // The Identity Store service used by IAM Identity Center provides a single place // to retrieve all of your identities (users and groups). For more information, see -// the IAM Identity Center User Guide (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) -// . This reference guide describes the identity store operations that you can call +// the [IAM Identity Center User Guide]. +// +// This reference guide describes the identity store operations that you can call // programmatically and includes detailed information about data types and errors. +// // IAM Identity Center uses the sso and identitystore API namespaces. +// +// [IAM Identity Center User Guide]: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html package identitystore diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/endpoints.go index 5eb3a365..d1557935 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/endpoints.go @@ -216,6 +216,13 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) { } } +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 { @@ -281,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, @@ -458,10 +476,10 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} - params.Region = aws.String(endpoints.MapFIPSRegion(options.Region)) + 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 @@ -488,6 +506,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return next.HandleFinalize(ctx, in) } + if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { + return out, metadata, fmt.Errorf("invalid accountID set: %w", err) + } + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -497,7 +519,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(getOperationInput(ctx), m.options) + params := bindEndpointParams(ctx, 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) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/generated.json index 66e93a2b..cd618835 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/generated.json @@ -3,8 +3,7 @@ "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", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", @@ -44,6 +43,7 @@ "options.go", "protocol_test.go", "serializers.go", + "snapshot_test.go", "types/enums.go", "types/errors.go", "types/types.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/go_module_metadata.go index 2c4c40c9..85b9ca66 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/go_module_metadata.go @@ -3,4 +3,4 @@ package identitystore // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.20.3" +const goModuleVersion = "1.25.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints/endpoints.go index 59c0c424..e090dbf1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints/endpoints.go @@ -157,6 +157,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -166,9 +169,15 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, @@ -181,6 +190,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, @@ -193,6 +205,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "il-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/options.go index 60bf384c..68279c83 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/options.go @@ -24,6 +24,9 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error + // Indicates how aws account ID is applied in endpoint2.0 routing + AccountIDEndpointMode aws.AccountIDEndpointMode + // The optional application specific identifier appended to the User-Agent header. AppID string @@ -50,8 +53,10 @@ type Options struct { // 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. + // 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 @@ -70,19 +75,20 @@ type Options struct { // 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. 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. 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. + // 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. + // 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 @@ -99,8 +105,9 @@ type Options struct { // 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. + // 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 @@ -145,6 +152,7 @@ func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { // 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) { @@ -213,7 +221,7 @@ func WithSigV4SigningRegion(region string) func(*Options) { } func ignoreAnonymousAuth(options *Options) { - if _, ok := options.Credentials.(aws.AnonymousCredentials); ok { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { options.Credentials = nil } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/enums.go index 4d05b274..25323622 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/enums.go @@ -11,8 +11,9 @@ const ( ) // Values returns all known values for ConflictExceptionReason. 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. +// 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 (ConflictExceptionReason) Values() []ConflictExceptionReason { return []ConflictExceptionReason{ "UNIQUENESS_CONSTRAINT_VIOLATION", @@ -31,8 +32,9 @@ const ( ) // Values returns all known values for ResourceType. 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. +// 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 (ResourceType) Values() []ResourceType { return []ResourceType{ "GROUP", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/errors.go index 1feac67f..93a69319 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/identitystore/types/errors.go @@ -36,8 +36,10 @@ func (e *AccessDeniedException) ErrorCode() string { func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // This request cannot be completed for one of the following reasons: +// // - Performing the requested operation would violate an existing uniqueness // claim in the identity store. Resolve the conflict before retrying this request. +// // - The requested resource was being concurrently modified by another request. type ConflictException struct { Message *string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md index 9cf6cf22..56f89df8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.11.4 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. + +# v1.11.3 (2024-06-28) + +* No change notes available for this release. + # v1.11.2 (2024-03-29) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go index 6339b541..47d97ccf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go @@ -3,4 +3,4 @@ package acceptencoding // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.2" +const goModuleVersion = "1.11.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md index 35c7050d..2876433c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md @@ -1,3 +1,48 @@ +# v1.11.18 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.17 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.16 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.15 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.14 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.13 (2024-06-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.12 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.11 (2024-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.10 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.9 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.8 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.11.7 (2024-03-29) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go index daf77b5c..4c939893 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go @@ -3,4 +3,4 @@ package presignedurl // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.7" +const goModuleVersion = "1.11.18" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/CHANGELOG.md index 5d29fa6c..5528489d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/CHANGELOG.md @@ -1,3 +1,160 @@ +# v1.31.0 (2024-08-23) + +* **Feature**: Releasing minor partitional endpoint updates. + +# v1.30.3 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.2 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.1 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.0 (2024-07-03) + +* **Feature**: Added a new reason under ConstraintViolationException in RegisterDelegatedAdministrator API to prevent registering suspended accounts as delegated administrator of a service. + +# v1.29.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.28.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.10 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.9 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.8 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.7 (2024-05-23) + +* No change notes available for this release. + +# v1.27.6 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.5 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.4 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + +# v1.27.3 (2024-03-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.2 (2024-03-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.1 (2024-03-07) + +* **Bug Fix**: Remove dependency on go-cmp. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.0 (2024-03-05) + +* **Feature**: This release contains an endpoint addition + +# v1.26.0 (2024-03-04) + +* **Feature**: Documentation update for AWS Organizations + +# v1.25.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.25.0 (2024-02-22) + +* **Feature**: Add middleware stack snapshot tests. + +# v1.24.3 (2024-02-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.2 (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.24.1 (2024-02-15) + +* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field. + +# v1.24.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.23.7 (2024-01-22) + +* **Documentation**: Doc only update for quota increase change + +# v1.23.6 (2024-01-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.5 (2023-12-08) + +* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. + +# v1.23.4 (2023-12-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.3 (2023-12-06) + +* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. + +# v1.23.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.23.1 (2023-11-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.0 (2023-11-29) + +* **Feature**: Expose Options() accessor on service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.5 (2023-11-28.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.4 (2023-11-28) + +* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. + # v1.22.3 (2023-11-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_client.go index 3aec1100..5423ef19 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_client.go @@ -14,13 +14,16 @@ import ( 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" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" 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" + "sync/atomic" "time" ) @@ -30,6 +33,9 @@ const ServiceAPIVersion = "2016-11-28" // Client provides the API client to make operations call for AWS Organizations. type Client struct { options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 } // New returns an initialized Client based on the functional options. Provide @@ -56,17 +62,32 @@ func New(options Options, optFns ...func(*Options)) *Client { fn(&options) } + finalizeRetryMaxAttempts(&options) + ignoreAnonymousAuth(&options) + wrapWithAnonymousAuth(&options) + resolveAuthSchemes(&options) client := &Client{ options: options, } + initializeTimeOffsetResolver(client) + 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) @@ -76,7 +97,7 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf fn(&options) } - finalizeRetryMaxAttemptOptions(&options, *c) + finalizeOperationRetryMaxAttempts(&options, *c) finalizeClientEndpointResolverOptions(&options) @@ -130,7 +151,7 @@ func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in mi 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: %v", err) + 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) @@ -139,7 +160,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o return fmt.Errorf("add ResolveEndpointV2: %v", err) } if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %v", err) + return fmt.Errorf("add Signing: %w", err) } return nil } @@ -216,15 +237,16 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AccountIDEndpointMode: cfg.AccountIDEndpointMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -324,7 +346,15 @@ func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { o.RetryMaxAttempts = cfg.RetryMaxAttempts } -func finalizeRetryMaxAttemptOptions(o *Options, client Client) { +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 } @@ -340,17 +370,37 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { } func addClientUserAgent(stack *middleware.Stack, options Options) error { - if err := awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "organizations", goModuleVersion)(stack); err != nil { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { return err } + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "organizations", goModuleVersion) if len(options.AppID) > 0 { - return awsmiddleware.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)(stack) + 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 } @@ -369,12 +419,72 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func addRetryMiddlewares(stack *middleware.Stack, o Options) error { - mo := retry.AddRetryMiddlewaresOptions{ - Retryer: o.Retryer, - LogRetryAttempts: o.ClientLogMode.IsRetries(), +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 addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + +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 } - return retry.AddRetryMiddlewares(stack, mo) + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil } // resolves dual-stack endpoint configuration @@ -407,12 +517,75 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { + switch mode { + case aws.AccountIDEndpointModeUnset: + case aws.AccountIDEndpointModePreferred: + case aws.AccountIDEndpointModeDisabled: + case aws.AccountIDEndpointModeRequired: + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { + return fmt.Errorf("accountID is required but not set") + } else if ca.Credentials.AccountID == "" { + return fmt.Errorf("accountID is required but not set") + } + // default check in case invalid mode is configured through request config + default: + return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) + } + + return nil +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + } func addResponseErrorMiddleware(stack *middleware.Stack) error { - return awshttp.AddResponseErrorMiddleware(stack) + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AcceptHandshake.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AcceptHandshake.go index 80ab0a3a..f280b4af 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AcceptHandshake.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AcceptHandshake.go @@ -6,33 +6,43 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Sends a response to the originator of a handshake agreeing to the action -// proposed by the handshake request. You can only call this operation by the -// following principals when they also have the relevant IAM permissions: +// proposed by the handshake request. +// +// You can only call this operation by the following principals when they also +// have the relevant IAM permissions: +// // - Invitation to join or Approve all features request handshakes: only a -// principal from the member account. The user who calls the API for an invitation -// to join must have the organizations:AcceptHandshake permission. If you enabled -// all features in the organization, the user must also have the -// iam:CreateServiceLinkedRole permission so that Organizations can create the -// required service-linked role named AWSServiceRoleForOrganizations . For more -// information, see Organizations and service-linked roles (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integrate_services-using_slrs) -// in the Organizations User Guide. -// - Enable all features final confirmation handshake: only a principal from the -// management account. For more information about invitations, see Inviting an -// Amazon Web Services account to join your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_invites.html) -// in the Organizations User Guide. For more information about requests to enable -// all features in the organization, see Enabling all features in your -// organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) -// in the Organizations User Guide. +// principal from the member account. +// +// The user who calls the API for an invitation to join must have the +// +// organizations:AcceptHandshake permission. If you enabled all features in the +// organization, the user must also have the iam:CreateServiceLinkedRole +// permission so that Organizations can create the required service-linked role +// named AWSServiceRoleForOrganizations . For more information, see [Organizations and service-linked roles]in the +// Organizations User Guide. +// +// - Enable all features final confirmation handshake: only a principal from the +// management account. +// +// For more information about invitations, see [Inviting an Amazon Web Services account to join your organization]in the Organizations User Guide. +// +// For more information about requests to enable all features in the organization, +// see [Enabling all features in your organization]in the Organizations User Guide. // // After you accept a handshake, it continues to appear in the results of relevant // APIs for only 30 days. After that, it's deleted. +// +// [Inviting an Amazon Web Services account to join your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_invites.html +// +// [Enabling all features in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html +// [Organizations and service-linked roles]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integrate_services-using_slrs func (c *Client) AcceptHandshake(ctx context.Context, params *AcceptHandshakeInput, optFns ...func(*Options)) (*AcceptHandshakeOutput, error) { if params == nil { params = &AcceptHandshakeInput{} @@ -50,9 +60,12 @@ func (c *Client) AcceptHandshake(ctx context.Context, params *AcceptHandshakeInp type AcceptHandshakeInput struct { - // The unique identifier (ID) of the handshake that you want to accept. The regex - // pattern (http://wikipedia.org/wiki/regex) for handshake ID string requires "h-" - // followed by from 8 to 32 lowercase letters or digits. + // The unique identifier (ID) of the handshake that you want to accept. + // + // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. HandshakeId *string @@ -93,25 +106,25 @@ func (c *Client) addOperationAcceptHandshakeMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -126,13 +139,19 @@ func (c *Client) addOperationAcceptHandshakeMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptHandshakeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptHandshake(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AttachPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AttachPolicy.go index d2de0dc7..7928d61b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AttachPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AttachPolicy.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -14,14 +13,23 @@ import ( // Attaches a policy to a root, an organizational unit (OU), or an individual // account. How the policy affects accounts depends on the type of policy. Refer to // the Organizations User Guide for information about each policy type: -// - AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) -// - BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) -// - SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) -// - TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) +// +// [AISERVICES_OPT_OUT_POLICY] +// +// [BACKUP_POLICY] +// +// [SERVICE_CONTROL_POLICY] +// +// [TAG_POLICY] // // This operation can be called only from the organization's management account or // by a member account that is a delegated administrator for an Amazon Web Services // service. +// +// [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html +// [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html +// [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html +// [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html func (c *Client) AttachPolicy(ctx context.Context, params *AttachPolicyInput, optFns ...func(*Options)) (*AttachPolicyOutput, error) { if params == nil { params = &AttachPolicyInput{} @@ -40,26 +48,33 @@ func (c *Client) AttachPolicy(ctx context.Context, params *AttachPolicyInput, op type AttachPolicyInput struct { // The unique identifier (ID) of the policy that you want to attach to the target. - // You can get the ID for the policy by calling the ListPolicies operation. The - // regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string requires - // "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the - // underscore character (_). + // You can get the ID for the policy by calling the ListPoliciesoperation. + // + // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase + // or uppercase letters, digits, or the underscore character (_). + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyId *string // The unique identifier (ID) of the root, OU, or account that you want to attach - // the policy to. You can get the ID by calling the ListRoots , - // ListOrganizationalUnitsForParent , or ListAccounts operations. The regex pattern (http://wikipedia.org/wiki/regex) - // for a target ID string requires one of the following: + // the policy to. You can get the ID by calling the ListRoots, ListOrganizationalUnitsForParent, or ListAccounts operations. + // + // The [regex pattern] for a target ID string requires one of the following: + // // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase // letters or digits. + // // - Account - A string that consists of exactly 12 digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. TargetId *string @@ -95,25 +110,25 @@ func (c *Client) addOperationAttachPolicyMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -128,13 +143,19 @@ func (c *Client) addOperationAttachPolicyMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CancelHandshake.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CancelHandshake.go index c967a62f..a88d6f3b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CancelHandshake.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CancelHandshake.go @@ -6,19 +6,20 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Cancels a handshake. Canceling a handshake sets the handshake state to CANCELED -// . This operation can be called only from the account that originated the -// handshake. The recipient of the handshake can't cancel it, but can use -// DeclineHandshake instead. After a handshake is canceled, the recipient can no -// longer respond to that handshake. After you cancel a handshake, it continues to -// appear in the results of relevant APIs for only 30 days. After that, it's -// deleted. +// Cancels a handshake. Canceling a handshake sets the handshake state to CANCELED . +// +// This operation can be called only from the account that originated the +// handshake. The recipient of the handshake can't cancel it, but can use DeclineHandshakeinstead. +// After a handshake is canceled, the recipient can no longer respond to that +// handshake. +// +// After you cancel a handshake, it continues to appear in the results of relevant +// APIs for only 30 days. After that, it's deleted. func (c *Client) CancelHandshake(ctx context.Context, params *CancelHandshakeInput, optFns ...func(*Options)) (*CancelHandshakeOutput, error) { if params == nil { params = &CancelHandshakeInput{} @@ -37,9 +38,12 @@ func (c *Client) CancelHandshake(ctx context.Context, params *CancelHandshakeInp type CancelHandshakeInput struct { // The unique identifier (ID) of the handshake that you want to cancel. You can - // get the ID from the ListHandshakesForOrganization operation. The regex pattern (http://wikipedia.org/wiki/regex) - // for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters - // or digits. + // get the ID from the ListHandshakesForOrganizationoperation. + // + // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. HandshakeId *string @@ -80,25 +84,25 @@ func (c *Client) addOperationCancelHandshakeMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +117,19 @@ func (c *Client) addOperationCancelHandshakeMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelHandshakeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelHandshake(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CloseAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CloseAccount.go index 250fd13a..076b4343 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CloseAccount.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CloseAccount.go @@ -6,45 +6,49 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Closes an Amazon Web Services member account within an organization. You can -// close an account when all features are enabled (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) -// . You can't close the management account with this API. This is an asynchronous -// request that Amazon Web Services performs in the background. Because -// CloseAccount operates asynchronously, it can return a successful completion -// message even though account closure might still be in progress. You need to wait -// a few minutes before the account is fully closed. To check the status of the -// request, do one of the following: +// close an account when [all features are enabled]. You can't close the management account with this API. +// This is an asynchronous request that Amazon Web Services performs in the +// background. Because CloseAccount operates asynchronously, it can return a +// successful completion message even though account closure might still be in +// progress. You need to wait a few minutes before the account is fully closed. To +// check the status of the request, do one of the following: // // - Use the AccountId that you sent in the CloseAccount request to provide as a -// parameter to the DescribeAccount operation. While the close account request is -// in progress, Account status will indicate PENDING_CLOSURE. When the close -// account request completes, the status will change to SUSPENDED. +// parameter to the DescribeAccountoperation. // -// - Check the CloudTrail log for the CloseAccountResult event that gets -// published after the account closes successfully. For information on using -// CloudTrail with Organizations, see Logging and monitoring in Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration) -// in the Organizations User Guide. +// While the close account request is in progress, Account status will indicate // -// - You can close only 10% of member accounts, between 10 and 200, within a -// rolling 30 day period. This quota is not bound by a calendar month, but starts -// when you close an account. After you reach this limit, you can close additional -// accounts. For more information, see Closing a member account in your -// organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html) -// in the Organizations User Guide. +// PENDING_CLOSURE. When the close account request completes, the status will +// change to SUSPENDED. // -// - To reinstate a closed account, contact Amazon Web Services Support within -// the 90-day grace period while the account is in SUSPENDED status. +// - Check the CloudTrail log for the CloseAccountResult event that gets +// published after the account closes successfully. For information on using +// CloudTrail with Organizations, see [Logging and monitoring in Organizations]in the Organizations User Guide. // -// - If the Amazon Web Services account you attempt to close is linked to an -// Amazon Web Services GovCloud (US) account, the CloseAccount request will close -// both accounts. To learn important pre-closure details, see Closing an Amazon -// Web Services GovCloud (US) account (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/Closing-govcloud-account.html) -// in the Amazon Web Services GovCloud User Guide. +// - You can close only 10% of member accounts, between 10 and 1000, within a +// rolling 30 day period. This quota is not bound by a calendar month, but starts +// when you close an account. After you reach this limit, you can close additional +// accounts. For more information, see [Closing a member account in your organization]and [Quotas for Organizations]in the Organizations User Guide. +// +// - To reinstate a closed account, contact Amazon Web Services Support within +// the 90-day grace period while the account is in SUSPENDED status. +// +// - If the Amazon Web Services account you attempt to close is linked to an +// Amazon Web Services GovCloud (US) account, the CloseAccount request will close +// both accounts. To learn important pre-closure details, see [Closing an Amazon Web Services GovCloud (US) account]in the Amazon Web +// Services GovCloud User Guide. +// +// [all features are enabled]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html +// +// [Quotas for Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html +// [Logging and monitoring in Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration +// [Closing an Amazon Web Services GovCloud (US) account]: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/Closing-govcloud-account.html +// [Closing a member account in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html func (c *Client) CloseAccount(ctx context.Context, params *CloseAccountInput, optFns ...func(*Options)) (*CloseAccountOutput, error) { if params == nil { params = &CloseAccountInput{} @@ -100,25 +104,25 @@ func (c *Client) addOperationCloseAccountMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -133,13 +137,19 @@ func (c *Client) addOperationCloseAccountMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCloseAccountValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCloseAccount(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateAccount.go index a52e1dab..55099c1f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateAccount.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateAccount.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -19,60 +18,67 @@ import ( // though account initialization might still be in progress. You might need to wait // a few minutes before you can successfully access the account. To check the // status of the request, do one of the following: +// // - Use the Id value of the CreateAccountStatus response element from this -// operation to provide as a parameter to the DescribeCreateAccountStatus -// operation. +// operation to provide as a parameter to the DescribeCreateAccountStatusoperation. +// // - Check the CloudTrail log for the CreateAccountResult event. For information -// on using CloudTrail with Organizations, see Logging and monitoring in -// Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration) -// in the Organizations User Guide. +// on using CloudTrail with Organizations, see [Logging and monitoring in Organizations]in the Organizations User Guide. // // The user who calls the API to create an account must have the // organizations:CreateAccount permission. If you enabled all features in the // organization, Organizations creates the required service-linked role named -// AWSServiceRoleForOrganizations . For more information, see Organizations and -// service-linked roles (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs) -// in the Organizations User Guide. If the request includes tags, then the -// requester must have the organizations:TagResource permission. Organizations -// preconfigures the new member account with a role (named +// AWSServiceRoleForOrganizations . For more information, see [Organizations and service-linked roles] in the +// Organizations User Guide. +// +// If the request includes tags, then the requester must have the +// organizations:TagResource permission. +// +// Organizations preconfigures the new member account with a role (named // OrganizationAccountAccessRole by default) that grants users in the management // account administrator permissions in the new member account. Principals in the // management account can assume the role. Organizations clones the company name // and address information for the new account from the organization's management -// account. This operation can be called only from the organization's management -// account. For more information about creating accounts, see Creating a member -// account in your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html) -// in the Organizations User Guide. +// account. +// +// This operation can be called only from the organization's management account. +// +// For more information about creating accounts, see [Creating a member account in your organization] in the Organizations User +// Guide. +// // - When you create an account in an organization using the Organizations // console, API, or CLI commands, the information required for the account to -// operate as a standalone account, such as a payment method and signing the end -// user license agreement (EULA) is not automatically collected. If you must remove -// an account from your organization later, you can do so only after you provide -// the missing information. For more information, see Considerations before -// removing an account from an organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) +// operate as a standalone account, such as a payment method is not automatically +// collected. If you must remove an account from your organization later, you can +// do so only after you provide the missing information. For more information, see [Considerations before removing an account from an organization] // in the Organizations User Guide. +// // - If you get an exception that indicates that you exceeded your account -// limits for the organization, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/) -// . +// limits for the organization, contact [Amazon Web Services Support]. +// // - If you get an exception that indicates that the operation failed because // your organization is still initializing, wait one hour and then try again. If -// the error persists, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/) -// . +// the error persists, contact [Amazon Web Services Support]. +// // - Using CreateAccount to create multiple temporary accounts isn't recommended. // You can only close an account from the Billing and Cost Management console, and // you must be signed in as the root user. For information on the requirements and -// process for closing an account, see Closing a member account in your -// organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html) -// in the Organizations User Guide. +// process for closing an account, see [Closing a member account in your organization]in the Organizations User Guide. // // When you create a member account with this operation, you can choose whether to // create the account with the IAM User and Role Access to Billing Information // switch enabled. If you enable it, IAM users and roles that have appropriate // permissions can view billing information for the account. If you disable it, // only the account root user can access billing information. For information about -// how to disable this switch for an account, see Granting access to your billing -// information and tools (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/control-access-billing.html#grantaccess) -// . +// how to disable this switch for an account, see [Granting access to your billing information and tools]. +// +// [Granting access to your billing information and tools]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/control-access-billing.html#grantaccess +// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/ +// [Logging and monitoring in Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration +// [Organizations and service-linked roles]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs +// [Creating a member account in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html +// [Considerations before removing an account from an organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html +// [Closing a member account in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html func (c *Client) CreateAccount(ctx context.Context, params *CreateAccountInput, optFns ...func(*Options)) (*CreateAccountOutput, error) { if params == nil { params = &CreateAccountInput{} @@ -97,19 +103,30 @@ type CreateAccountInput struct { // The email address of the owner to assign to the new member account. This email // address must not already be associated with another Amazon Web Services account. - // You must use a valid email address to complete account creation. The rules for a - // valid email address: + // You must use a valid email address to complete account creation. + // + // The rules for a valid email address: + // // - The address must be a minimum of 6 and a maximum of 64 characters long. + // // - All characters must be 7-bit ASCII characters. + // // - There must be one and only one @ symbol, which separates the local name // from the domain name. - // - The local name can't contain any of the following characters: whitespace, " - // ' ( ) < > [ ] : ; , \ | % & + // + // - The local name can't contain any of the following characters: + // + // whitespace, " ' ( ) < > [ ] : ; , \ | % & + // // - The local name can't begin with a dot (.) + // // - The domain name can consist of only the characters [a-z],[A-Z],[0-9], // hyphen (-), or dot (.) + // // - The domain name can't begin or end with a hyphen (-) or dot (.) + // // - The domain name must contain at least one dot + // // You can't access the root user of the account or remove an account that was // created with an invalid email address. // @@ -119,37 +136,52 @@ type CreateAccountInput struct { // If set to ALLOW , the new account enables IAM users to access account billing // information if they have the required permissions. If set to DENY , only the // root user of the new account can access account billing information. For more - // information, see About IAM access to the Billing and Cost Management console (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) - // in the Amazon Web Services Billing and Cost Management User Guide. If you don't - // specify this parameter, the value defaults to ALLOW , and IAM users and roles - // with the required permissions can access billing information for the new - // account. + // information, see [About IAM access to the Billing and Cost Management console]in the Amazon Web Services Billing and Cost Management User + // Guide. + // + // If you don't specify this parameter, the value defaults to ALLOW , and IAM users + // and roles with the required permissions can access billing information for the + // new account. + // + // [About IAM access to the Billing and Cost Management console]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate IamUserAccessToBilling types.IAMUserAccessToBilling // The name of an IAM role that Organizations automatically preconfigures in the // new member account. This role trusts the management account, allowing users in // the management account to assume the role, as permitted by the management // account administrator. The role has administrator permissions in the new member - // account. If you don't specify this parameter, the role name defaults to - // OrganizationAccountAccessRole . For more information about how to use this role - // to access the member account, see the following links: - // - Creating the OrganizationAccountAccessRole in an invited member account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role) - // in the Organizations User Guide - // - Steps 2 and 3 in IAM Tutorial: Delegate access across Amazon Web Services - // accounts using IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) - // in the IAM User Guide - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter. The pattern can include uppercase letters, lowercase letters, - // digits with no spaces, and any of the following characters: =,.@- + // account. + // + // If you don't specify this parameter, the role name defaults to + // OrganizationAccountAccessRole . + // + // For more information about how to use this role to access the member account, + // see the following links: + // + // [Creating the OrganizationAccountAccessRole in an invited member account] + // - in the Organizations User Guide + // + // - Steps 2 and 3 in [IAM Tutorial: Delegate access across Amazon Web Services accounts using IAM roles]in the IAM User Guide + // + // The [regex pattern] that is used to validate this parameter. The pattern can include uppercase + // letters, lowercase letters, digits with no spaces, and any of the following + // characters: =,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [Creating the OrganizationAccountAccessRole in an invited member account]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role + // [IAM Tutorial: Delegate access across Amazon Web Services accounts using IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html RoleName *string // A list of tags that you want to attach to the newly created account. For each // tag in the list, you must specify both a tag key and a value. You can set the // value to an empty string, but you can't set it to null . For more information - // about tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) - // in the Organizations User Guide. If any one of the tags is not valid or if you - // exceed the maximum allowed number of tags for an account, then the entire - // request fails and the account is not created. + // about tagging, see [Tagging Organizations resources]in the Organizations User Guide. + // + // If any one of the tags is not valid or if you exceed the maximum allowed number + // of tags for an account, then the entire request fails and the account is not + // created. + // + // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html Tags []types.Tag noSmithyDocumentSerde @@ -160,11 +192,12 @@ type CreateAccountOutput struct { // A structure that contains details about the request to create an account. This // response structure might not be fully populated when you first receive it // because account creation is an asynchronous process. You can pass the returned - // CreateAccountStatus ID as a parameter to DescribeCreateAccountStatus to get - // status about the progress of the request at later times. You can also check the - // CloudTrail log for the CreateAccountResult event. For more information, see - // Logging and monitoring in Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html) - // in the Organizations User Guide. + // CreateAccountStatus ID as a parameter to DescribeCreateAccountStatus to get status about the progress of + // the request at later times. You can also check the CloudTrail log for the + // CreateAccountResult event. For more information, see [Logging and monitoring in Organizations] in the Organizations User + // Guide. + // + // [Logging and monitoring in Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html CreateAccountStatus *types.CreateAccountStatus // Metadata pertaining to the operation's result. @@ -195,25 +228,25 @@ func (c *Client) addOperationCreateAccountMiddlewares(stack *middleware.Stack, o if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -228,13 +261,19 @@ func (c *Client) addOperationCreateAccountMiddlewares(stack *middleware.Stack, o if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccountValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccount(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateGovCloudAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateGovCloudAccount.go index c4fbda72..6093bf38 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateGovCloudAccount.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateGovCloudAccount.go @@ -6,106 +6,124 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This action is available if all of the following are true: +// // - You're authorized to create accounts in the Amazon Web Services GovCloud // (US) Region. For more information on the Amazon Web Services GovCloud (US) -// Region, see the Amazon Web Services GovCloud User Guide. (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/welcome.html) +// Region, see the [Amazon Web Services GovCloud User Guide.] +// // - You already have an account in the Amazon Web Services GovCloud (US) Region // that is paired with a management account of an organization in the commercial // Region. +// // - You call this action from the management account of your organization in // the commercial Region. +// // - You have the organizations:CreateGovCloudAccount permission. // // Organizations automatically creates the required service-linked role named -// AWSServiceRoleForOrganizations . For more information, see Organizations and -// service-linked roles (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs) -// in the Organizations User Guide. Amazon Web Services automatically enables -// CloudTrail for Amazon Web Services GovCloud (US) accounts, but you should also -// do the following: +// AWSServiceRoleForOrganizations . For more information, see [Organizations and service-linked roles] in the +// Organizations User Guide. +// +// Amazon Web Services automatically enables CloudTrail for Amazon Web Services +// GovCloud (US) accounts, but you should also do the following: +// // - Verify that CloudTrail is enabled to store logs. -// - Create an Amazon S3 bucket for CloudTrail log storage. For more -// information, see Verifying CloudTrail Is Enabled (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/verifying-cloudtrail.html) -// in the Amazon Web Services GovCloud User Guide. +// +// - Create an Amazon S3 bucket for CloudTrail log storage. +// +// For more information, see [Verifying CloudTrail Is Enabled]in the Amazon Web Services GovCloud User Guide. // // If the request includes tags, then the requester must have the // organizations:TagResource permission. The tags are attached to the commercial // account associated with the GovCloud account, rather than the GovCloud account -// itself. To add tags to the GovCloud account, call the TagResource operation in -// the GovCloud Region after the new GovCloud account exists. You call this action -// from the management account of your organization in the commercial Region to -// create a standalone Amazon Web Services account in the Amazon Web Services -// GovCloud (US) Region. After the account is created, the management account of an -// organization in the Amazon Web Services GovCloud (US) Region can invite it to -// that organization. For more information on inviting standalone accounts in the -// Amazon Web Services GovCloud (US) to join an organization, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) -// in the Amazon Web Services GovCloud User Guide. Calling CreateGovCloudAccount -// is an asynchronous request that Amazon Web Services performs in the background. -// Because CreateGovCloudAccount operates asynchronously, it can return a -// successful completion message even though account initialization might still be -// in progress. You might need to wait a few minutes before you can successfully -// access the account. To check the status of the request, do one of the following: +// itself. To add tags to the GovCloud account, call the TagResourceoperation in the GovCloud +// Region after the new GovCloud account exists. +// +// You call this action from the management account of your organization in the +// commercial Region to create a standalone Amazon Web Services account in the +// Amazon Web Services GovCloud (US) Region. After the account is created, the +// management account of an organization in the Amazon Web Services GovCloud (US) +// Region can invite it to that organization. For more information on inviting +// standalone accounts in the Amazon Web Services GovCloud (US) to join an +// organization, see [Organizations]in the Amazon Web Services GovCloud User Guide. +// +// Calling CreateGovCloudAccount is an asynchronous request that Amazon Web +// Services performs in the background. Because CreateGovCloudAccount operates +// asynchronously, it can return a successful completion message even though +// account initialization might still be in progress. You might need to wait a few +// minutes before you can successfully access the account. To check the status of +// the request, do one of the following: // // - Use the OperationId response element from this operation to provide as a -// parameter to the DescribeCreateAccountStatus operation. +// parameter to the DescribeCreateAccountStatusoperation. +// // - Check the CloudTrail log for the CreateAccountResult event. For information -// on using CloudTrail with Organizations, see Logging and monitoring in -// Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html) -// in the Organizations User Guide. +// on using CloudTrail with Organizations, see [Logging and monitoring in Organizations]in the Organizations User Guide. // // When you call the CreateGovCloudAccount action, you create two accounts: a // standalone account in the Amazon Web Services GovCloud (US) Region and an // associated account in the commercial Region for billing and support purposes. // The account in the commercial Region is automatically a member of the // organization whose credentials made the request. Both accounts are associated -// with the same email address. A role is created in the new account in the -// commercial Region that allows the management account in the organization in the -// commercial Region to assume it. An Amazon Web Services GovCloud (US) account is -// then created and associated with the commercial account that you just created. A -// role is also created in the new Amazon Web Services GovCloud (US) account that -// can be assumed by the Amazon Web Services GovCloud (US) account that is -// associated with the management account of the commercial organization. For more -// information and to view a diagram that explains how account access works, see -// Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) -// in the Amazon Web Services GovCloud User Guide. For more information about -// creating accounts, see Creating a member account in your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html) -// in the Organizations User Guide. +// with the same email address. +// +// A role is created in the new account in the commercial Region that allows the +// management account in the organization in the commercial Region to assume it. An +// Amazon Web Services GovCloud (US) account is then created and associated with +// the commercial account that you just created. A role is also created in the new +// Amazon Web Services GovCloud (US) account that can be assumed by the Amazon Web +// Services GovCloud (US) account that is associated with the management account of +// the commercial organization. For more information and to view a diagram that +// explains how account access works, see [Organizations]in the Amazon Web Services GovCloud User +// Guide. +// +// For more information about creating accounts, see [Creating a member account in your organization] in the Organizations User +// Guide. +// // - When you create an account in an organization using the Organizations // console, API, or CLI commands, the information required for the account to // operate as a standalone account is not automatically collected. This includes a // payment method and signing the end user license agreement (EULA). If you must // remove an account from your organization later, you can do so only after you -// provide the missing information. For more information, see Considerations -// before removing an account from an organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) -// in the Organizations User Guide. +// provide the missing information. For more information, see [Considerations before removing an account from an organization]in the +// Organizations User Guide. +// // - If you get an exception that indicates that you exceeded your account -// limits for the organization, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/) -// . +// limits for the organization, contact [Amazon Web Services Support]. +// // - If you get an exception that indicates that the operation failed because // your organization is still initializing, wait one hour and then try again. If -// the error persists, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/) -// . +// the error persists, contact [Amazon Web Services Support]. +// // - Using CreateGovCloudAccount to create multiple temporary accounts isn't // recommended. You can only close an account from the Amazon Web Services Billing // and Cost Management console, and you must be signed in as the root user. For -// information on the requirements and process for closing an account, see -// Closing a member account in your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html) -// in the Organizations User Guide. +// information on the requirements and process for closing an account, see [Closing a member account in your organization]in +// the Organizations User Guide. // // When you create a member account with this operation, you can choose whether to // create the account with the IAM User and Role Access to Billing Information // switch enabled. If you enable it, IAM users and roles that have appropriate // permissions can view billing information for the account. If you disable it, // only the account root user can access billing information. For information about -// how to disable this switch for an account, see Granting access to your billing -// information and tools (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html) -// . +// how to disable this switch for an account, see [Granting access to your billing information and tools]. +// +// [Granting access to your billing information and tools]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html +// [Verifying CloudTrail Is Enabled]: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/verifying-cloudtrail.html +// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/ +// [Logging and monitoring in Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html +// [Organizations]: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html +// [Organizations and service-linked roles]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs +// [Creating a member account in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html +// [Considerations before removing an account from an organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html +// [Amazon Web Services GovCloud User Guide.]: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/welcome.html +// [Closing a member account in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html func (c *Client) CreateGovCloudAccount(ctx context.Context, params *CreateGovCloudAccountInput, optFns ...func(*Options)) (*CreateGovCloudAccountOutput, error) { if params == nil { params = &CreateGovCloudAccountInput{} @@ -123,9 +141,10 @@ func (c *Client) CreateGovCloudAccount(ctx context.Context, params *CreateGovClo type CreateGovCloudAccountInput struct { - // The friendly name of the member account. The account name can consist of only - // the characters [a-z],[A-Z],[0-9], hyphen (-), or dot (.) You can't separate - // characters with a dash (–). + // The friendly name of the member account. + // + // The account name can consist of only the characters [a-z],[A-Z],[0-9], hyphen + // (-), or dot (.) You can't separate characters with a dash (–). // // This member is required. AccountName *string @@ -133,18 +152,30 @@ type CreateGovCloudAccountInput struct { // Specifies the email address of the owner to assign to the new member account in // the commercial Region. This email address must not already be associated with // another Amazon Web Services account. You must use a valid email address to - // complete account creation. The rules for a valid email address: + // complete account creation. + // + // The rules for a valid email address: + // // - The address must be a minimum of 6 and a maximum of 64 characters long. + // // - All characters must be 7-bit ASCII characters. + // // - There must be one and only one @ symbol, which separates the local name // from the domain name. - // - The local name can't contain any of the following characters: whitespace, " - // ' ( ) < > [ ] : ; , \ | % & + // + // - The local name can't contain any of the following characters: + // + // whitespace, " ' ( ) < > [ ] : ; , \ | % & + // // - The local name can't begin with a dot (.) + // // - The domain name can consist of only the characters [a-z],[A-Z],[0-9], // hyphen (-), or dot (.) + // // - The domain name can't begin or end with a hyphen (-) or dot (.) + // // - The domain name must contain at least one dot + // // You can't access the root user of the account or remove an account that was // created with an invalid email address. Like all request parameters for // CreateGovCloudAccount , the request for the email address for the Amazon Web @@ -157,42 +188,59 @@ type CreateGovCloudAccountInput struct { // If set to ALLOW , the new linked account in the commercial Region enables IAM // users to access account billing information if they have the required // permissions. If set to DENY , only the root user of the new account can access - // account billing information. For more information, see About IAM access to the - // Billing and Cost Management console (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) - // in the Amazon Web Services Billing and Cost Management User Guide. If you don't - // specify this parameter, the value defaults to ALLOW , and IAM users and roles - // with the required permissions can access billing information for the new - // account. + // account billing information. For more information, see [About IAM access to the Billing and Cost Management console]in the Amazon Web + // Services Billing and Cost Management User Guide. + // + // If you don't specify this parameter, the value defaults to ALLOW , and IAM users + // and roles with the required permissions can access billing information for the + // new account. + // + // [About IAM access to the Billing and Cost Management console]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate IamUserAccessToBilling types.IAMUserAccessToBilling - // (Optional) The name of an IAM role that Organizations automatically - // preconfigures in the new member accounts in both the Amazon Web Services - // GovCloud (US) Region and in the commercial Region. This role trusts the - // management account, allowing users in the management account to assume the role, - // as permitted by the management account administrator. The role has administrator - // permissions in the new member account. If you don't specify this parameter, the - // role name defaults to OrganizationAccountAccessRole . For more information about - // how to use this role to access the member account, see the following links: - // - Creating the OrganizationAccountAccessRole in an invited member account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role) - // in the Organizations User Guide - // - Steps 2 and 3 in IAM Tutorial: Delegate access across Amazon Web Services - // accounts using IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) - // in the IAM User Guide - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter. The pattern can include uppercase letters, lowercase letters, - // digits with no spaces, and any of the following characters: =,.@- + // (Optional) + // + // The name of an IAM role that Organizations automatically preconfigures in the + // new member accounts in both the Amazon Web Services GovCloud (US) Region and in + // the commercial Region. This role trusts the management account, allowing users + // in the management account to assume the role, as permitted by the management + // account administrator. The role has administrator permissions in the new member + // account. + // + // If you don't specify this parameter, the role name defaults to + // OrganizationAccountAccessRole . + // + // For more information about how to use this role to access the member account, + // see the following links: + // + // [Creating the OrganizationAccountAccessRole in an invited member account] + // - in the Organizations User Guide + // + // - Steps 2 and 3 in [IAM Tutorial: Delegate access across Amazon Web Services accounts using IAM roles]in the IAM User Guide + // + // The [regex pattern] that is used to validate this parameter. The pattern can include uppercase + // letters, lowercase letters, digits with no spaces, and any of the following + // characters: =,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [Creating the OrganizationAccountAccessRole in an invited member account]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role + // [IAM Tutorial: Delegate access across Amazon Web Services accounts using IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html RoleName *string // A list of tags that you want to attach to the newly created account. These tags // are attached to the commercial account associated with the GovCloud account, and // not to the GovCloud account itself. To add tags to the actual GovCloud account, - // call the TagResource operation in the GovCloud region after the new GovCloud - // account exists. For each tag in the list, you must specify both a tag key and a - // value. You can set the value to an empty string, but you can't set it to null . - // For more information about tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) - // in the Organizations User Guide. If any one of the tags is not valid or if you - // exceed the maximum allowed number of tags for an account, then the entire - // request fails and the account is not created. + // call the TagResourceoperation in the GovCloud region after the new GovCloud account exists. + // + // For each tag in the list, you must specify both a tag key and a value. You can + // set the value to an empty string, but you can't set it to null . For more + // information about tagging, see [Tagging Organizations resources]in the Organizations User Guide. + // + // If any one of the tags is not valid or if you exceed the maximum allowed number + // of tags for an account, then the entire request fails and the account is not + // created. + // + // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html Tags []types.Tag noSmithyDocumentSerde @@ -200,9 +248,8 @@ type CreateGovCloudAccountInput struct { type CreateGovCloudAccountOutput struct { - // Contains the status about a CreateAccount or CreateGovCloudAccount request to - // create an Amazon Web Services account or an Amazon Web Services GovCloud (US) - // account in an organization. + // Contains the status about a CreateAccount or CreateGovCloudAccount request to create an Amazon Web Services + // account or an Amazon Web Services GovCloud (US) account in an organization. CreateAccountStatus *types.CreateAccountStatus // Metadata pertaining to the operation's result. @@ -233,25 +280,25 @@ func (c *Client) addOperationCreateGovCloudAccountMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -266,13 +313,19 @@ func (c *Client) addOperationCreateGovCloudAccountMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGovCloudAccountValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGovCloudAccount(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganization.go index facd680f..954c15ee 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganization.go @@ -6,23 +6,27 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates an Amazon Web Services organization. The account whose user is calling -// the CreateOrganization operation automatically becomes the management account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account) -// of the new organization. This operation must be called using credentials from -// the account that is to become the new organization's management account. The -// principal must also have the relevant IAM permissions. By default (or if you set -// the FeatureSet parameter to ALL ), the new organization is created with all -// features enabled and service control policies automatically enabled in the root. -// If you instead choose to create the organization supporting only the -// consolidated billing features by setting the FeatureSet parameter to -// CONSOLIDATED_BILLING , no policy types are enabled by default and you can't use -// organization policies. +// the CreateOrganization operation automatically becomes the [management account] of the new +// organization. +// +// This operation must be called using credentials from the account that is to +// become the new organization's management account. The principal must also have +// the relevant IAM permissions. +// +// By default (or if you set the FeatureSet parameter to ALL ), the new +// organization is created with all features enabled and service control policies +// automatically enabled in the root. If you instead choose to create the +// organization supporting only the consolidated billing features by setting the +// FeatureSet parameter to CONSOLIDATED_BILLING , no policy types are enabled by +// default and you can't use organization policies. +// +// [management account]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account func (c *Client) CreateOrganization(ctx context.Context, params *CreateOrganizationInput, optFns ...func(*Options)) (*CreateOrganizationOutput, error) { if params == nil { params = &CreateOrganizationInput{} @@ -42,15 +46,21 @@ type CreateOrganizationInput struct { // Specifies the feature set supported by the new organization. Each feature set // supports different levels of functionality. + // // - CONSOLIDATED_BILLING : All member accounts have their bills consolidated to - // and paid by the management account. For more information, see Consolidated - // billing (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only) - // in the Organizations User Guide. The consolidated billing feature subset isn't - // available for organizations in the Amazon Web Services GovCloud (US) Region. + // and paid by the management account. For more information, see [Consolidated billing]in the + // Organizations User Guide. + // + // The consolidated billing feature subset isn't available for organizations in + // the Amazon Web Services GovCloud (US) Region. + // // - ALL : In addition to all the features supported by the consolidated billing // feature set, the management account can also apply any policy type to any member - // account in the organization. For more information, see All features (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-all) - // in the Organizations User Guide. + // account in the organization. For more information, see [All features]in the Organizations + // User Guide. + // + // [All features]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-all + // [Consolidated billing]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only FeatureSet types.OrganizationFeatureSet noSmithyDocumentSerde @@ -89,25 +99,25 @@ func (c *Client) addOperationCreateOrganizationMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,10 +132,16 @@ func (c *Client) addOperationCreateOrganizationMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOrganization(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganizationalUnit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganizationalUnit.go index d024d237..504836bf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganizationalUnit.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganizationalUnit.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -16,11 +15,16 @@ import ( // container for accounts that enables you to organize your accounts to apply // policies according to your business requirements. The number of levels deep that // you can nest OUs is dependent upon the policy types enabled for that root. For -// service control policies, the limit is five. For more information about OUs, see -// Managing organizational units (OUs) (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_ous.html) -// in the Organizations User Guide. If the request includes tags, then the -// requester must have the organizations:TagResource permission. This operation -// can be called only from the organization's management account. +// service control policies, the limit is five. +// +// For more information about OUs, see [Managing organizational units (OUs)] in the Organizations User Guide. +// +// If the request includes tags, then the requester must have the +// organizations:TagResource permission. +// +// This operation can be called only from the organization's management account. +// +// [Managing organizational units (OUs)]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_ous.html func (c *Client) CreateOrganizationalUnit(ctx context.Context, params *CreateOrganizationalUnitInput, optFns ...func(*Options)) (*CreateOrganizationalUnitOutput, error) { if params == nil { params = &CreateOrganizationalUnitInput{} @@ -44,25 +48,32 @@ type CreateOrganizationalUnitInput struct { Name *string // The unique identifier (ID) of the parent root or OU that you want to create the - // new OU in. The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID - // string requires one of the following: + // new OU in. + // + // The [regex pattern] for a parent ID string requires one of the following: + // // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase // letters or digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. ParentId *string // A list of tags that you want to attach to the newly created OU. For each tag in // the list, you must specify both a tag key and a value. You can set the value to // an empty string, but you can't set it to null . For more information about - // tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) - // in the Organizations User Guide. If any one of the tags is not valid or if you - // exceed the allowed number of tags for an OU, then the entire request fails and - // the OU is not created. + // tagging, see [Tagging Organizations resources]in the Organizations User Guide. + // + // If any one of the tags is not valid or if you exceed the allowed number of tags + // for an OU, then the entire request fails and the OU is not created. + // + // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html Tags []types.Tag noSmithyDocumentSerde @@ -101,25 +112,25 @@ func (c *Client) addOperationCreateOrganizationalUnitMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -134,13 +145,19 @@ func (c *Client) addOperationCreateOrganizationalUnitMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOrganizationalUnitValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOrganizationalUnit(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreatePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreatePolicy.go index 8a47abe8..2fa0f702 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreatePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreatePolicy.go @@ -6,19 +6,24 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a policy of a specified type that you can attach to a root, an -// organizational unit (OU), or an individual Amazon Web Services account. For more -// information about policies and their use, see Managing Organizations policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html) -// . If the request includes tags, then the requester must have the -// organizations:TagResource permission. This operation can be called only from the -// organization's management account or by a member account that is a delegated -// administrator for an Amazon Web Services service. +// organizational unit (OU), or an individual Amazon Web Services account. +// +// For more information about policies and their use, see [Managing Organizations policies]. +// +// If the request includes tags, then the requester must have the +// organizations:TagResource permission. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. +// +// [Managing Organizations policies]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html func (c *Client) CreatePolicy(ctx context.Context, params *CreatePolicyInput, optFns ...func(*Options)) (*CreatePolicyOutput, error) { if params == nil { params = &CreatePolicyInput{} @@ -39,6 +44,11 @@ type CreatePolicyInput struct { // The policy text content to add to the new policy. The text that you supply must // adhere to the rules of the policy type you specify in the Type parameter. // + // The maximum size of a policy document depends on the policy's type. For more + // information, see [Maximum and minimum values]in the Organizations User Guide. + // + // [Maximum and minimum values]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html#min-max-values + // // This member is required. Content *string @@ -47,18 +57,30 @@ type CreatePolicyInput struct { // This member is required. Description *string - // The friendly name to assign to the policy. The regex pattern (http://wikipedia.org/wiki/regex) - // that is used to validate this parameter is a string of any of the characters in - // the ASCII character range. + // The friendly name to assign to the policy. + // + // The [regex pattern] that is used to validate this parameter is a string of any of the + // characters in the ASCII character range. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. Name *string // The type of policy to create. You can specify one of the following values: - // - AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) - // - BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) - // - SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) - // - TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) + // + // [AISERVICES_OPT_OUT_POLICY] + // + // [BACKUP_POLICY] + // + // [SERVICE_CONTROL_POLICY] + // + // [TAG_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html + // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html + // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html + // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. Type types.PolicyType @@ -66,10 +88,12 @@ type CreatePolicyInput struct { // A list of tags that you want to attach to the newly created policy. For each // tag in the list, you must specify both a tag key and a value. You can set the // value to an empty string, but you can't set it to null . For more information - // about tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) - // in the Organizations User Guide. If any one of the tags is not valid or if you - // exceed the allowed number of tags for a policy, then the entire request fails - // and the policy is not created. + // about tagging, see [Tagging Organizations resources]in the Organizations User Guide. + // + // If any one of the tags is not valid or if you exceed the allowed number of tags + // for a policy, then the entire request fails and the policy is not created. + // + // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html Tags []types.Tag noSmithyDocumentSerde @@ -108,25 +132,25 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,13 +165,19 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeclineHandshake.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeclineHandshake.go index 76a757e7..de31c21f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeclineHandshake.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeclineHandshake.go @@ -6,19 +6,21 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Declines a handshake request. This sets the handshake state to DECLINED and -// effectively deactivates the request. This operation can be called only from the -// account that received the handshake. The originator of the handshake can use -// CancelHandshake instead. The originator can't reactivate a declined request, but -// can reinitiate the process with a new handshake request. After you decline a -// handshake, it continues to appear in the results of relevant APIs for only 30 -// days. After that, it's deleted. +// effectively deactivates the request. +// +// This operation can be called only from the account that received the handshake. +// The originator of the handshake can use CancelHandshakeinstead. The originator can't +// reactivate a declined request, but can reinitiate the process with a new +// handshake request. +// +// After you decline a handshake, it continues to appear in the results of +// relevant APIs for only 30 days. After that, it's deleted. func (c *Client) DeclineHandshake(ctx context.Context, params *DeclineHandshakeInput, optFns ...func(*Options)) (*DeclineHandshakeOutput, error) { if params == nil { params = &DeclineHandshakeInput{} @@ -37,9 +39,12 @@ func (c *Client) DeclineHandshake(ctx context.Context, params *DeclineHandshakeI type DeclineHandshakeInput struct { // The unique identifier (ID) of the handshake that you want to decline. You can - // get the ID from the ListHandshakesForAccount operation. The regex pattern (http://wikipedia.org/wiki/regex) - // for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters - // or digits. + // get the ID from the ListHandshakesForAccountoperation. + // + // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. HandshakeId *string @@ -81,25 +86,25 @@ func (c *Client) addOperationDeclineHandshakeMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +119,19 @@ func (c *Client) addOperationDeclineHandshakeMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeclineHandshakeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeclineHandshake(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganization.go index 957fb9b4..8e759dc6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganization.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -62,25 +61,25 @@ func (c *Client) addOperationDeleteOrganizationMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -95,10 +94,16 @@ func (c *Client) addOperationDeleteOrganizationMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOrganization(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganizationalUnit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganizationalUnit.go index 7fd62ada..5cc677d1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganizationalUnit.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganizationalUnit.go @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes an organizational unit (OU) from a root or another OU. You must first -// remove all accounts and child OUs from the OU that you want to delete. This -// operation can be called only from the organization's management account. +// remove all accounts and child OUs from the OU that you want to delete. +// +// This operation can be called only from the organization's management account. func (c *Client) DeleteOrganizationalUnit(ctx context.Context, params *DeleteOrganizationalUnitInput, optFns ...func(*Options)) (*DeleteOrganizationalUnitOutput, error) { if params == nil { params = &DeleteOrganizationalUnitInput{} @@ -32,11 +32,14 @@ func (c *Client) DeleteOrganizationalUnit(ctx context.Context, params *DeleteOrg type DeleteOrganizationalUnitInput struct { // The unique identifier (ID) of the organizational unit that you want to delete. - // You can get the ID from the ListOrganizationalUnitsForParent operation. The - // regex pattern (http://wikipedia.org/wiki/regex) for an organizational unit ID - // string requires "ou-" followed by from 4 to 32 lowercase letters or digits (the - // ID of the root that contains the OU). This string is followed by a second "-" - // dash and from 8 to 32 additional lowercase letters or digits. + // You can get the ID from the ListOrganizationalUnitsForParentoperation. + // + // The [regex pattern] for an organizational unit ID string requires "ou-" followed by from 4 to + // 32 lowercase letters or digits (the ID of the root that contains the OU). This + // string is followed by a second "-" dash and from 8 to 32 additional lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. OrganizationalUnitId *string @@ -73,25 +76,25 @@ func (c *Client) addOperationDeleteOrganizationalUnitMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -106,13 +109,19 @@ func (c *Client) addOperationDeleteOrganizationalUnitMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOrganizationalUnitValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOrganizationalUnit(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeletePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeletePolicy.go index 67bfa0d8..c71f558e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeletePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeletePolicy.go @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the specified policy from your organization. Before you perform this // operation, you must first detach the policy from all organizational units (OUs), -// roots, and accounts. This operation can be called only from the organization's -// management account or by a member account that is a delegated administrator for -// an Amazon Web Services service. +// roots, and accounts. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, optFns ...func(*Options)) (*DeletePolicyOutput, error) { if params == nil { params = &DeletePolicyInput{} @@ -34,10 +35,12 @@ func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, op type DeletePolicyInput struct { // The unique identifier (ID) of the policy that you want to delete. You can get - // the ID from the ListPolicies or ListPoliciesForTarget operations. The regex - // pattern (http://wikipedia.org/wiki/regex) for a policy ID string requires "p-" - // followed by from 8 to 128 lowercase or uppercase letters, digits, or the - // underscore character (_). + // the ID from the ListPoliciesor ListPoliciesForTarget operations. + // + // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase + // or uppercase letters, digits, or the underscore character (_). + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyId *string @@ -74,25 +77,25 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -107,13 +110,19 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteResourcePolicy.go index b7629de8..1b22ad20 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteResourcePolicy.go @@ -6,13 +6,13 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the resource policy from your organization. You can only call this -// operation from the organization's management account. +// Deletes the resource policy from your organization. +// +// You can only call this operation from the organization's management account. func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { if params == nil { params = &DeleteResourcePolicyInput{} @@ -61,25 +61,25 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -94,10 +94,16 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeregisterDelegatedAdministrator.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeregisterDelegatedAdministrator.go index 278c9dfe..4181e490 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeregisterDelegatedAdministrator.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeregisterDelegatedAdministrator.go @@ -6,22 +6,25 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the specified member Amazon Web Services account as a delegated -// administrator for the specified Amazon Web Services service. Deregistering a -// delegated administrator can have unintended impacts on the functionality of the -// enabled Amazon Web Services service. See the documentation for the enabled -// service before you deregister a delegated administrator so that you understand -// any potential impacts. You can run this action only for Amazon Web Services -// services that support this feature. For a current list of services that support -// it, see the column Supports Delegated Administrator in the table at Amazon Web -// Services Services that you can use with Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html) -// in the Organizations User Guide. This operation can be called only from the -// organization's management account. +// administrator for the specified Amazon Web Services service. +// +// Deregistering a delegated administrator can have unintended impacts on the +// functionality of the enabled Amazon Web Services service. See the documentation +// for the enabled service before you deregister a delegated administrator so that +// you understand any potential impacts. +// +// You can run this action only for Amazon Web Services services that support this +// feature. For a current list of services that support it, see the column Supports +// Delegated Administrator in the table at [Amazon Web Services Services that you can use with Organizations]in the Organizations User Guide. +// +// This operation can be called only from the organization's management account. +// +// [Amazon Web Services Services that you can use with Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html func (c *Client) DeregisterDelegatedAdministrator(ctx context.Context, params *DeregisterDelegatedAdministratorInput, optFns ...func(*Options)) (*DeregisterDelegatedAdministratorOutput, error) { if params == nil { params = &DeregisterDelegatedAdministratorInput{} @@ -46,11 +49,12 @@ type DeregisterDelegatedAdministratorInput struct { AccountId *string // The service principal name of an Amazon Web Services service for which the - // account is a delegated administrator. Delegated administrator privileges are - // revoked for only the specified Amazon Web Services service from the member - // account. If the specified service is the only service for which the member - // account is a delegated administrator, the operation also revokes Organizations - // read action permissions. + // account is a delegated administrator. + // + // Delegated administrator privileges are revoked for only the specified Amazon + // Web Services service from the member account. If the specified service is the + // only service for which the member account is a delegated administrator, the + // operation also revokes Organizations read action permissions. // // This member is required. ServicePrincipal *string @@ -87,25 +91,25 @@ func (c *Client) addOperationDeregisterDelegatedAdministratorMiddlewares(stack * if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -120,13 +124,19 @@ func (c *Client) addOperationDeregisterDelegatedAdministratorMiddlewares(stack * if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterDelegatedAdministratorValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterDelegatedAdministrator(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeAccount.go index 1f745c25..2adc03c4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeAccount.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeAccount.go @@ -6,15 +6,15 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves Organizations-related information about the specified account. This -// operation can be called only from the organization's management account or by a -// member account that is a delegated administrator for an Amazon Web Services +// Retrieves Organizations-related information about the specified account. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services // service. func (c *Client) DescribeAccount(ctx context.Context, params *DescribeAccountInput, optFns ...func(*Options)) (*DescribeAccountOutput, error) { if params == nil { @@ -34,9 +34,11 @@ func (c *Client) DescribeAccount(ctx context.Context, params *DescribeAccountInp type DescribeAccountInput struct { // The unique identifier (ID) of the Amazon Web Services account that you want - // information about. You can get the ID from the ListAccounts or - // ListAccountsForParent operations. The regex pattern (http://wikipedia.org/wiki/regex) - // for an account ID string requires exactly 12 digits. + // information about. You can get the ID from the ListAccountsor ListAccountsForParent operations. + // + // The [regex pattern] for an account ID string requires exactly 12 digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccountId *string @@ -77,25 +79,25 @@ func (c *Client) addOperationDescribeAccountMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +112,19 @@ func (c *Client) addOperationDescribeAccountMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccount(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeCreateAccountStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeCreateAccountStatus.go index 5e6bb83a..8d3f38bd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeCreateAccountStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeCreateAccountStatus.go @@ -6,13 +6,13 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the current status of an asynchronous request to create an account. +// // This operation can be called only from the organization's management account or // by a member account that is a delegated administrator for an Amazon Web Services // service. @@ -34,10 +34,13 @@ func (c *Client) DescribeCreateAccountStatus(ctx context.Context, params *Descri type DescribeCreateAccountStatusInput struct { // Specifies the Id value that uniquely identifies the CreateAccount request. You - // can get the value from the CreateAccountStatus.Id response in an earlier - // CreateAccount request, or from the ListCreateAccountStatus operation. The regex - // pattern (http://wikipedia.org/wiki/regex) for a create account request ID string - // requires "car-" followed by from 8 to 32 lowercase letters or digits. + // can get the value from the CreateAccountStatus.Id response in an earlier CreateAccount + // request, or from the ListCreateAccountStatusoperation. + // + // The [regex pattern] for a create account request ID string requires "car-" followed by from 8 + // to 32 lowercase letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. CreateAccountRequestId *string @@ -78,25 +81,25 @@ func (c *Client) addOperationDescribeCreateAccountStatusMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -111,13 +114,19 @@ func (c *Client) addOperationDescribeCreateAccountStatusMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCreateAccountStatusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCreateAccountStatus(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeEffectivePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeEffectivePolicy.go index d14ebe4c..26afbc2c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeEffectivePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeEffectivePolicy.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,11 +14,17 @@ import ( // Returns the contents of the effective policy for specified policy type and // account. The effective policy is the aggregation of any policies of the // specified type that the account inherits, plus any policy of that type that is -// directly attached to the account. This operation applies only to policy types -// other than service control policies (SCPs). For more information about policy -// inheritance, see Understanding management policy inheritance (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inheritance_mgmt.html) -// in the Organizations User Guide. This operation can be called from any account -// in the organization. +// directly attached to the account. +// +// This operation applies only to policy types other than service control policies +// (SCPs). +// +// For more information about policy inheritance, see [Understanding management policy inheritance] in the Organizations User +// Guide. +// +// This operation can be called from any account in the organization. +// +// [Understanding management policy inheritance]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inheritance_mgmt.html func (c *Client) DescribeEffectivePolicy(ctx context.Context, params *DescribeEffectivePolicyInput, optFns ...func(*Options)) (*DescribeEffectivePolicyOutput, error) { if params == nil { params = &DescribeEffectivePolicyInput{} @@ -39,9 +44,16 @@ type DescribeEffectivePolicyInput struct { // The type of policy that you want information about. You can specify one of the // following values: - // - AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) - // - BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) - // - TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) + // + // [AISERVICES_OPT_OUT_POLICY] + // + // [BACKUP_POLICY] + // + // [TAG_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html + // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html + // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. PolicyType types.EffectivePolicyType @@ -87,25 +99,25 @@ func (c *Client) addOperationDescribeEffectivePolicyMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -120,13 +132,19 @@ func (c *Client) addOperationDescribeEffectivePolicyMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEffectivePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEffectivePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeHandshake.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeHandshake.go index 833bb1dc..bcecb66b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeHandshake.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeHandshake.go @@ -6,18 +6,19 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves information about a previously requested handshake. The handshake ID -// comes from the response to the original InviteAccountToOrganization operation -// that generated the handshake. You can access handshakes that are ACCEPTED , -// DECLINED , or CANCELED for only 30 days after they change to that state. -// They're then deleted and no longer accessible. This operation can be called from -// any account in the organization. +// comes from the response to the original InviteAccountToOrganizationoperation that generated the handshake. +// +// You can access handshakes that are ACCEPTED , DECLINED , or CANCELED for only +// 30 days after they change to that state. They're then deleted and no longer +// accessible. +// +// This operation can be called from any account in the organization. func (c *Client) DescribeHandshake(ctx context.Context, params *DescribeHandshakeInput, optFns ...func(*Options)) (*DescribeHandshakeOutput, error) { if params == nil { params = &DescribeHandshakeInput{} @@ -36,10 +37,12 @@ func (c *Client) DescribeHandshake(ctx context.Context, params *DescribeHandshak type DescribeHandshakeInput struct { // The unique identifier (ID) of the handshake that you want information about. - // You can get the ID from the original call to InviteAccountToOrganization , or - // from a call to ListHandshakesForAccount or ListHandshakesForOrganization . The - // regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string requires - // "h-" followed by from 8 to 32 lowercase letters or digits. + // You can get the ID from the original call to InviteAccountToOrganization, or from a call to ListHandshakesForAccount or ListHandshakesForOrganization. + // + // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. HandshakeId *string @@ -80,25 +83,25 @@ func (c *Client) addOperationDescribeHandshakeMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +116,19 @@ func (c *Client) addOperationDescribeHandshakeMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHandshakeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHandshake(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganization.go index 9cac7d90..878c37d0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganization.go @@ -6,17 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves information about the organization that the user's account belongs -// to. This operation can be called from any account in the organization. Even if a -// policy type is shown as available in the organization, you can disable it -// separately at the root level with DisablePolicyType . Use ListRoots to see the -// status of policy types for a specified root. +// Retrieves information about the organization that the user's account belongs to. +// +// This operation can be called from any account in the organization. +// +// Even if a policy type is shown as available in the organization, you can +// disable it separately at the root level with DisablePolicyType. Use ListRoots to see the status of policy +// types for a specified root. func (c *Client) DescribeOrganization(ctx context.Context, params *DescribeOrganizationInput, optFns ...func(*Options)) (*DescribeOrganizationOutput, error) { if params == nil { params = &DescribeOrganizationInput{} @@ -38,11 +39,12 @@ type DescribeOrganizationInput struct { type DescribeOrganizationOutput struct { - // A structure that contains information about the organization. The - // AvailablePolicyTypes part of the response is deprecated, and you shouldn't use - // it in your apps. It doesn't include any policy type supported by Organizations - // other than SCPs. To determine which policy types are enabled in your - // organization, use the ListRoots operation. + // A structure that contains information about the organization. + // + // The AvailablePolicyTypes part of the response is deprecated, and you shouldn't + // use it in your apps. It doesn't include any policy type supported by + // Organizations other than SCPs. To determine which policy types are enabled in + // your organization, use the ListRootsoperation. Organization *types.Organization // Metadata pertaining to the operation's result. @@ -73,25 +75,25 @@ func (c *Client) addOperationDescribeOrganizationMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -106,10 +108,16 @@ func (c *Client) addOperationDescribeOrganizationMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganization(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganizationalUnit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganizationalUnit.go index 9ad254d1..e1bef40d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganizationalUnit.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganizationalUnit.go @@ -6,15 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves information about an organizational unit (OU). This operation can be -// called only from the organization's management account or by a member account -// that is a delegated administrator for an Amazon Web Services service. +// Retrieves information about an organizational unit (OU). +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) DescribeOrganizationalUnit(ctx context.Context, params *DescribeOrganizationalUnitInput, optFns ...func(*Options)) (*DescribeOrganizationalUnitOutput, error) { if params == nil { params = &DescribeOrganizationalUnitInput{} @@ -33,11 +34,14 @@ func (c *Client) DescribeOrganizationalUnit(ctx context.Context, params *Describ type DescribeOrganizationalUnitInput struct { // The unique identifier (ID) of the organizational unit that you want details - // about. You can get the ID from the ListOrganizationalUnitsForParent operation. - // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational unit - // ID string requires "ou-" followed by from 4 to 32 lowercase letters or digits - // (the ID of the root that contains the OU). This string is followed by a second - // "-" dash and from 8 to 32 additional lowercase letters or digits. + // about. You can get the ID from the ListOrganizationalUnitsForParentoperation. + // + // The [regex pattern] for an organizational unit ID string requires "ou-" followed by from 4 to + // 32 lowercase letters or digits (the ID of the root that contains the OU). This + // string is followed by a second "-" dash and from 8 to 32 additional lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. OrganizationalUnitId *string @@ -78,25 +82,25 @@ func (c *Client) addOperationDescribeOrganizationalUnitMiddlewares(stack *middle if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -111,13 +115,19 @@ func (c *Client) addOperationDescribeOrganizationalUnitMiddlewares(stack *middle if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOrganizationalUnitValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationalUnit(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribePolicy.go index d19018f5..a064978c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribePolicy.go @@ -6,15 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves information about a policy. This operation can be called only from -// the organization's management account or by a member account that is a delegated -// administrator for an Amazon Web Services service. +// Retrieves information about a policy. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) DescribePolicy(ctx context.Context, params *DescribePolicyInput, optFns ...func(*Options)) (*DescribePolicyOutput, error) { if params == nil { params = &DescribePolicyInput{} @@ -33,10 +34,12 @@ func (c *Client) DescribePolicy(ctx context.Context, params *DescribePolicyInput type DescribePolicyInput struct { // The unique identifier (ID) of the policy that you want details about. You can - // get the ID from the ListPolicies or ListPoliciesForTarget operations. The regex - // pattern (http://wikipedia.org/wiki/regex) for a policy ID string requires "p-" - // followed by from 8 to 128 lowercase or uppercase letters, digits, or the - // underscore character (_). + // get the ID from the ListPoliciesor ListPoliciesForTarget operations. + // + // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase + // or uppercase letters, digits, or the underscore character (_). + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyId *string @@ -77,25 +80,25 @@ func (c *Client) addOperationDescribePolicyMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +113,19 @@ func (c *Client) addOperationDescribePolicyMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeResourcePolicy.go index 976e17b4..78550e50 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeResourcePolicy.go @@ -6,15 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves information about a resource policy. This operation can be called -// only from the organization's management account or by a member account that is a -// delegated administrator for an Amazon Web Services service. +// Retrieves information about a resource policy. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) DescribeResourcePolicy(ctx context.Context, params *DescribeResourcePolicyInput, optFns ...func(*Options)) (*DescribeResourcePolicyOutput, error) { if params == nil { params = &DescribeResourcePolicyInput{} @@ -67,25 +68,25 @@ func (c *Client) addOperationDescribeResourcePolicyMiddlewares(stack *middleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -100,10 +101,16 @@ func (c *Client) addOperationDescribeResourcePolicyMiddlewares(stack *middleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeResourcePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DetachPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DetachPolicy.go index 2973dc3b..e1ade31f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DetachPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DetachPolicy.go @@ -6,26 +6,31 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Detaches a policy from a target root, organizational unit (OU), or account. If -// the policy being detached is a service control policy (SCP), the changes to +// Detaches a policy from a target root, organizational unit (OU), or account. +// +// If the policy being detached is a service control policy (SCP), the changes to // permissions for Identity and Access Management (IAM) users and roles in affected -// accounts are immediate. Every root, OU, and account must have at least one SCP -// attached. If you want to replace the default FullAWSAccess policy with an SCP -// that limits the permissions that can be delegated, you must attach the -// replacement SCP before you can remove the default SCP. This is the authorization -// strategy of an " allow list (https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_allowlist) -// ". If you instead attach a second SCP and leave the FullAWSAccess SCP still -// attached, and specify "Effect": "Deny" in the second SCP to override the -// "Effect": "Allow" in the FullAWSAccess policy (or any other attached SCP), -// you're using the authorization strategy of a " deny list (https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_denylist) -// ". This operation can be called only from the organization's management account -// or by a member account that is a delegated administrator for an Amazon Web -// Services service. +// accounts are immediate. +// +// Every root, OU, and account must have at least one SCP attached. If you want to +// replace the default FullAWSAccess policy with an SCP that limits the +// permissions that can be delegated, you must attach the replacement SCP before +// you can remove the default SCP. This is the authorization strategy of an "[allow list] ". If +// you instead attach a second SCP and leave the FullAWSAccess SCP still attached, +// and specify "Effect": "Deny" in the second SCP to override the "Effect": "Allow" +// in the FullAWSAccess policy (or any other attached SCP), you're using the +// authorization strategy of a "[deny list] ". +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. +// +// [deny list]: https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_denylist +// [allow list]: https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_allowlist func (c *Client) DetachPolicy(ctx context.Context, params *DetachPolicyInput, optFns ...func(*Options)) (*DetachPolicyOutput, error) { if params == nil { params = &DetachPolicyInput{} @@ -44,25 +49,33 @@ func (c *Client) DetachPolicy(ctx context.Context, params *DetachPolicyInput, op type DetachPolicyInput struct { // The unique identifier (ID) of the policy you want to detach. You can get the ID - // from the ListPolicies or ListPoliciesForTarget operations. The regex pattern (http://wikipedia.org/wiki/regex) - // for a policy ID string requires "p-" followed by from 8 to 128 lowercase or - // uppercase letters, digits, or the underscore character (_). + // from the ListPoliciesor ListPoliciesForTarget operations. + // + // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase + // or uppercase letters, digits, or the underscore character (_). + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyId *string // The unique identifier (ID) of the root, OU, or account that you want to detach - // the policy from. You can get the ID from the ListRoots , - // ListOrganizationalUnitsForParent , or ListAccounts operations. The regex pattern (http://wikipedia.org/wiki/regex) - // for a target ID string requires one of the following: + // the policy from. You can get the ID from the ListRoots, ListOrganizationalUnitsForParent, or ListAccounts operations. + // + // The [regex pattern] for a target ID string requires one of the following: + // // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase // letters or digits. + // // - Account - A string that consists of exactly 12 digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. TargetId *string @@ -98,25 +111,25 @@ func (c *Client) addOperationDetachPolicyMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -131,13 +144,19 @@ func (c *Client) addOperationDetachPolicyMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisableAWSServiceAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisableAWSServiceAccess.go index 3c063ea6..ed3f6e9b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisableAWSServiceAccess.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisableAWSServiceAccess.go @@ -6,39 +6,44 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Disables the integration of an Amazon Web Services service (the service that is // specified by ServicePrincipal ) with Organizations. When you disable -// integration, the specified service no longer can create a service-linked role (https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) -// in new accounts in your organization. This means the service can't perform -// operations on your behalf on any new accounts in your organization. The service -// can still perform operations in older accounts until the service completes its -// clean-up from Organizations. We strongly recommend that you don't use this -// command to disable integration between Organizations and the specified Amazon -// Web Services service. Instead, use the console or commands that are provided by -// the specified service. This lets the trusted service perform any required -// initialization when enabling trusted access, such as creating any required -// resources and any required clean up of resources when disabling trusted access. -// For information about how to disable trusted service access to your organization -// using the trusted service, see the Learn more link under the Supports Trusted -// Access column at Amazon Web Services services that you can use with -// Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html) -// . on this page. If you disable access by using this command, it causes the -// following actions to occur: +// integration, the specified service no longer can create a [service-linked role]in new accounts in +// your organization. This means the service can't perform operations on your +// behalf on any new accounts in your organization. The service can still perform +// operations in older accounts until the service completes its clean-up from +// Organizations. +// +// We strongly recommend that you don't use this command to disable integration +// between Organizations and the specified Amazon Web Services service. Instead, +// use the console or commands that are provided by the specified service. This +// lets the trusted service perform any required initialization when enabling +// trusted access, such as creating any required resources and any required clean +// up of resources when disabling trusted access. +// +// For information about how to disable trusted service access to your +// organization using the trusted service, see the Learn more link under the +// Supports Trusted Access column at [Amazon Web Services services that you can use with Organizations]. on this page. +// +// If you disable access by using this command, it causes the following actions to +// occur: +// // - The service can no longer create a service-linked role in the accounts in // your organization. This means that the service can't perform operations on your // behalf on any new accounts in your organization. The service can still perform // operations in older accounts until the service completes its clean-up from // Organizations. +// // - The service can no longer perform tasks in the member accounts in the // organization, unless those operations are explicitly permitted by the IAM // policies that are attached to your roles. This includes any data aggregation // from the member accounts to the management account, or to a delegated // administrator account, where relevant. +// // - Some services detect this and clean up any remaining data or resources // related to the integration, while other services stop accessing the organization // but leave any historical data and configuration in place to support a possible @@ -48,14 +53,20 @@ import ( // ensures that the other service is aware that it can clean up any resources that // are required only for the integration. How the service cleans up its resources // in the organization's accounts depends on that service. For more information, -// see the documentation for the other Amazon Web Services service. After you -// perform the DisableAWSServiceAccess operation, the specified service can no -// longer perform operations in your organization's accounts For more information -// about integrating other services with Organizations, including the list of -// services that work with Organizations, see Using Organizations with other -// Amazon Web Services services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) -// in the Organizations User Guide. This operation can be called only from the -// organization's management account. +// see the documentation for the other Amazon Web Services service. +// +// After you perform the DisableAWSServiceAccess operation, the specified service +// can no longer perform operations in your organization's accounts +// +// For more information about integrating other services with Organizations, +// including the list of services that work with Organizations, see [Using Organizations with other Amazon Web Services services]in the +// Organizations User Guide. +// +// This operation can be called only from the organization's management account. +// +// [Amazon Web Services services that you can use with Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html +// [Using Organizations with other Amazon Web Services services]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html +// [service-linked role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html func (c *Client) DisableAWSServiceAccess(ctx context.Context, params *DisableAWSServiceAccessInput, optFns ...func(*Options)) (*DisableAWSServiceAccessOutput, error) { if params == nil { params = &DisableAWSServiceAccessInput{} @@ -112,25 +123,25 @@ func (c *Client) addOperationDisableAWSServiceAccessMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -145,13 +156,19 @@ func (c *Client) addOperationDisableAWSServiceAccessMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableAWSServiceAccessValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableAWSServiceAccess(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisablePolicyType.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisablePolicyType.go index 2ae96eb3..445234d9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisablePolicyType.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisablePolicyType.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -16,16 +15,21 @@ import ( // can be attached to entities in a root only if that type is enabled in the root. // After you perform this operation, you no longer can attach policies of the // specified type to that root or to any organizational unit (OU) or account in -// that root. You can undo this by using the EnablePolicyType operation. This is -// an asynchronous request that Amazon Web Services performs in the background. If -// you disable a policy type for a root, it still appears enabled for the -// organization if all features (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) -// are enabled for the organization. Amazon Web Services recommends that you first -// use ListRoots to see the status of policy types for a specified root, and then -// use this operation. This operation can be called only from the organization's -// management account or by a member account that is a delegated administrator for -// an Amazon Web Services service. To view the status of available policy types in -// the organization, use DescribeOrganization . +// that root. You can undo this by using the EnablePolicyTypeoperation. +// +// This is an asynchronous request that Amazon Web Services performs in the +// background. If you disable a policy type for a root, it still appears enabled +// for the organization if [all features]are enabled for the organization. Amazon Web Services +// recommends that you first use ListRootsto see the status of policy types for a specified +// root, and then use this operation. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. +// +// To view the status of available policy types in the organization, use DescribeOrganization. +// +// [all features]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html func (c *Client) DisablePolicyType(ctx context.Context, params *DisablePolicyTypeInput, optFns ...func(*Options)) (*DisablePolicyTypeOutput, error) { if params == nil { params = &DisablePolicyTypeInput{} @@ -45,18 +49,30 @@ type DisablePolicyTypeInput struct { // The policy type that you want to disable in this root. You can specify one of // the following values: - // - AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) - // - BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) - // - SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) - // - TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) + // + // [AISERVICES_OPT_OUT_POLICY] + // + // [BACKUP_POLICY] + // + // [SERVICE_CONTROL_POLICY] + // + // [TAG_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html + // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html + // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html + // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. PolicyType types.PolicyType // The unique identifier (ID) of the root in which you want to disable a policy - // type. You can get the ID from the ListRoots operation. The regex pattern (http://wikipedia.org/wiki/regex) - // for a root ID string requires "r-" followed by from 4 to 32 lowercase letters or - // digits. + // type. You can get the ID from the ListRootsoperation. + // + // The [regex pattern] for a root ID string requires "r-" followed by from 4 to 32 lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RootId *string @@ -97,25 +113,25 @@ func (c *Client) addOperationDisablePolicyTypeMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -130,13 +146,19 @@ func (c *Client) addOperationDisablePolicyTypeMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisablePolicyTypeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisablePolicyType(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAWSServiceAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAWSServiceAccess.go index 2a45c26b..d76266dd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAWSServiceAccess.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAWSServiceAccess.go @@ -6,28 +6,33 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Enables the integration of an Amazon Web Services service (the service that is // specified by ServicePrincipal ) with Organizations. When you enable integration, -// you allow the specified service to create a service-linked role (https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) -// in all the accounts in your organization. This allows the service to perform -// operations on your behalf in your organization and its accounts. We recommend -// that you enable integration between Organizations and the specified Amazon Web -// Services service by using the console or commands that are provided by the -// specified service. Doing so ensures that the service is aware that it can create -// the resources that are required for the integration. How the service creates -// those resources in the organization's accounts depends on that service. For more -// information, see the documentation for the other Amazon Web Services service. +// you allow the specified service to create a [service-linked role]in all the accounts in your +// organization. This allows the service to perform operations on your behalf in +// your organization and its accounts. +// +// We recommend that you enable integration between Organizations and the +// specified Amazon Web Services service by using the console or commands that are +// provided by the specified service. Doing so ensures that the service is aware +// that it can create the resources that are required for the integration. How the +// service creates those resources in the organization's accounts depends on that +// service. For more information, see the documentation for the other Amazon Web +// Services service. +// // For more information about enabling services to integrate with Organizations, -// see Using Organizations with other Amazon Web Services services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) -// in the Organizations User Guide. You can only call this operation from the -// organization's management account and only if the organization has enabled all -// features (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) -// . +// see [Using Organizations with other Amazon Web Services services]in the Organizations User Guide. +// +// You can only call this operation from the organization's management account and +// only if the organization has [enabled all features]. +// +// [enabled all features]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html +// [Using Organizations with other Amazon Web Services services]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html +// [service-linked role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html func (c *Client) EnableAWSServiceAccess(ctx context.Context, params *EnableAWSServiceAccessInput, optFns ...func(*Options)) (*EnableAWSServiceAccessOutput, error) { if params == nil { params = &EnableAWSServiceAccessInput{} @@ -84,25 +89,25 @@ func (c *Client) addOperationEnableAWSServiceAccessMiddlewares(stack *middleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +122,19 @@ func (c *Client) addOperationEnableAWSServiceAccessMiddlewares(stack *middleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableAWSServiceAccessValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableAWSServiceAccess(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAllFeatures.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAllFeatures.go index 9cac9537..91661c72 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAllFeatures.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAllFeatures.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -16,25 +15,33 @@ import ( // policies that can restrict the services and actions that can be called in each // account. Until you enable all features, you have access only to consolidated // billing, and you can't use any of the advanced account administration features -// that Organizations supports. For more information, see Enabling all features in -// your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) -// in the Organizations User Guide. This operation is required only for -// organizations that were created explicitly with only the consolidated billing -// features enabled. Calling this operation sends a handshake to every invited -// account in the organization. The feature set change can be finalized and the -// additional features enabled only after all administrators in the invited -// accounts approve the change by accepting the handshake. After you enable all -// features, you can separately enable or disable individual policy types in a root -// using EnablePolicyType and DisablePolicyType . To see the status of policy types -// in a root, use ListRoots . After all invited member accounts accept the -// handshake, you finalize the feature set change by accepting the handshake that -// contains "Action": "ENABLE_ALL_FEATURES" . This completes the change. After you -// enable all features in your organization, the management account in the -// organization can apply policies on all member accounts. These policies can +// that Organizations supports. For more information, see [Enabling all features in your organization]in the Organizations +// User Guide. +// +// This operation is required only for organizations that were created explicitly +// with only the consolidated billing features enabled. Calling this operation +// sends a handshake to every invited account in the organization. The feature set +// change can be finalized and the additional features enabled only after all +// administrators in the invited accounts approve the change by accepting the +// handshake. +// +// After you enable all features, you can separately enable or disable individual +// policy types in a root using EnablePolicyTypeand DisablePolicyType. To see the status of policy types in a root, +// use ListRoots. +// +// After all invited member accounts accept the handshake, you finalize the +// feature set change by accepting the handshake that contains "Action": +// "ENABLE_ALL_FEATURES" . This completes the change. +// +// After you enable all features in your organization, the management account in +// the organization can apply policies on all member accounts. These policies can // restrict what users and even administrators in those accounts can do. The // management account can apply policies that prevent accounts from leaving the -// organization. Ensure that your account administrators are aware of this. This -// operation can be called only from the organization's management account. +// organization. Ensure that your account administrators are aware of this. +// +// This operation can be called only from the organization's management account. +// +// [Enabling all features in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html func (c *Client) EnableAllFeatures(ctx context.Context, params *EnableAllFeaturesInput, optFns ...func(*Options)) (*EnableAllFeaturesOutput, error) { if params == nil { params = &EnableAllFeaturesInput{} @@ -88,25 +95,25 @@ func (c *Client) addOperationEnableAllFeaturesMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -121,10 +128,16 @@ func (c *Client) addOperationEnableAllFeaturesMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableAllFeatures(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnablePolicyType.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnablePolicyType.go index 62458af0..c9d4a78f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnablePolicyType.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnablePolicyType.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,15 +13,19 @@ import ( // Enables a policy type in a root. After you enable a policy type in a root, you // can attach policies of that type to the root, any organizational unit (OU), or -// account in that root. You can undo this by using the DisablePolicyType -// operation. This is an asynchronous request that Amazon Web Services performs in -// the background. Amazon Web Services recommends that you first use ListRoots to -// see the status of policy types for a specified root, and then use this -// operation. This operation can be called only from the organization's management -// account or by a member account that is a delegated administrator for an Amazon -// Web Services service. You can enable a policy type in a root only if that policy -// type is available in the organization. To view the status of available policy -// types in the organization, use DescribeOrganization . +// account in that root. You can undo this by using the DisablePolicyTypeoperation. +// +// This is an asynchronous request that Amazon Web Services performs in the +// background. Amazon Web Services recommends that you first use ListRootsto see the status +// of policy types for a specified root, and then use this operation. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. +// +// You can enable a policy type in a root only if that policy type is available in +// the organization. To view the status of available policy types in the +// organization, use DescribeOrganization. func (c *Client) EnablePolicyType(ctx context.Context, params *EnablePolicyTypeInput, optFns ...func(*Options)) (*EnablePolicyTypeOutput, error) { if params == nil { params = &EnablePolicyTypeInput{} @@ -42,18 +45,30 @@ type EnablePolicyTypeInput struct { // The policy type that you want to enable. You can specify one of the following // values: - // - AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) - // - BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) - // - SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) - // - TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) + // + // [AISERVICES_OPT_OUT_POLICY] + // + // [BACKUP_POLICY] + // + // [SERVICE_CONTROL_POLICY] + // + // [TAG_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html + // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html + // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html + // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. PolicyType types.PolicyType // The unique identifier (ID) of the root in which you want to enable a policy - // type. You can get the ID from the ListRoots operation. The regex pattern (http://wikipedia.org/wiki/regex) - // for a root ID string requires "r-" followed by from 4 to 32 lowercase letters or - // digits. + // type. You can get the ID from the ListRootsoperation. + // + // The [regex pattern] for a root ID string requires "r-" followed by from 4 to 32 lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RootId *string @@ -94,25 +109,25 @@ func (c *Client) addOperationEnablePolicyTypeMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -127,13 +142,19 @@ func (c *Client) addOperationEnablePolicyTypeMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnablePolicyTypeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnablePolicyType(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_InviteAccountToOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_InviteAccountToOrganization.go index ae522702..e9be1b99 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_InviteAccountToOrganization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_InviteAccountToOrganization.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,25 +13,28 @@ import ( // Sends an invitation to another account to join your organization as a member // account. Organizations sends email on your behalf to the email address that is -// associated with the other account's owner. The invitation is implemented as a -// Handshake whose details are in the response. +// associated with the other account's owner. The invitation is implemented as a Handshake +// whose details are in the response. +// // - You can invite Amazon Web Services accounts only from the same seller as // the management account. For example, if your organization's management account // was created by Amazon Internet Services Pvt. Ltd (AISPL), an Amazon Web Services // seller in India, you can invite only other AISPL accounts to your organization. // You can't combine accounts from AISPL and Amazon Web Services or from any other -// Amazon Web Services seller. For more information, see Consolidated billing in -// India (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/useconsolidatedbilling-India.html) -// . +// Amazon Web Services seller. For more information, see [Consolidated billing in India]. +// // - If you receive an exception that indicates that you exceeded your account // limits for the organization or that the operation failed because your // organization is still initializing, wait one hour and then try again. If the -// error persists after an hour, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/) -// . +// error persists after an hour, contact [Amazon Web Services Support]. // // If the request includes tags, then the requester must have the -// organizations:TagResource permission. This operation can be called only from the -// organization's management account. +// organizations:TagResource permission. +// +// This operation can be called only from the organization's management account. +// +// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/ +// [Consolidated billing in India]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/useconsolidatedbilling-India.html func (c *Client) InviteAccountToOrganization(ctx context.Context, params *InviteAccountToOrganizationInput, optFns ...func(*Options)) (*InviteAccountToOrganizationOutput, error) { if params == nil { params = &InviteAccountToOrganizationInput{} @@ -52,12 +54,20 @@ type InviteAccountToOrganizationInput struct { // The identifier (ID) of the Amazon Web Services account that you want to invite // to join your organization. This is a JSON object that contains the following - // elements: { "Type": "ACCOUNT", "Id": "< account id number >" } If you use the - // CLI, you can submit this as a single string, similar to the following example: - // --target Id=123456789012,Type=ACCOUNT If you specify "Type": "ACCOUNT" , you - // must provide the Amazon Web Services account ID number as the Id . If you - // specify "Type": "EMAIL" , you must specify the email address that is associated - // with the account. --target Id=diego@example.com,Type=EMAIL + // elements: + // + // { "Type": "ACCOUNT", "Id": "< account id number >" } + // + // If you use the CLI, you can submit this as a single string, similar to the + // following example: + // + // --target Id=123456789012,Type=ACCOUNT + // + // If you specify "Type": "ACCOUNT" , you must provide the Amazon Web Services + // account ID number as the Id . If you specify "Type": "EMAIL" , you must specify + // the email address that is associated with the account. + // + // --target Id=diego@example.com,Type=EMAIL // // This member is required. Target *types.HandshakeParty @@ -69,16 +79,20 @@ type InviteAccountToOrganizationInput struct { // A list of tags that you want to attach to the account when it becomes a member // of the organization. For each tag in the list, you must specify both a tag key // and a value. You can set the value to an empty string, but you can't set it to - // null . For more information about tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) - // in the Organizations User Guide. Any tags in the request are checked for - // compliance with any applicable tag policies when the request is made. The - // request is rejected if the tags in the request don't match the requirements of - // the policy at that time. Tag policy compliance is not checked again when the - // invitation is accepted and the tags are actually attached to the account. That - // means that if the tag policy changes between the invitation and the acceptance, - // then that tags could potentially be non-compliant. If any one of the tags is not - // valid or if you exceed the allowed number of tags for an account, then the - // entire request fails and invitations are not sent. + // null . For more information about tagging, see [Tagging Organizations resources] in the Organizations User Guide. + // + // Any tags in the request are checked for compliance with any applicable tag + // policies when the request is made. The request is rejected if the tags in the + // request don't match the requirements of the policy at that time. Tag policy + // compliance is not checked again when the invitation is accepted and the tags are + // actually attached to the account. That means that if the tag policy changes + // between the invitation and the acceptance, then that tags could potentially be + // non-compliant. + // + // If any one of the tags is not valid or if you exceed the allowed number of tags + // for an account, then the entire request fails and invitations are not sent. + // + // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html Tags []types.Tag noSmithyDocumentSerde @@ -118,25 +132,25 @@ func (c *Client) addOperationInviteAccountToOrganizationMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -151,13 +165,19 @@ func (c *Client) addOperationInviteAccountToOrganizationMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInviteAccountToOrganizationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInviteAccountToOrganization(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_LeaveOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_LeaveOrganization.go index c8cc820d..30c86028 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_LeaveOrganization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_LeaveOrganization.go @@ -6,20 +6,21 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes a member account from its parent organization. This version of the // operation is performed by the account that wants to leave. To remove a member -// account as a user in the management account, use RemoveAccountFromOrganization -// instead. This operation can be called only from a member account in the -// organization. +// account as a user in the management account, use RemoveAccountFromOrganizationinstead. +// +// This operation can be called only from a member account in the organization. +// // - The management account in an organization with all features enabled can set // service control policies (SCPs) that can restrict what administrators of member // accounts can do. This includes preventing them from successfully calling // LeaveOrganization and leaving the organization. +// // - You can leave an organization as a member account only if the account is // configured with the information required to operate as a standalone account. // When you create an account in an organization using the Organizations console, @@ -27,31 +28,42 @@ import ( // automatically collected. For each account that you want to make standalone, you // must perform the following steps. If any of the steps are already completed for // this account, that step doesn't appear. +// // - Choose a support plan +// // - Provide and verify the required contact information -// - Provide a current payment method Amazon Web Services uses the payment -// method to charge for any billable (not free tier) Amazon Web Services activity -// that occurs while the account isn't attached to an organization. For more -// information, see Considerations before removing an account from an -// organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) -// in the Organizations User Guide. -// - The account that you want to leave must not be a delegated administrator -// account for any Amazon Web Services service enabled for your organization. If -// the account is a delegated administrator, you must first change the delegated -// administrator account to another account that is remaining in the organization. -// - You can leave an organization only after you enable IAM user access to -// billing in your account. For more information, see About IAM access to the -// Billing and Cost Management console (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) -// in the Amazon Web Services Billing and Cost Management User Guide. -// - After the account leaves the organization, all tags that were attached to -// the account object in the organization are deleted. Amazon Web Services accounts -// outside of an organization do not support tags. -// - A newly created account has a waiting period before it can be removed from -// its organization. If you get an error that indicates that a wait period is -// required, then try again in a few days. -// - If you are using an organization principal to call LeaveOrganization across -// multiple accounts, you can only do this up to 5 accounts per second in a single -// organization. +// +// - Provide a current payment method +// +// Amazon Web Services uses the payment method to charge for any billable (not +// +// free tier) Amazon Web Services activity that occurs while the account isn't +// attached to an organization. For more information, see [Considerations before removing an account from an organization]in the Organizations +// User Guide. +// +// - The account that you want to leave must not be a delegated administrator +// account for any Amazon Web Services service enabled for your organization. If +// the account is a delegated administrator, you must first change the delegated +// administrator account to another account that is remaining in the organization. +// +// - You can leave an organization only after you enable IAM user access to +// billing in your account. For more information, see [About IAM access to the Billing and Cost Management console]in the Amazon Web Services +// Billing and Cost Management User Guide. +// +// - After the account leaves the organization, all tags that were attached to +// the account object in the organization are deleted. Amazon Web Services accounts +// outside of an organization do not support tags. +// +// - A newly created account has a waiting period before it can be removed from +// its organization. If you get an error that indicates that a wait period is +// required, then try again in a few days. +// +// - If you are using an organization principal to call LeaveOrganization across +// multiple accounts, you can only do this up to 5 accounts per second in a single +// organization. +// +// [About IAM access to the Billing and Cost Management console]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate +// [Considerations before removing an account from an organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html func (c *Client) LeaveOrganization(ctx context.Context, params *LeaveOrganizationInput, optFns ...func(*Options)) (*LeaveOrganizationOutput, error) { if params == nil { params = &LeaveOrganizationInput{} @@ -100,25 +112,25 @@ func (c *Client) addOperationLeaveOrganizationMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -133,10 +145,16 @@ func (c *Client) addOperationLeaveOrganizationMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLeaveOrganization(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAWSServiceAccessForOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAWSServiceAccessForOrganization.go index 96286c21..4329d7c7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAWSServiceAccessForOrganization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAWSServiceAccessForOrganization.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,13 +14,17 @@ import ( // Returns a list of the Amazon Web Services services that you enabled to // integrate with your organization. After a service on this list creates the // resources that it requires for the integration, it can perform operations on -// your organization and its accounts. For more information about integrating other -// services with Organizations, including the list of services that currently work -// with Organizations, see Using Organizations with other Amazon Web Services -// services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) -// in the Organizations User Guide. This operation can be called only from the -// organization's management account or by a member account that is a delegated -// administrator for an Amazon Web Services service. +// your organization and its accounts. +// +// For more information about integrating other services with Organizations, +// including the list of services that currently work with Organizations, see [Using Organizations with other Amazon Web Services services]in +// the Organizations User Guide. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. +// +// [Using Organizations with other Amazon Web Services services]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html func (c *Client) ListAWSServiceAccessForOrganization(ctx context.Context, params *ListAWSServiceAccessForOrganizationInput, optFns ...func(*Options)) (*ListAWSServiceAccessForOrganizationOutput, error) { if params == nil { params = &ListAWSServiceAccessForOrganizationInput{} @@ -100,25 +103,25 @@ func (c *Client) addOperationListAWSServiceAccessForOrganizationMiddlewares(stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -133,10 +136,16 @@ func (c *Client) addOperationListAWSServiceAccessForOrganizationMiddlewares(stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAWSServiceAccessForOrganization(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -154,14 +163,6 @@ func (c *Client) addOperationListAWSServiceAccessForOrganizationMiddlewares(stac return nil } -// ListAWSServiceAccessForOrganizationAPIClient is a client that implements the -// ListAWSServiceAccessForOrganization operation. -type ListAWSServiceAccessForOrganizationAPIClient interface { - ListAWSServiceAccessForOrganization(context.Context, *ListAWSServiceAccessForOrganizationInput, ...func(*Options)) (*ListAWSServiceAccessForOrganizationOutput, error) -} - -var _ ListAWSServiceAccessForOrganizationAPIClient = (*Client)(nil) - // ListAWSServiceAccessForOrganizationPaginatorOptions is the paginator options // for ListAWSServiceAccessForOrganization type ListAWSServiceAccessForOrganizationPaginatorOptions struct { @@ -236,6 +237,9 @@ func (p *ListAWSServiceAccessForOrganizationPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAWSServiceAccessForOrganization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +259,14 @@ func (p *ListAWSServiceAccessForOrganizationPaginator) NextPage(ctx context.Cont return result, nil } +// ListAWSServiceAccessForOrganizationAPIClient is a client that implements the +// ListAWSServiceAccessForOrganization operation. +type ListAWSServiceAccessForOrganizationAPIClient interface { + ListAWSServiceAccessForOrganization(context.Context, *ListAWSServiceAccessForOrganizationInput, ...func(*Options)) (*ListAWSServiceAccessForOrganizationOutput, error) +} + +var _ ListAWSServiceAccessForOrganizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAWSServiceAccessForOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccounts.go index 0dcbd309..02a9dce1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccounts.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccounts.go @@ -6,21 +6,22 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists all the accounts in the organization. To request only the accounts in a -// specified root or organizational unit (OU), use the ListAccountsForParent -// operation instead. Always check the NextToken response parameter for a null -// value when calling a List* operation. These operations can occasionally return -// an empty set of results even when there are more results available. The -// NextToken response parameter value is null only when there are no more results -// to display. This operation can be called only from the organization's management -// account or by a member account that is a delegated administrator for an Amazon -// Web Services service. +// specified root or organizational unit (OU), use the ListAccountsForParentoperation instead. +// +// Always check the NextToken response parameter for a null value when calling a +// List* operation. These operations can occasionally return an empty set of +// results even when there are more results available. The NextToken response +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) ListAccounts(ctx context.Context, params *ListAccountsInput, optFns ...func(*Options)) (*ListAccountsOutput, error) { if params == nil { params = &ListAccountsInput{} @@ -97,25 +98,25 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -130,10 +131,16 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccounts(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -151,13 +158,6 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op return nil } -// ListAccountsAPIClient is a client that implements the ListAccounts operation. -type ListAccountsAPIClient interface { - ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) -} - -var _ ListAccountsAPIClient = (*Client)(nil) - // ListAccountsPaginatorOptions is the paginator options for ListAccounts type ListAccountsPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -229,6 +229,9 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +251,13 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListAccountsAPIClient is a client that implements the ListAccounts operation. +type ListAccountsAPIClient interface { + ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) +} + +var _ ListAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccountsForParent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccountsForParent.go index 4760256c..bb698d06 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccountsForParent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccountsForParent.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -16,13 +15,16 @@ import ( // target root or organizational unit (OU). If you specify the root, you get a list // of all the accounts that aren't in any OU. If you specify an OU, you get a list // of all the accounts in only that OU and not in any child OUs. To get a list of -// all accounts in the organization, use the ListAccounts operation. Always check -// the NextToken response parameter for a null value when calling a List* -// operation. These operations can occasionally return an empty set of results even -// when there are more results available. The NextToken response parameter value -// is null only when there are no more results to display. This operation can be -// called only from the organization's management account or by a member account -// that is a delegated administrator for an Amazon Web Services service. +// all accounts in the organization, use the ListAccountsoperation. +// +// Always check the NextToken response parameter for a null value when calling a +// List* operation. These operations can occasionally return an empty set of +// results even when there are more results available. The NextToken response +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) ListAccountsForParent(ctx context.Context, params *ListAccountsForParentInput, optFns ...func(*Options)) (*ListAccountsForParentOutput, error) { if params == nil { params = &ListAccountsForParentInput{} @@ -105,25 +107,25 @@ func (c *Client) addOperationListAccountsForParentMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -138,13 +140,19 @@ func (c *Client) addOperationListAccountsForParentMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountsForParentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountsForParent(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -162,14 +170,6 @@ func (c *Client) addOperationListAccountsForParentMiddlewares(stack *middleware. return nil } -// ListAccountsForParentAPIClient is a client that implements the -// ListAccountsForParent operation. -type ListAccountsForParentAPIClient interface { - ListAccountsForParent(context.Context, *ListAccountsForParentInput, ...func(*Options)) (*ListAccountsForParentOutput, error) -} - -var _ ListAccountsForParentAPIClient = (*Client)(nil) - // ListAccountsForParentPaginatorOptions is the paginator options for // ListAccountsForParent type ListAccountsForParentPaginatorOptions struct { @@ -242,6 +242,9 @@ func (p *ListAccountsForParentPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountsForParent(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +264,14 @@ func (p *ListAccountsForParentPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAccountsForParentAPIClient is a client that implements the +// ListAccountsForParent operation. +type ListAccountsForParentAPIClient interface { + ListAccountsForParent(context.Context, *ListAccountsForParentInput, ...func(*Options)) (*ListAccountsForParentOutput, error) +} + +var _ ListAccountsForParentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountsForParent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListChildren.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListChildren.go index d8dea0fc..0811aff7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListChildren.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListChildren.go @@ -6,21 +6,23 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists all of the organizational units (OUs) or accounts that are contained in -// the specified parent OU or root. This operation, along with ListParents enables -// you to traverse the tree structure that makes up this root. Always check the -// NextToken response parameter for a null value when calling a List* operation. -// These operations can occasionally return an empty set of results even when there -// are more results available. The NextToken response parameter value is null only -// when there are no more results to display. This operation can be called only -// from the organization's management account or by a member account that is a -// delegated administrator for an Amazon Web Services service. +// the specified parent OU or root. This operation, along with ListParentsenables you to +// traverse the tree structure that makes up this root. +// +// Always check the NextToken response parameter for a null value when calling a +// List* operation. These operations can occasionally return an empty set of +// results even when there are more results available. The NextToken response +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) ListChildren(ctx context.Context, params *ListChildrenInput, optFns ...func(*Options)) (*ListChildrenOutput, error) { if params == nil { params = &ListChildrenInput{} @@ -44,15 +46,20 @@ type ListChildrenInput struct { ChildType types.ChildType // The unique identifier (ID) for the parent root or OU whose children you want to - // list. The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID - // string requires one of the following: + // list. + // + // The [regex pattern] for a parent ID string requires one of the following: + // // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase // letters or digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. ParentId *string @@ -115,25 +122,25 @@ func (c *Client) addOperationListChildrenMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -148,13 +155,19 @@ func (c *Client) addOperationListChildrenMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChildrenValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChildren(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -172,13 +185,6 @@ func (c *Client) addOperationListChildrenMiddlewares(stack *middleware.Stack, op return nil } -// ListChildrenAPIClient is a client that implements the ListChildren operation. -type ListChildrenAPIClient interface { - ListChildren(context.Context, *ListChildrenInput, ...func(*Options)) (*ListChildrenOutput, error) -} - -var _ ListChildrenAPIClient = (*Client)(nil) - // ListChildrenPaginatorOptions is the paginator options for ListChildren type ListChildrenPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -250,6 +256,9 @@ func (p *ListChildrenPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChildren(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +278,13 @@ func (p *ListChildrenPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListChildrenAPIClient is a client that implements the ListChildren operation. +type ListChildrenAPIClient interface { + ListChildren(context.Context, *ListChildrenInput, ...func(*Options)) (*ListChildrenOutput, error) +} + +var _ ListChildrenAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChildren(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListCreateAccountStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListCreateAccountStatus.go index a5350994..d0122e14 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListCreateAccountStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListCreateAccountStatus.go @@ -6,20 +6,22 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the account creation requests that match the specified status that is -// currently being tracked for the organization. Always check the NextToken -// response parameter for a null value when calling a List* operation. These -// operations can occasionally return an empty set of results even when there are -// more results available. The NextToken response parameter value is null only -// when there are no more results to display. This operation can be called only -// from the organization's management account or by a member account that is a -// delegated administrator for an Amazon Web Services service. +// currently being tracked for the organization. +// +// Always check the NextToken response parameter for a null value when calling a +// List* operation. These operations can occasionally return an empty set of +// results even when there are more results available. The NextToken response +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) ListCreateAccountStatus(ctx context.Context, params *ListCreateAccountStatusInput, optFns ...func(*Options)) (*ListCreateAccountStatusOutput, error) { if params == nil { params = &ListCreateAccountStatusInput{} @@ -102,25 +104,25 @@ func (c *Client) addOperationListCreateAccountStatusMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -135,10 +137,16 @@ func (c *Client) addOperationListCreateAccountStatusMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCreateAccountStatus(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -156,14 +164,6 @@ func (c *Client) addOperationListCreateAccountStatusMiddlewares(stack *middlewar return nil } -// ListCreateAccountStatusAPIClient is a client that implements the -// ListCreateAccountStatus operation. -type ListCreateAccountStatusAPIClient interface { - ListCreateAccountStatus(context.Context, *ListCreateAccountStatusInput, ...func(*Options)) (*ListCreateAccountStatusOutput, error) -} - -var _ ListCreateAccountStatusAPIClient = (*Client)(nil) - // ListCreateAccountStatusPaginatorOptions is the paginator options for // ListCreateAccountStatus type ListCreateAccountStatusPaginatorOptions struct { @@ -237,6 +237,9 @@ func (p *ListCreateAccountStatusPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCreateAccountStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +259,14 @@ func (p *ListCreateAccountStatusPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListCreateAccountStatusAPIClient is a client that implements the +// ListCreateAccountStatus operation. +type ListCreateAccountStatusAPIClient interface { + ListCreateAccountStatus(context.Context, *ListCreateAccountStatusInput, ...func(*Options)) (*ListCreateAccountStatusOutput, error) +} + +var _ ListCreateAccountStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCreateAccountStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedAdministrators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedAdministrators.go index 3dd6c20f..1efae2d9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedAdministrators.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedAdministrators.go @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the Amazon Web Services accounts that are designated as delegated -// administrators in this organization. This operation can be called only from the -// organization's management account or by a member account that is a delegated -// administrator for an Amazon Web Services service. +// administrators in this organization. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) ListDelegatedAdministrators(ctx context.Context, params *ListDelegatedAdministratorsInput, optFns ...func(*Options)) (*ListDelegatedAdministratorsOutput, error) { if params == nil { params = &ListDelegatedAdministratorsInput{} @@ -51,9 +52,10 @@ type ListDelegatedAdministratorsInput struct { NextToken *string // Specifies a service principal name. If specified, then the operation lists the - // delegated administrators only for the specified service. If you don't specify a - // service principal, the operation lists all delegated administrators for all - // services in your organization. + // delegated administrators only for the specified service. + // + // If you don't specify a service principal, the operation lists all delegated + // administrators for all services in your organization. ServicePrincipal *string noSmithyDocumentSerde @@ -98,25 +100,25 @@ func (c *Client) addOperationListDelegatedAdministratorsMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -131,10 +133,16 @@ func (c *Client) addOperationListDelegatedAdministratorsMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDelegatedAdministrators(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -152,14 +160,6 @@ func (c *Client) addOperationListDelegatedAdministratorsMiddlewares(stack *middl return nil } -// ListDelegatedAdministratorsAPIClient is a client that implements the -// ListDelegatedAdministrators operation. -type ListDelegatedAdministratorsAPIClient interface { - ListDelegatedAdministrators(context.Context, *ListDelegatedAdministratorsInput, ...func(*Options)) (*ListDelegatedAdministratorsOutput, error) -} - -var _ ListDelegatedAdministratorsAPIClient = (*Client)(nil) - // ListDelegatedAdministratorsPaginatorOptions is the paginator options for // ListDelegatedAdministrators type ListDelegatedAdministratorsPaginatorOptions struct { @@ -234,6 +234,9 @@ func (p *ListDelegatedAdministratorsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDelegatedAdministrators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +256,14 @@ func (p *ListDelegatedAdministratorsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListDelegatedAdministratorsAPIClient is a client that implements the +// ListDelegatedAdministrators operation. +type ListDelegatedAdministratorsAPIClient interface { + ListDelegatedAdministrators(context.Context, *ListDelegatedAdministratorsInput, ...func(*Options)) (*ListDelegatedAdministratorsOutput, error) +} + +var _ ListDelegatedAdministratorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDelegatedAdministrators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedServicesForAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedServicesForAccount.go index ba7fe995..7d54a929 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedServicesForAccount.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedServicesForAccount.go @@ -6,16 +6,17 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // List the Amazon Web Services services for which the specified account is a -// delegated administrator. This operation can be called only from the -// organization's management account or by a member account that is a delegated -// administrator for an Amazon Web Services service. +// delegated administrator. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) ListDelegatedServicesForAccount(ctx context.Context, params *ListDelegatedServicesForAccountInput, optFns ...func(*Options)) (*ListDelegatedServicesForAccountOutput, error) { if params == nil { params = &ListDelegatedServicesForAccountInput{} @@ -97,25 +98,25 @@ func (c *Client) addOperationListDelegatedServicesForAccountMiddlewares(stack *m if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -130,13 +131,19 @@ func (c *Client) addOperationListDelegatedServicesForAccountMiddlewares(stack *m if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDelegatedServicesForAccountValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDelegatedServicesForAccount(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -154,14 +161,6 @@ func (c *Client) addOperationListDelegatedServicesForAccountMiddlewares(stack *m return nil } -// ListDelegatedServicesForAccountAPIClient is a client that implements the -// ListDelegatedServicesForAccount operation. -type ListDelegatedServicesForAccountAPIClient interface { - ListDelegatedServicesForAccount(context.Context, *ListDelegatedServicesForAccountInput, ...func(*Options)) (*ListDelegatedServicesForAccountOutput, error) -} - -var _ ListDelegatedServicesForAccountAPIClient = (*Client)(nil) - // ListDelegatedServicesForAccountPaginatorOptions is the paginator options for // ListDelegatedServicesForAccount type ListDelegatedServicesForAccountPaginatorOptions struct { @@ -236,6 +235,9 @@ func (p *ListDelegatedServicesForAccountPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDelegatedServicesForAccount(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +257,14 @@ func (p *ListDelegatedServicesForAccountPaginator) NextPage(ctx context.Context, return result, nil } +// ListDelegatedServicesForAccountAPIClient is a client that implements the +// ListDelegatedServicesForAccount operation. +type ListDelegatedServicesForAccountAPIClient interface { + ListDelegatedServicesForAccount(context.Context, *ListDelegatedServicesForAccountInput, ...func(*Options)) (*ListDelegatedServicesForAccountOutput, error) +} + +var _ ListDelegatedServicesForAccountAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDelegatedServicesForAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForAccount.go index ec360b4c..93153637 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForAccount.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForAccount.go @@ -6,21 +6,24 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the current handshakes that are associated with the account of the -// requesting user. Handshakes that are ACCEPTED , DECLINED , CANCELED , or EXPIRED -// appear in the results of this API for only 30 days after changing to that state. -// After that, they're deleted and no longer accessible. Always check the NextToken -// response parameter for a null value when calling a List* operation. These -// operations can occasionally return an empty set of results even when there are -// more results available. The NextToken response parameter value is null only -// when there are no more results to display. This operation can be called from any -// account in the organization. +// requesting user. +// +// Handshakes that are ACCEPTED , DECLINED , CANCELED , or EXPIRED appear in the +// results of this API for only 30 days after changing to that state. After that, +// they're deleted and no longer accessible. +// +// Always check the NextToken response parameter for a null value when calling a +// List* operation. These operations can occasionally return an empty set of +// results even when there are more results available. The NextToken response +// parameter value is null only when there are no more results to display. +// +// This operation can be called from any account in the organization. func (c *Client) ListHandshakesForAccount(ctx context.Context, params *ListHandshakesForAccountInput, optFns ...func(*Options)) (*ListHandshakesForAccountOutput, error) { if params == nil { params = &ListHandshakesForAccountInput{} @@ -68,8 +71,8 @@ type ListHandshakesForAccountInput struct { type ListHandshakesForAccountOutput struct { - // A list of Handshake objects with details about each of the handshakes that is - // associated with the specified account. + // A list of Handshake objects with details about each of the handshakes that is associated + // with the specified account. Handshakes []types.Handshake // If present, indicates that more output is available than is included in the @@ -106,25 +109,25 @@ func (c *Client) addOperationListHandshakesForAccountMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -139,10 +142,16 @@ func (c *Client) addOperationListHandshakesForAccountMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHandshakesForAccount(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -160,14 +169,6 @@ func (c *Client) addOperationListHandshakesForAccountMiddlewares(stack *middlewa return nil } -// ListHandshakesForAccountAPIClient is a client that implements the -// ListHandshakesForAccount operation. -type ListHandshakesForAccountAPIClient interface { - ListHandshakesForAccount(context.Context, *ListHandshakesForAccountInput, ...func(*Options)) (*ListHandshakesForAccountOutput, error) -} - -var _ ListHandshakesForAccountAPIClient = (*Client)(nil) - // ListHandshakesForAccountPaginatorOptions is the paginator options for // ListHandshakesForAccount type ListHandshakesForAccountPaginatorOptions struct { @@ -241,6 +242,9 @@ func (p *ListHandshakesForAccountPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHandshakesForAccount(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +264,14 @@ func (p *ListHandshakesForAccountPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListHandshakesForAccountAPIClient is a client that implements the +// ListHandshakesForAccount operation. +type ListHandshakesForAccountAPIClient interface { + ListHandshakesForAccount(context.Context, *ListHandshakesForAccountInput, ...func(*Options)) (*ListHandshakesForAccountOutput, error) +} + +var _ ListHandshakesForAccountAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHandshakesForAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForOrganization.go index f78382ad..cbec879a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForOrganization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForOrganization.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,15 +14,20 @@ import ( // Lists the handshakes that are associated with the organization that the // requesting user is part of. The ListHandshakesForOrganization operation returns // a list of handshake structures. Each structure contains details and status about -// a handshake. Handshakes that are ACCEPTED , DECLINED , CANCELED , or EXPIRED -// appear in the results of this API for only 30 days after changing to that state. -// After that, they're deleted and no longer accessible. Always check the NextToken -// response parameter for a null value when calling a List* operation. These -// operations can occasionally return an empty set of results even when there are -// more results available. The NextToken response parameter value is null only -// when there are no more results to display. This operation can be called only -// from the organization's management account or by a member account that is a -// delegated administrator for an Amazon Web Services service. +// a handshake. +// +// Handshakes that are ACCEPTED , DECLINED , CANCELED , or EXPIRED appear in the +// results of this API for only 30 days after changing to that state. After that, +// they're deleted and no longer accessible. +// +// Always check the NextToken response parameter for a null value when calling a +// List* operation. These operations can occasionally return an empty set of +// results even when there are more results available. The NextToken response +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) ListHandshakesForOrganization(ctx context.Context, params *ListHandshakesForOrganizationInput, optFns ...func(*Options)) (*ListHandshakesForOrganizationOutput, error) { if params == nil { params = &ListHandshakesForOrganizationInput{} @@ -109,25 +113,25 @@ func (c *Client) addOperationListHandshakesForOrganizationMiddlewares(stack *mid if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -142,10 +146,16 @@ func (c *Client) addOperationListHandshakesForOrganizationMiddlewares(stack *mid if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHandshakesForOrganization(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -163,14 +173,6 @@ func (c *Client) addOperationListHandshakesForOrganizationMiddlewares(stack *mid return nil } -// ListHandshakesForOrganizationAPIClient is a client that implements the -// ListHandshakesForOrganization operation. -type ListHandshakesForOrganizationAPIClient interface { - ListHandshakesForOrganization(context.Context, *ListHandshakesForOrganizationInput, ...func(*Options)) (*ListHandshakesForOrganizationOutput, error) -} - -var _ ListHandshakesForOrganizationAPIClient = (*Client)(nil) - // ListHandshakesForOrganizationPaginatorOptions is the paginator options for // ListHandshakesForOrganization type ListHandshakesForOrganizationPaginatorOptions struct { @@ -245,6 +247,9 @@ func (p *ListHandshakesForOrganizationPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHandshakesForOrganization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +269,14 @@ func (p *ListHandshakesForOrganizationPaginator) NextPage(ctx context.Context, o return result, nil } +// ListHandshakesForOrganizationAPIClient is a client that implements the +// ListHandshakesForOrganization operation. +type ListHandshakesForOrganizationAPIClient interface { + ListHandshakesForOrganization(context.Context, *ListHandshakesForOrganizationInput, ...func(*Options)) (*ListHandshakesForOrganizationOutput, error) +} + +var _ ListHandshakesForOrganizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHandshakesForOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListOrganizationalUnitsForParent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListOrganizationalUnitsForParent.go index 122455a4..9f59da7b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListOrganizationalUnitsForParent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListOrganizationalUnitsForParent.go @@ -6,19 +6,20 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the organizational units (OUs) in a parent organizational unit or root. +// // Always check the NextToken response parameter for a null value when calling a // List* operation. These operations can occasionally return an empty set of // results even when there are more results available. The NextToken response -// parameter value is null only when there are no more results to display. This -// operation can be called only from the organization's management account or by a -// member account that is a delegated administrator for an Amazon Web Services +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services // service. func (c *Client) ListOrganizationalUnitsForParent(ctx context.Context, params *ListOrganizationalUnitsForParentInput, optFns ...func(*Options)) (*ListOrganizationalUnitsForParentOutput, error) { if params == nil { @@ -38,15 +39,19 @@ func (c *Client) ListOrganizationalUnitsForParent(ctx context.Context, params *L type ListOrganizationalUnitsForParentInput struct { // The unique identifier (ID) of the root or OU whose child OUs you want to list. - // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string - // requires one of the following: + // + // The [regex pattern] for a parent ID string requires one of the following: + // // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase // letters or digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. ParentId *string @@ -109,25 +114,25 @@ func (c *Client) addOperationListOrganizationalUnitsForParentMiddlewares(stack * if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -142,13 +147,19 @@ func (c *Client) addOperationListOrganizationalUnitsForParentMiddlewares(stack * if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOrganizationalUnitsForParentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrganizationalUnitsForParent(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -166,14 +177,6 @@ func (c *Client) addOperationListOrganizationalUnitsForParentMiddlewares(stack * return nil } -// ListOrganizationalUnitsForParentAPIClient is a client that implements the -// ListOrganizationalUnitsForParent operation. -type ListOrganizationalUnitsForParentAPIClient interface { - ListOrganizationalUnitsForParent(context.Context, *ListOrganizationalUnitsForParentInput, ...func(*Options)) (*ListOrganizationalUnitsForParentOutput, error) -} - -var _ ListOrganizationalUnitsForParentAPIClient = (*Client)(nil) - // ListOrganizationalUnitsForParentPaginatorOptions is the paginator options for // ListOrganizationalUnitsForParent type ListOrganizationalUnitsForParentPaginatorOptions struct { @@ -248,6 +251,9 @@ func (p *ListOrganizationalUnitsForParentPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationalUnitsForParent(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +273,14 @@ func (p *ListOrganizationalUnitsForParentPaginator) NextPage(ctx context.Context return result, nil } +// ListOrganizationalUnitsForParentAPIClient is a client that implements the +// ListOrganizationalUnitsForParent operation. +type ListOrganizationalUnitsForParentAPIClient interface { + ListOrganizationalUnitsForParent(context.Context, *ListOrganizationalUnitsForParentInput, ...func(*Options)) (*ListOrganizationalUnitsForParentOutput, error) +} + +var _ ListOrganizationalUnitsForParentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationalUnitsForParent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListParents.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListParents.go index b3b6d888..5c25c964 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListParents.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListParents.go @@ -6,22 +6,25 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the root or organizational units (OUs) that serve as the immediate parent -// of the specified child OU or account. This operation, along with ListChildren -// enables you to traverse the tree structure that makes up this root. Always check -// the NextToken response parameter for a null value when calling a List* -// operation. These operations can occasionally return an empty set of results even -// when there are more results available. The NextToken response parameter value -// is null only when there are no more results to display. This operation can be -// called only from the organization's management account or by a member account -// that is a delegated administrator for an Amazon Web Services service. In the -// current release, a child can have only a single parent. +// of the specified child OU or account. This operation, along with ListChildrenenables you to +// traverse the tree structure that makes up this root. +// +// Always check the NextToken response parameter for a null value when calling a +// List* operation. These operations can occasionally return an empty set of +// results even when there are more results available. The NextToken response +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. +// +// In the current release, a child can have only a single parent. func (c *Client) ListParents(ctx context.Context, params *ListParentsInput, optFns ...func(*Options)) (*ListParentsOutput, error) { if params == nil { params = &ListParentsInput{} @@ -40,14 +43,19 @@ func (c *Client) ListParents(ctx context.Context, params *ListParentsInput, optF type ListParentsInput struct { // The unique identifier (ID) of the OU or account whose parent containers you - // want to list. Don't specify a root. The regex pattern (http://wikipedia.org/wiki/regex) - // for a child ID string requires one of the following: + // want to list. Don't specify a root. + // + // The [regex pattern] for a child ID string requires one of the following: + // // - Account - A string that consists of exactly 12 digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). // This string is followed by a second "-" dash and from 8 to 32 additional // lowercase letters or digits. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. ChildId *string @@ -110,25 +118,25 @@ func (c *Client) addOperationListParentsMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -143,13 +151,19 @@ func (c *Client) addOperationListParentsMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListParentsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListParents(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -167,13 +181,6 @@ func (c *Client) addOperationListParentsMiddlewares(stack *middleware.Stack, opt return nil } -// ListParentsAPIClient is a client that implements the ListParents operation. -type ListParentsAPIClient interface { - ListParents(context.Context, *ListParentsInput, ...func(*Options)) (*ListParentsOutput, error) -} - -var _ ListParentsAPIClient = (*Client)(nil) - // ListParentsPaginatorOptions is the paginator options for ListParents type ListParentsPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -245,6 +252,9 @@ func (p *ListParentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListParents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +274,13 @@ func (p *ListParentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListParentsAPIClient is a client that implements the ListParents operation. +type ListParentsAPIClient interface { + ListParents(context.Context, *ListParentsInput, ...func(*Options)) (*ListParentsOutput, error) +} + +var _ ListParentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListParents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPolicies.go index 24964a87..5c8fdb28 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPolicies.go @@ -6,19 +6,20 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the list of all policies in an organization of a specified type. +// // Always check the NextToken response parameter for a null value when calling a // List* operation. These operations can occasionally return an empty set of // results even when there are more results available. The NextToken response -// parameter value is null only when there are no more results to display. This -// operation can be called only from the organization's management account or by a -// member account that is a delegated administrator for an Amazon Web Services +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services // service. func (c *Client) ListPolicies(ctx context.Context, params *ListPoliciesInput, optFns ...func(*Options)) (*ListPoliciesOutput, error) { if params == nil { @@ -39,10 +40,19 @@ type ListPoliciesInput struct { // Specifies the type of policy that you want to include in the response. You must // specify one of the following values: - // - AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) - // - BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) - // - SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) - // - TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) + // + // [AISERVICES_OPT_OUT_POLICY] + // + // [BACKUP_POLICY] + // + // [SERVICE_CONTROL_POLICY] + // + // [TAG_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html + // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html + // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html + // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. Filter types.PolicyType @@ -76,8 +86,7 @@ type ListPoliciesOutput struct { NextToken *string // A list of policies that match the filter criteria in the request. The output - // list doesn't include the policy contents. To see the content for a policy, see - // DescribePolicy . + // list doesn't include the policy contents. To see the content for a policy, see DescribePolicy. Policies []types.PolicySummary // Metadata pertaining to the operation's result. @@ -108,25 +117,25 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,13 +150,19 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPoliciesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicies(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -165,13 +180,6 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op 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 { // The total number of results that you want included on each page of the @@ -243,6 +251,9 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +273,13 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, 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) + func newServiceMetadataMiddleware_opListPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPoliciesForTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPoliciesForTarget.go index 7208f694..1b4d6d41 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPoliciesForTarget.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPoliciesForTarget.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,13 +13,16 @@ import ( // Lists the policies that are directly attached to the specified target root, // organizational unit (OU), or account. You must specify the policy type that you -// want included in the returned list. Always check the NextToken response -// parameter for a null value when calling a List* operation. These operations can -// occasionally return an empty set of results even when there are more results -// available. The NextToken response parameter value is null only when there are -// no more results to display. This operation can be called only from the -// organization's management account or by a member account that is a delegated -// administrator for an Amazon Web Services service. +// want included in the returned list. +// +// Always check the NextToken response parameter for a null value when calling a +// List* operation. These operations can occasionally return an empty set of +// results even when there are more results available. The NextToken response +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) ListPoliciesForTarget(ctx context.Context, params *ListPoliciesForTargetInput, optFns ...func(*Options)) (*ListPoliciesForTargetOutput, error) { if params == nil { params = &ListPoliciesForTargetInput{} @@ -40,25 +42,40 @@ type ListPoliciesForTargetInput struct { // The type of policy that you want to include in the returned list. You must // specify one of the following values: - // - AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) - // - BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) - // - SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) - // - TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) + // + // [AISERVICES_OPT_OUT_POLICY] + // + // [BACKUP_POLICY] + // + // [SERVICE_CONTROL_POLICY] + // + // [TAG_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html + // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html + // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html + // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. Filter types.PolicyType // The unique identifier (ID) of the root, organizational unit, or account whose - // policies you want to list. The regex pattern (http://wikipedia.org/wiki/regex) - // for a target ID string requires one of the following: + // policies you want to list. + // + // The [regex pattern] for a target ID string requires one of the following: + // // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase // letters or digits. + // // - Account - A string that consists of exactly 12 digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. TargetId *string @@ -121,25 +138,25 @@ func (c *Client) addOperationListPoliciesForTargetMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -154,13 +171,19 @@ func (c *Client) addOperationListPoliciesForTargetMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPoliciesForTargetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPoliciesForTarget(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -178,14 +201,6 @@ func (c *Client) addOperationListPoliciesForTargetMiddlewares(stack *middleware. return nil } -// ListPoliciesForTargetAPIClient is a client that implements the -// ListPoliciesForTarget operation. -type ListPoliciesForTargetAPIClient interface { - ListPoliciesForTarget(context.Context, *ListPoliciesForTargetInput, ...func(*Options)) (*ListPoliciesForTargetOutput, error) -} - -var _ ListPoliciesForTargetAPIClient = (*Client)(nil) - // ListPoliciesForTargetPaginatorOptions is the paginator options for // ListPoliciesForTarget type ListPoliciesForTargetPaginatorOptions struct { @@ -258,6 +273,9 @@ func (p *ListPoliciesForTargetPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPoliciesForTarget(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +295,14 @@ func (p *ListPoliciesForTargetPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPoliciesForTargetAPIClient is a client that implements the +// ListPoliciesForTarget operation. +type ListPoliciesForTargetAPIClient interface { + ListPoliciesForTarget(context.Context, *ListPoliciesForTargetInput, ...func(*Options)) (*ListPoliciesForTargetOutput, error) +} + +var _ ListPoliciesForTargetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPoliciesForTarget(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListRoots.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListRoots.go index 0267370b..788094ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListRoots.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListRoots.go @@ -6,24 +6,27 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the roots that are defined in the current organization. Always check the -// NextToken response parameter for a null value when calling a List* operation. -// These operations can occasionally return an empty set of results even when there -// are more results available. The NextToken response parameter value is null only -// when there are no more results to display. This operation can be called only -// from the organization's management account or by a member account that is a -// delegated administrator for an Amazon Web Services service. Policy types can be -// enabled and disabled in roots. This is distinct from whether they're available -// in the organization. When you enable all features, you make policy types -// available for use in that organization. Individual policy types can then be -// enabled and disabled in a root. To see the availability of a policy type in an -// organization, use DescribeOrganization . +// Lists the roots that are defined in the current organization. +// +// Always check the NextToken response parameter for a null value when calling a +// List* operation. These operations can occasionally return an empty set of +// results even when there are more results available. The NextToken response +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. +// +// Policy types can be enabled and disabled in roots. This is distinct from +// whether they're available in the organization. When you enable all features, you +// make policy types available for use in that organization. Individual policy +// types can then be enabled and disabled in a root. To see the availability of a +// policy type in an organization, use DescribeOrganization. func (c *Client) ListRoots(ctx context.Context, params *ListRootsInput, optFns ...func(*Options)) (*ListRootsOutput, error) { if params == nil { params = &ListRootsInput{} @@ -100,25 +103,25 @@ func (c *Client) addOperationListRootsMiddlewares(stack *middleware.Stack, optio if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -133,10 +136,16 @@ func (c *Client) addOperationListRootsMiddlewares(stack *middleware.Stack, optio if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoots(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -154,13 +163,6 @@ func (c *Client) addOperationListRootsMiddlewares(stack *middleware.Stack, optio return nil } -// ListRootsAPIClient is a client that implements the ListRoots operation. -type ListRootsAPIClient interface { - ListRoots(context.Context, *ListRootsInput, ...func(*Options)) (*ListRootsOutput, error) -} - -var _ ListRootsAPIClient = (*Client)(nil) - // ListRootsPaginatorOptions is the paginator options for ListRoots type ListRootsPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -232,6 +234,9 @@ func (p *ListRootsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +256,13 @@ func (p *ListRootsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListRootsAPIClient is a client that implements the ListRoots operation. +type ListRootsAPIClient interface { + ListRoots(context.Context, *ListRootsInput, ...func(*Options)) (*ListRootsOutput, error) +} + +var _ ListRootsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTagsForResource.go index fd12ef44..70f715ed 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTagsForResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTagsForResource.go @@ -6,17 +6,21 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists tags that are attached to the specified resource. You can attach tags to -// the following resources in Organizations. +// Lists tags that are attached to the specified resource. +// +// You can attach tags to the following resources in Organizations. +// // - Amazon Web Services account +// // - Organization root +// // - Organizational unit (OU) +// // - Policy (any type) // // This operation can be called only from the organization's management account or @@ -39,12 +43,17 @@ func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForRes type ListTagsForResourceInput struct { - // The ID of the resource with the tags to list. You can specify any of the - // following taggable resources. + // The ID of the resource with the tags to list. + // + // You can specify any of the following taggable resources. + // // - Amazon Web Services account – specify the account ID number. + // // - Organizational unit – specify the OU ID that begins with ou- and looks // similar to: ou-1a2b-34uvwxyz + // // - Root – specify the root ID that begins with r- and looks similar to: r-1a2b + // // - Policy – specify the policy ID that begins with p- andlooks similar to: // p-12abcdefg3 // @@ -99,25 +108,25 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -132,13 +141,19 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -156,14 +171,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -216,6 +223,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +245,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTargetsForPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTargetsForPolicy.go index 7f76aebb..b7361e12 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTargetsForPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTargetsForPolicy.go @@ -6,20 +6,22 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists all the roots, organizational units (OUs), and accounts that the -// specified policy is attached to. Always check the NextToken response parameter -// for a null value when calling a List* operation. These operations can -// occasionally return an empty set of results even when there are more results -// available. The NextToken response parameter value is null only when there are -// no more results to display. This operation can be called only from the -// organization's management account or by a member account that is a delegated -// administrator for an Amazon Web Services service. +// specified policy is attached to. +// +// Always check the NextToken response parameter for a null value when calling a +// List* operation. These operations can occasionally return an empty set of +// results even when there are more results available. The NextToken response +// parameter value is null only when there are no more results to display. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) ListTargetsForPolicy(ctx context.Context, params *ListTargetsForPolicyInput, optFns ...func(*Options)) (*ListTargetsForPolicyOutput, error) { if params == nil { params = &ListTargetsForPolicyInput{} @@ -38,9 +40,11 @@ func (c *Client) ListTargetsForPolicy(ctx context.Context, params *ListTargetsFo type ListTargetsForPolicyInput struct { // The unique identifier (ID) of the policy whose attachments you want to know. - // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string - // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, - // or the underscore character (_). + // + // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase + // or uppercase letters, digits, or the underscore character (_). + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyId *string @@ -105,25 +109,25 @@ func (c *Client) addOperationListTargetsForPolicyMiddlewares(stack *middleware.S if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -138,13 +142,19 @@ func (c *Client) addOperationListTargetsForPolicyMiddlewares(stack *middleware.S if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTargetsForPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTargetsForPolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -162,14 +172,6 @@ func (c *Client) addOperationListTargetsForPolicyMiddlewares(stack *middleware.S return nil } -// ListTargetsForPolicyAPIClient is a client that implements the -// ListTargetsForPolicy operation. -type ListTargetsForPolicyAPIClient interface { - ListTargetsForPolicy(context.Context, *ListTargetsForPolicyInput, ...func(*Options)) (*ListTargetsForPolicyOutput, error) -} - -var _ ListTargetsForPolicyAPIClient = (*Client)(nil) - // ListTargetsForPolicyPaginatorOptions is the paginator options for // ListTargetsForPolicy type ListTargetsForPolicyPaginatorOptions struct { @@ -242,6 +244,9 @@ func (p *ListTargetsForPolicyPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTargetsForPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +266,14 @@ func (p *ListTargetsForPolicyPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListTargetsForPolicyAPIClient is a client that implements the +// ListTargetsForPolicy operation. +type ListTargetsForPolicyAPIClient interface { + ListTargetsForPolicy(context.Context, *ListTargetsForPolicyInput, ...func(*Options)) (*ListTargetsForPolicyOutput, error) +} + +var _ ListTargetsForPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTargetsForPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_MoveAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_MoveAccount.go index 8fc76230..2fc65adc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_MoveAccount.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_MoveAccount.go @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Moves an account from its current source parent root or organizational unit -// (OU) to the specified destination parent root or OU. This operation can be -// called only from the organization's management account. +// (OU) to the specified destination parent root or OU. +// +// This operation can be called only from the organization's management account. func (c *Client) MoveAccount(ctx context.Context, params *MoveAccountInput, optFns ...func(*Options)) (*MoveAccountOutput, error) { if params == nil { params = &MoveAccountInput{} @@ -31,36 +31,48 @@ func (c *Client) MoveAccount(ctx context.Context, params *MoveAccountInput, optF type MoveAccountInput struct { - // The unique identifier (ID) of the account that you want to move. The regex - // pattern (http://wikipedia.org/wiki/regex) for an account ID string requires - // exactly 12 digits. + // The unique identifier (ID) of the account that you want to move. + // + // The [regex pattern] for an account ID string requires exactly 12 digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccountId *string // The unique identifier (ID) of the root or organizational unit that you want to - // move the account to. The regex pattern (http://wikipedia.org/wiki/regex) for a - // parent ID string requires one of the following: + // move the account to. + // + // The [regex pattern] for a parent ID string requires one of the following: + // // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase // letters or digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. DestinationParentId *string // The unique identifier (ID) of the root or organizational unit that you want to - // move the account from. The regex pattern (http://wikipedia.org/wiki/regex) for - // a parent ID string requires one of the following: + // move the account from. + // + // The [regex pattern] for a parent ID string requires one of the following: + // // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase // letters or digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. SourceParentId *string @@ -96,25 +108,25 @@ func (c *Client) addOperationMoveAccountMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -129,13 +141,19 @@ func (c *Client) addOperationMoveAccountMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMoveAccountValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMoveAccount(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_PutResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_PutResourcePolicy.go index 2f8a6202..fa022c32 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_PutResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_PutResourcePolicy.go @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates or updates a resource policy. You can only call this operation from the -// organization's management account. +// Creates or updates a resource policy. +// +// You can only call this operation from the organization's management account. func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { if params == nil { params = &PutResourcePolicyInput{} @@ -33,8 +33,9 @@ type PutResourcePolicyInput struct { // If provided, the new content for the resource policy. The text must be // correctly formatted JSON that complies with the syntax for the resource policy's - // type. For more information, see SCP syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html) - // in the Organizations User Guide. + // type. For more information, see [SCP syntax]in the Organizations User Guide. + // + // [SCP syntax]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html // // This member is required. Content *string @@ -42,11 +43,14 @@ type PutResourcePolicyInput struct { // A list of tags that you want to attach to the newly created resource policy. // For each tag in the list, you must specify both a tag key and a value. You can // set the value to an empty string, but you can't set it to null . For more - // information about tagging, see Tagging Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) - // in the Organizations User Guide. Calls with tags apply to the initial creation - // of the resource policy, otherwise an exception is thrown. If any one of the tags - // is not valid or if you exceed the allowed number of tags for the resource - // policy, then the entire request fails and the resource policy is not created. + // information about tagging, see [Tagging Organizations resources]in the Organizations User Guide. + // + // Calls with tags apply to the initial creation of the resource policy, otherwise + // an exception is thrown. If any one of the tags is not valid or if you exceed the + // allowed number of tags for the resource policy, then the entire request fails + // and the resource policy is not created. + // + // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html Tags []types.Tag noSmithyDocumentSerde @@ -85,25 +89,25 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -118,13 +122,19 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RegisterDelegatedAdministrator.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RegisterDelegatedAdministrator.go index f94ae7d6..823e747f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RegisterDelegatedAdministrator.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RegisterDelegatedAdministrator.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -14,12 +13,15 @@ import ( // Enables the specified member account to administer the Organizations features // of the specified Amazon Web Services service. It grants read-only access to // Organizations service data. The account still requires IAM permissions to access -// and administer the Amazon Web Services service. You can run this action only for -// Amazon Web Services services that support this feature. For a current list of -// services that support it, see the column Supports Delegated Administrator in the -// table at Amazon Web Services Services that you can use with Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html) -// in the Organizations User Guide. This operation can be called only from the -// organization's management account. +// and administer the Amazon Web Services service. +// +// You can run this action only for Amazon Web Services services that support this +// feature. For a current list of services that support it, see the column Supports +// Delegated Administrator in the table at [Amazon Web Services Services that you can use with Organizations]in the Organizations User Guide. +// +// This operation can be called only from the organization's management account. +// +// [Amazon Web Services Services that you can use with Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html func (c *Client) RegisterDelegatedAdministrator(ctx context.Context, params *RegisterDelegatedAdministratorInput, optFns ...func(*Options)) (*RegisterDelegatedAdministratorOutput, error) { if params == nil { params = &RegisterDelegatedAdministratorInput{} @@ -81,25 +83,25 @@ func (c *Client) addOperationRegisterDelegatedAdministratorMiddlewares(stack *mi if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +116,19 @@ func (c *Client) addOperationRegisterDelegatedAdministratorMiddlewares(stack *mi if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterDelegatedAdministratorValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterDelegatedAdministrator(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RemoveAccountFromOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RemoveAccountFromOrganization.go index d939ba39..07857a1a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RemoveAccountFromOrganization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RemoveAccountFromOrganization.go @@ -6,32 +6,38 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the specified account from the organization. The removed account -// becomes a standalone account that isn't a member of any organization. It's no -// longer subject to any policies and is responsible for its own bill payments. The -// organization's management account is no longer charged for any expenses accrued -// by the member account after it's removed from the organization. This operation -// can be called only from the organization's management account. Member accounts -// can remove themselves with LeaveOrganization instead. +// Removes the specified account from the organization. +// +// The removed account becomes a standalone account that isn't a member of any +// organization. It's no longer subject to any policies and is responsible for its +// own bill payments. The organization's management account is no longer charged +// for any expenses accrued by the member account after it's removed from the +// organization. +// +// This operation can be called only from the organization's management account. +// Member accounts can remove themselves with LeaveOrganizationinstead. +// // - You can remove an account from your organization only if the account is // configured with the information required to operate as a standalone account. // When you create an account in an organization using the Organizations console, // API, or CLI commands, the information required of standalone accounts is not -// automatically collected. For more information, see Considerations before -// removing an account from an organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) -// in the Organizations User Guide. +// automatically collected. For more information, see [Considerations before removing an account from an organization]in the Organizations User +// Guide. +// // - The account that you want to leave must not be a delegated administrator // account for any Amazon Web Services service enabled for your organization. If // the account is a delegated administrator, you must first change the delegated // administrator account to another account that is remaining in the organization. +// // - After the account leaves the organization, all tags that were attached to // the account object in the organization are deleted. Amazon Web Services accounts // outside of an organization do not support tags. +// +// [Considerations before removing an account from an organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html func (c *Client) RemoveAccountFromOrganization(ctx context.Context, params *RemoveAccountFromOrganizationInput, optFns ...func(*Options)) (*RemoveAccountFromOrganizationOutput, error) { if params == nil { params = &RemoveAccountFromOrganizationInput{} @@ -50,8 +56,11 @@ func (c *Client) RemoveAccountFromOrganization(ctx context.Context, params *Remo type RemoveAccountFromOrganizationInput struct { // The unique identifier (ID) of the member account that you want to remove from - // the organization. The regex pattern (http://wikipedia.org/wiki/regex) for an - // account ID string requires exactly 12 digits. + // the organization. + // + // The [regex pattern] for an account ID string requires exactly 12 digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccountId *string @@ -88,25 +97,25 @@ func (c *Client) addOperationRemoveAccountFromOrganizationMiddlewares(stack *mid if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -121,13 +130,19 @@ func (c *Client) addOperationRemoveAccountFromOrganizationMiddlewares(stack *mid if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveAccountFromOrganizationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveAccountFromOrganization(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_TagResource.go index b43b83d1..e1f524d9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_TagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_TagResource.go @@ -6,17 +6,21 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Adds one or more tags to the specified resource. Currently, you can attach tags -// to the following resources in Organizations. +// Adds one or more tags to the specified resource. +// +// Currently, you can attach tags to the following resources in Organizations. +// // - Amazon Web Services account +// // - Organization root +// // - Organizational unit (OU) +// // - Policy (any type) // // This operation can be called only from the organization's management account or @@ -39,23 +43,30 @@ func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optF type TagResourceInput struct { - // The ID of the resource to add a tag to. You can specify any of the following - // taggable resources. + // The ID of the resource to add a tag to. + // + // You can specify any of the following taggable resources. + // // - Amazon Web Services account – specify the account ID number. + // // - Organizational unit – specify the OU ID that begins with ou- and looks // similar to: ou-1a2b-34uvwxyz + // // - Root – specify the root ID that begins with r- and looks similar to: r-1a2b + // // - Policy – specify the policy ID that begins with p- andlooks similar to: // p-12abcdefg3 // // This member is required. ResourceId *string - // A list of tags to add to the specified resource. For each tag in the list, you - // must specify both a tag key and a value. The value can be an empty string, but - // you can't set it to null . If any one of the tags is not valid or if you exceed - // the maximum allowed number of tags for a resource, then the entire request - // fails. + // A list of tags to add to the specified resource. + // + // For each tag in the list, you must specify both a tag key and a value. The + // value can be an empty string, but you can't set it to null . + // + // If any one of the tags is not valid or if you exceed the maximum allowed number + // of tags for a resource, then the entire request fails. // // This member is required. Tags []types.Tag @@ -92,25 +103,25 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -125,13 +136,19 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UntagResource.go index 69720f32..bc6993ed 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UntagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UntagResource.go @@ -6,16 +6,20 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes any tags with the specified keys from the specified resource. You can -// attach tags to the following resources in Organizations. +// Removes any tags with the specified keys from the specified resource. +// +// You can attach tags to the following resources in Organizations. +// // - Amazon Web Services account +// // - Organization root +// // - Organizational unit (OU) +// // - Policy (any type) // // This operation can be called only from the organization's management account or @@ -38,12 +42,17 @@ func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, type UntagResourceInput struct { - // The ID of the resource to remove a tag from. You can specify any of the - // following taggable resources. + // The ID of the resource to remove a tag from. + // + // You can specify any of the following taggable resources. + // // - Amazon Web Services account – specify the account ID number. + // // - Organizational unit – specify the OU ID that begins with ou- and looks // similar to: ou-1a2b-34uvwxyz + // // - Root – specify the root ID that begins with r- and looks similar to: r-1a2b + // // - Policy – specify the policy ID that begins with p- andlooks similar to: // p-12abcdefg3 // @@ -87,25 +96,25 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -120,13 +129,19 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdateOrganizationalUnit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdateOrganizationalUnit.go index ae6d8667..126ec3d7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdateOrganizationalUnit.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdateOrganizationalUnit.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,8 +13,9 @@ import ( // Renames the specified organizational unit (OU). The ID and ARN don't change. // The child OUs and accounts remain in place, and any attached policies of the OU -// remain attached. This operation can be called only from the organization's -// management account. +// remain attached. +// +// This operation can be called only from the organization's management account. func (c *Client) UpdateOrganizationalUnit(ctx context.Context, params *UpdateOrganizationalUnitInput, optFns ...func(*Options)) (*UpdateOrganizationalUnitOutput, error) { if params == nil { params = &UpdateOrganizationalUnitInput{} @@ -34,18 +34,24 @@ func (c *Client) UpdateOrganizationalUnit(ctx context.Context, params *UpdateOrg type UpdateOrganizationalUnitInput struct { // The unique identifier (ID) of the OU that you want to rename. You can get the - // ID from the ListOrganizationalUnitsForParent operation. The regex pattern (http://wikipedia.org/wiki/regex) - // for an organizational unit ID string requires "ou-" followed by from 4 to 32 - // lowercase letters or digits (the ID of the root that contains the OU). This + // ID from the ListOrganizationalUnitsForParentoperation. + // + // The [regex pattern] for an organizational unit ID string requires "ou-" followed by from 4 to + // 32 lowercase letters or digits (the ID of the root that contains the OU). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. OrganizationalUnitId *string - // The new name that you want to assign to the OU. The regex pattern (http://wikipedia.org/wiki/regex) - // that is used to validate this parameter is a string of any of the characters in - // the ASCII character range. + // The new name that you want to assign to the OU. + // + // The [regex pattern] that is used to validate this parameter is a string of any of the + // characters in the ASCII character range. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Name *string noSmithyDocumentSerde @@ -85,25 +91,25 @@ func (c *Client) addOperationUpdateOrganizationalUnitMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -118,13 +124,19 @@ func (c *Client) addOperationUpdateOrganizationalUnitMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOrganizationalUnitValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOrganizationalUnit(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdatePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdatePolicy.go index 4fd0335f..103f3df5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdatePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdatePolicy.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/organizations/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,9 +13,11 @@ import ( // Updates an existing policy with a new name, description, or content. If you // don't supply any parameter, that value remains unchanged. You can't change a -// policy's type. This operation can be called only from the organization's -// management account or by a member account that is a delegated administrator for -// an Amazon Web Services service. +// policy's type. +// +// This operation can be called only from the organization's management account or +// by a member account that is a delegated administrator for an Amazon Web Services +// service. func (c *Client) UpdatePolicy(ctx context.Context, params *UpdatePolicyInput, optFns ...func(*Options)) (*UpdatePolicyOutput, error) { if params == nil { params = &UpdatePolicyInput{} @@ -34,26 +35,36 @@ func (c *Client) UpdatePolicy(ctx context.Context, params *UpdatePolicyInput, op type UpdatePolicyInput struct { - // The unique identifier (ID) of the policy that you want to update. The regex - // pattern (http://wikipedia.org/wiki/regex) for a policy ID string requires "p-" - // followed by from 8 to 128 lowercase or uppercase letters, digits, or the - // underscore character (_). + // The unique identifier (ID) of the policy that you want to update. + // + // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase + // or uppercase letters, digits, or the underscore character (_). + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyId *string // If provided, the new content for the policy. The text must be correctly // formatted JSON that complies with the syntax for the policy's type. For more - // information, see SCP syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html) - // in the Organizations User Guide. + // information, see [SCP syntax]in the Organizations User Guide. + // + // The maximum size of a policy document depends on the policy's type. For more + // information, see [Maximum and minimum values]in the Organizations User Guide. + // + // [Maximum and minimum values]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html#min-max-values + // [SCP syntax]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html Content *string // If provided, the new description for the policy. Description *string - // If provided, the new name for the policy. The regex pattern (http://wikipedia.org/wiki/regex) - // that is used to validate this parameter is a string of any of the characters in - // the ASCII character range. + // If provided, the new name for the policy. + // + // The [regex pattern] that is used to validate this parameter is a string of any of the + // characters in the ASCII character range. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Name *string noSmithyDocumentSerde @@ -93,25 +104,25 @@ func (c *Client) addOperationUpdatePolicyMiddlewares(stack *middleware.Stack, op if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -126,13 +137,19 @@ func (c *Client) addOperationUpdatePolicyMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePolicy(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/auth.go index e1974bab..8b97167a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/auth.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { params.Region = options.Region } @@ -52,6 +52,34 @@ 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 { @@ -62,12 +90,12 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(params, input, options) + bindAuthParamsRegion(ctx, params, input, options) return params } @@ -117,10 +145,10 @@ func (*resolveAuthSchemeMiddleware) ID() string { 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) + params := bindAuthResolverParams(ctx, 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: %v", err) + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) } scheme, ok := m.selectScheme(options) @@ -200,7 +228,7 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) if err != nil { - return out, metadata, fmt.Errorf("get identity: %v", err) + return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) @@ -249,7 +277,7 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar } if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { - return out, metadata, fmt.Errorf("sign request: %v", err) + 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/organizations/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/deserializers.go index 05ce79ec..8946093a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/deserializers.go @@ -18,8 +18,17 @@ import ( "io" "io/ioutil" "strings" + "time" ) +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + type awsAwsjson11_deserializeOpAcceptHandshake struct { } @@ -88,9 +97,6 @@ func awsAwsjson11_deserializeOpErrorAcceptHandshake(response *smithyhttp.Respons errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -98,7 +104,7 @@ func awsAwsjson11_deserializeOpErrorAcceptHandshake(response *smithyhttp.Respons body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -110,13 +116,12 @@ func awsAwsjson11_deserializeOpErrorAcceptHandshake(response *smithyhttp.Respons } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -207,9 +212,6 @@ func awsAwsjson11_deserializeOpErrorAttachPolicy(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -217,7 +219,7 @@ func awsAwsjson11_deserializeOpErrorAttachPolicy(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -229,13 +231,12 @@ func awsAwsjson11_deserializeOpErrorAttachPolicy(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -354,9 +355,6 @@ func awsAwsjson11_deserializeOpErrorCancelHandshake(response *smithyhttp.Respons errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -364,7 +362,7 @@ func awsAwsjson11_deserializeOpErrorCancelHandshake(response *smithyhttp.Respons body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -376,13 +374,12 @@ func awsAwsjson11_deserializeOpErrorCancelHandshake(response *smithyhttp.Respons } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -464,9 +461,6 @@ func awsAwsjson11_deserializeOpErrorCloseAccount(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -474,7 +468,7 @@ func awsAwsjson11_deserializeOpErrorCloseAccount(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -486,13 +480,12 @@ func awsAwsjson11_deserializeOpErrorCloseAccount(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -605,9 +598,6 @@ func awsAwsjson11_deserializeOpErrorCreateAccount(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -615,7 +605,7 @@ func awsAwsjson11_deserializeOpErrorCreateAccount(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -627,13 +617,12 @@ func awsAwsjson11_deserializeOpErrorCreateAccount(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -740,9 +729,6 @@ func awsAwsjson11_deserializeOpErrorCreateGovCloudAccount(response *smithyhttp.R errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -750,7 +736,7 @@ func awsAwsjson11_deserializeOpErrorCreateGovCloudAccount(response *smithyhttp.R body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -762,13 +748,12 @@ func awsAwsjson11_deserializeOpErrorCreateGovCloudAccount(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -875,9 +860,6 @@ func awsAwsjson11_deserializeOpErrorCreateOrganization(response *smithyhttp.Resp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -885,7 +867,7 @@ func awsAwsjson11_deserializeOpErrorCreateOrganization(response *smithyhttp.Resp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -897,13 +879,12 @@ func awsAwsjson11_deserializeOpErrorCreateOrganization(response *smithyhttp.Resp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1007,9 +988,6 @@ func awsAwsjson11_deserializeOpErrorCreateOrganizationalUnit(response *smithyhtt errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1017,7 +995,7 @@ func awsAwsjson11_deserializeOpErrorCreateOrganizationalUnit(response *smithyhtt body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1029,13 +1007,12 @@ func awsAwsjson11_deserializeOpErrorCreateOrganizationalUnit(response *smithyhtt } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -1142,9 +1119,6 @@ func awsAwsjson11_deserializeOpErrorCreatePolicy(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1152,7 +1126,7 @@ func awsAwsjson11_deserializeOpErrorCreatePolicy(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1164,13 +1138,12 @@ func awsAwsjson11_deserializeOpErrorCreatePolicy(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -1283,9 +1256,6 @@ func awsAwsjson11_deserializeOpErrorDeclineHandshake(response *smithyhttp.Respon errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1293,7 +1263,7 @@ func awsAwsjson11_deserializeOpErrorDeclineHandshake(response *smithyhttp.Respon body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1305,13 +1275,12 @@ func awsAwsjson11_deserializeOpErrorDeclineHandshake(response *smithyhttp.Respon } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1393,9 +1362,6 @@ func awsAwsjson11_deserializeOpErrorDeleteOrganization(response *smithyhttp.Resp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1403,7 +1369,7 @@ func awsAwsjson11_deserializeOpErrorDeleteOrganization(response *smithyhttp.Resp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1415,13 +1381,12 @@ func awsAwsjson11_deserializeOpErrorDeleteOrganization(response *smithyhttp.Resp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -1500,9 +1465,6 @@ func awsAwsjson11_deserializeOpErrorDeleteOrganizationalUnit(response *smithyhtt errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1510,7 +1472,7 @@ func awsAwsjson11_deserializeOpErrorDeleteOrganizationalUnit(response *smithyhtt body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1522,13 +1484,12 @@ func awsAwsjson11_deserializeOpErrorDeleteOrganizationalUnit(response *smithyhtt } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -1610,9 +1571,6 @@ func awsAwsjson11_deserializeOpErrorDeletePolicy(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1620,7 +1578,7 @@ func awsAwsjson11_deserializeOpErrorDeletePolicy(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1632,13 +1590,12 @@ func awsAwsjson11_deserializeOpErrorDeletePolicy(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -1723,9 +1680,6 @@ func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Re errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1733,7 +1687,7 @@ func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Re body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1745,13 +1699,12 @@ func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Re } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -1833,9 +1786,6 @@ func awsAwsjson11_deserializeOpErrorDeregisterDelegatedAdministrator(response *s errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1843,7 +1793,7 @@ func awsAwsjson11_deserializeOpErrorDeregisterDelegatedAdministrator(response *s body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1855,13 +1805,12 @@ func awsAwsjson11_deserializeOpErrorDeregisterDelegatedAdministrator(response *s } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -1971,9 +1920,6 @@ func awsAwsjson11_deserializeOpErrorDescribeAccount(response *smithyhttp.Respons errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1981,7 +1927,7 @@ func awsAwsjson11_deserializeOpErrorDescribeAccount(response *smithyhttp.Respons body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1993,13 +1939,12 @@ func awsAwsjson11_deserializeOpErrorDescribeAccount(response *smithyhttp.Respons } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -2097,9 +2042,6 @@ func awsAwsjson11_deserializeOpErrorDescribeCreateAccountStatus(response *smithy errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2107,7 +2049,7 @@ func awsAwsjson11_deserializeOpErrorDescribeCreateAccountStatus(response *smithy body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2119,13 +2061,12 @@ func awsAwsjson11_deserializeOpErrorDescribeCreateAccountStatus(response *smithy } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -2226,9 +2167,6 @@ func awsAwsjson11_deserializeOpErrorDescribeEffectivePolicy(response *smithyhttp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2236,7 +2174,7 @@ func awsAwsjson11_deserializeOpErrorDescribeEffectivePolicy(response *smithyhttp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2248,13 +2186,12 @@ func awsAwsjson11_deserializeOpErrorDescribeEffectivePolicy(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -2361,9 +2298,6 @@ func awsAwsjson11_deserializeOpErrorDescribeHandshake(response *smithyhttp.Respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2371,7 +2305,7 @@ func awsAwsjson11_deserializeOpErrorDescribeHandshake(response *smithyhttp.Respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2383,13 +2317,12 @@ func awsAwsjson11_deserializeOpErrorDescribeHandshake(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2487,9 +2420,6 @@ func awsAwsjson11_deserializeOpErrorDescribeOrganization(response *smithyhttp.Re errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2497,7 +2427,7 @@ func awsAwsjson11_deserializeOpErrorDescribeOrganization(response *smithyhttp.Re body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2509,13 +2439,12 @@ func awsAwsjson11_deserializeOpErrorDescribeOrganization(response *smithyhttp.Re } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -2610,9 +2539,6 @@ func awsAwsjson11_deserializeOpErrorDescribeOrganizationalUnit(response *smithyh errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2620,7 +2546,7 @@ func awsAwsjson11_deserializeOpErrorDescribeOrganizationalUnit(response *smithyh body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2632,13 +2558,12 @@ func awsAwsjson11_deserializeOpErrorDescribeOrganizationalUnit(response *smithyh } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -2736,9 +2661,6 @@ func awsAwsjson11_deserializeOpErrorDescribePolicy(response *smithyhttp.Response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2746,7 +2668,7 @@ func awsAwsjson11_deserializeOpErrorDescribePolicy(response *smithyhttp.Response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2758,13 +2680,12 @@ func awsAwsjson11_deserializeOpErrorDescribePolicy(response *smithyhttp.Response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -2865,9 +2786,6 @@ func awsAwsjson11_deserializeOpErrorDescribeResourcePolicy(response *smithyhttp. errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2875,7 +2793,7 @@ func awsAwsjson11_deserializeOpErrorDescribeResourcePolicy(response *smithyhttp. body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2887,13 +2805,12 @@ func awsAwsjson11_deserializeOpErrorDescribeResourcePolicy(response *smithyhttp. } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -2972,9 +2889,6 @@ func awsAwsjson11_deserializeOpErrorDetachPolicy(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2982,7 +2896,7 @@ func awsAwsjson11_deserializeOpErrorDetachPolicy(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2994,13 +2908,12 @@ func awsAwsjson11_deserializeOpErrorDetachPolicy(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -3094,9 +3007,6 @@ func awsAwsjson11_deserializeOpErrorDisableAWSServiceAccess(response *smithyhttp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3104,7 +3014,7 @@ func awsAwsjson11_deserializeOpErrorDisableAWSServiceAccess(response *smithyhttp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3116,13 +3026,12 @@ func awsAwsjson11_deserializeOpErrorDisableAWSServiceAccess(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -3226,9 +3135,6 @@ func awsAwsjson11_deserializeOpErrorDisablePolicyType(response *smithyhttp.Respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3236,7 +3142,7 @@ func awsAwsjson11_deserializeOpErrorDisablePolicyType(response *smithyhttp.Respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3248,13 +3154,12 @@ func awsAwsjson11_deserializeOpErrorDisablePolicyType(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -3367,9 +3272,6 @@ func awsAwsjson11_deserializeOpErrorEnableAllFeatures(response *smithyhttp.Respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3377,7 +3279,7 @@ func awsAwsjson11_deserializeOpErrorEnableAllFeatures(response *smithyhttp.Respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3389,13 +3291,12 @@ func awsAwsjson11_deserializeOpErrorEnableAllFeatures(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -3474,9 +3375,6 @@ func awsAwsjson11_deserializeOpErrorEnableAWSServiceAccess(response *smithyhttp. errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3484,7 +3382,7 @@ func awsAwsjson11_deserializeOpErrorEnableAWSServiceAccess(response *smithyhttp. body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3496,13 +3394,12 @@ func awsAwsjson11_deserializeOpErrorEnableAWSServiceAccess(response *smithyhttp. } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -3606,9 +3503,6 @@ func awsAwsjson11_deserializeOpErrorEnablePolicyType(response *smithyhttp.Respon errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3616,7 +3510,7 @@ func awsAwsjson11_deserializeOpErrorEnablePolicyType(response *smithyhttp.Respon body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3628,13 +3522,12 @@ func awsAwsjson11_deserializeOpErrorEnablePolicyType(response *smithyhttp.Respon } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -3750,9 +3643,6 @@ func awsAwsjson11_deserializeOpErrorInviteAccountToOrganization(response *smithy errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3760,7 +3650,7 @@ func awsAwsjson11_deserializeOpErrorInviteAccountToOrganization(response *smithy body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3772,13 +3662,12 @@ func awsAwsjson11_deserializeOpErrorInviteAccountToOrganization(response *smithy } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -3869,9 +3758,6 @@ func awsAwsjson11_deserializeOpErrorLeaveOrganization(response *smithyhttp.Respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3879,7 +3765,7 @@ func awsAwsjson11_deserializeOpErrorLeaveOrganization(response *smithyhttp.Respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3891,13 +3777,12 @@ func awsAwsjson11_deserializeOpErrorLeaveOrganization(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -4004,9 +3889,6 @@ func awsAwsjson11_deserializeOpErrorListAccounts(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4014,7 +3896,7 @@ func awsAwsjson11_deserializeOpErrorListAccounts(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4026,13 +3908,12 @@ func awsAwsjson11_deserializeOpErrorListAccounts(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -4127,9 +4008,6 @@ func awsAwsjson11_deserializeOpErrorListAccountsForParent(response *smithyhttp.R errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4137,7 +4015,7 @@ func awsAwsjson11_deserializeOpErrorListAccountsForParent(response *smithyhttp.R body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4149,13 +4027,12 @@ func awsAwsjson11_deserializeOpErrorListAccountsForParent(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -4253,9 +4130,6 @@ func awsAwsjson11_deserializeOpErrorListAWSServiceAccessForOrganization(response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4263,7 +4137,7 @@ func awsAwsjson11_deserializeOpErrorListAWSServiceAccessForOrganization(response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4275,13 +4149,12 @@ func awsAwsjson11_deserializeOpErrorListAWSServiceAccessForOrganization(response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -4382,9 +4255,6 @@ func awsAwsjson11_deserializeOpErrorListChildren(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4392,7 +4262,7 @@ func awsAwsjson11_deserializeOpErrorListChildren(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4404,13 +4274,12 @@ func awsAwsjson11_deserializeOpErrorListChildren(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -4508,9 +4377,6 @@ func awsAwsjson11_deserializeOpErrorListCreateAccountStatus(response *smithyhttp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4518,7 +4384,7 @@ func awsAwsjson11_deserializeOpErrorListCreateAccountStatus(response *smithyhttp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4530,13 +4396,12 @@ func awsAwsjson11_deserializeOpErrorListCreateAccountStatus(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -4634,9 +4499,6 @@ func awsAwsjson11_deserializeOpErrorListDelegatedAdministrators(response *smithy errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4644,7 +4506,7 @@ func awsAwsjson11_deserializeOpErrorListDelegatedAdministrators(response *smithy body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4656,13 +4518,12 @@ func awsAwsjson11_deserializeOpErrorListDelegatedAdministrators(response *smithy } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -4763,9 +4624,6 @@ func awsAwsjson11_deserializeOpErrorListDelegatedServicesForAccount(response *sm errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4773,7 +4631,7 @@ func awsAwsjson11_deserializeOpErrorListDelegatedServicesForAccount(response *sm body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4785,13 +4643,12 @@ func awsAwsjson11_deserializeOpErrorListDelegatedServicesForAccount(response *sm } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -4898,9 +4755,6 @@ func awsAwsjson11_deserializeOpErrorListHandshakesForAccount(response *smithyhtt errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4908,7 +4762,7 @@ func awsAwsjson11_deserializeOpErrorListHandshakesForAccount(response *smithyhtt body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4920,13 +4774,12 @@ func awsAwsjson11_deserializeOpErrorListHandshakesForAccount(response *smithyhtt } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -5021,9 +4874,6 @@ func awsAwsjson11_deserializeOpErrorListHandshakesForOrganization(response *smit errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5031,7 +4881,7 @@ func awsAwsjson11_deserializeOpErrorListHandshakesForOrganization(response *smit body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5043,13 +4893,12 @@ func awsAwsjson11_deserializeOpErrorListHandshakesForOrganization(response *smit } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -5147,9 +4996,6 @@ func awsAwsjson11_deserializeOpErrorListOrganizationalUnitsForParent(response *s errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5157,7 +5003,7 @@ func awsAwsjson11_deserializeOpErrorListOrganizationalUnitsForParent(response *s body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5169,13 +5015,12 @@ func awsAwsjson11_deserializeOpErrorListOrganizationalUnitsForParent(response *s } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -5273,9 +5118,6 @@ func awsAwsjson11_deserializeOpErrorListParents(response *smithyhttp.Response, m errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5283,7 +5125,7 @@ func awsAwsjson11_deserializeOpErrorListParents(response *smithyhttp.Response, m body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5295,13 +5137,12 @@ func awsAwsjson11_deserializeOpErrorListParents(response *smithyhttp.Response, m } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -5399,9 +5240,6 @@ func awsAwsjson11_deserializeOpErrorListPolicies(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5409,7 +5247,7 @@ func awsAwsjson11_deserializeOpErrorListPolicies(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5421,13 +5259,12 @@ func awsAwsjson11_deserializeOpErrorListPolicies(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -5525,9 +5362,6 @@ func awsAwsjson11_deserializeOpErrorListPoliciesForTarget(response *smithyhttp.R errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5535,7 +5369,7 @@ func awsAwsjson11_deserializeOpErrorListPoliciesForTarget(response *smithyhttp.R body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5547,13 +5381,12 @@ func awsAwsjson11_deserializeOpErrorListPoliciesForTarget(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -5654,9 +5487,6 @@ func awsAwsjson11_deserializeOpErrorListRoots(response *smithyhttp.Response, met errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5664,7 +5494,7 @@ func awsAwsjson11_deserializeOpErrorListRoots(response *smithyhttp.Response, met body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5676,13 +5506,12 @@ func awsAwsjson11_deserializeOpErrorListRoots(response *smithyhttp.Response, met } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -5777,9 +5606,6 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5787,7 +5613,7 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5799,13 +5625,12 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -5903,9 +5728,6 @@ func awsAwsjson11_deserializeOpErrorListTargetsForPolicy(response *smithyhttp.Re errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5913,7 +5735,7 @@ func awsAwsjson11_deserializeOpErrorListTargetsForPolicy(response *smithyhttp.Re body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5925,13 +5747,12 @@ func awsAwsjson11_deserializeOpErrorListTargetsForPolicy(response *smithyhttp.Re } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -6010,9 +5831,6 @@ func awsAwsjson11_deserializeOpErrorMoveAccount(response *smithyhttp.Response, m errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6020,7 +5838,7 @@ func awsAwsjson11_deserializeOpErrorMoveAccount(response *smithyhttp.Response, m body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6032,13 +5850,12 @@ func awsAwsjson11_deserializeOpErrorMoveAccount(response *smithyhttp.Response, m } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -6148,9 +5965,6 @@ func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6158,7 +5972,7 @@ func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6170,13 +5984,12 @@ func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -6258,9 +6071,6 @@ func awsAwsjson11_deserializeOpErrorRegisterDelegatedAdministrator(response *smi errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6268,7 +6078,7 @@ func awsAwsjson11_deserializeOpErrorRegisterDelegatedAdministrator(response *smi body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6280,13 +6090,12 @@ func awsAwsjson11_deserializeOpErrorRegisterDelegatedAdministrator(response *smi } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -6374,9 +6183,6 @@ func awsAwsjson11_deserializeOpErrorRemoveAccountFromOrganization(response *smit errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6384,7 +6190,7 @@ func awsAwsjson11_deserializeOpErrorRemoveAccountFromOrganization(response *smit body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6396,13 +6202,12 @@ func awsAwsjson11_deserializeOpErrorRemoveAccountFromOrganization(response *smit } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -6487,9 +6292,6 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6497,7 +6299,7 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6509,13 +6311,12 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -6597,9 +6398,6 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6607,7 +6405,7 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6619,13 +6417,12 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -6729,9 +6526,6 @@ func awsAwsjson11_deserializeOpErrorUpdateOrganizationalUnit(response *smithyhtt errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6739,7 +6533,7 @@ func awsAwsjson11_deserializeOpErrorUpdateOrganizationalUnit(response *smithyhtt body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6751,13 +6545,12 @@ func awsAwsjson11_deserializeOpErrorUpdateOrganizationalUnit(response *smithyhtt } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -6861,9 +6654,6 @@ func awsAwsjson11_deserializeOpErrorUpdatePolicy(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6871,7 +6661,7 @@ func awsAwsjson11_deserializeOpErrorUpdatePolicy(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6883,13 +6673,12 @@ func awsAwsjson11_deserializeOpErrorUpdatePolicy(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode): return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody) @@ -14029,3 +13818,32 @@ func awsAwsjson11_deserializeOpDocumentUpdatePolicyOutput(v **UpdatePolicyOutput *v = sv return nil } + +type protocolErrorInfo struct { + Type string `json:"__type"` + Message string + Code any // nonstandard for awsjson but some services do present the type here +} + +func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) { + var errInfo protocolErrorInfo + if err := decoder.Decode(&errInfo); err != nil { + if err == io.EOF { + return errInfo, nil + } + return errInfo, err + } + + return errInfo, nil +} + +func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) { + if len(headerType) != 0 { + return headerType, true + } else if len(bodyInfo.Type) != 0 { + return bodyInfo.Type, true + } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 { + return code, true + } + return "", false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/doc.go index 59bedab8..70395af7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/doc.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/doc.go @@ -5,40 +5,74 @@ // // Organizations is a web service that enables you to consolidate your multiple // Amazon Web Services accounts into an organization and centrally manage your -// accounts and their resources. This guide provides descriptions of the -// Organizations operations. For more information about using this service, see the -// Organizations User Guide (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) -// . Support and feedback for Organizations We welcome your feedback. Send your -// comments to feedback-awsorganizations@amazon.com (mailto:feedback-awsorganizations@amazon.com) -// or post your feedback and questions in the Organizations support forum (http://forums.aws.amazon.com/forum.jspa?forumID=219) -// . For more information about the Amazon Web Services support forums, see Forums -// Help (http://forums.aws.amazon.com/help.jspa) . Endpoint to call When using the -// CLI or the Amazon Web Services SDK For the current release of Organizations, -// specify the us-east-1 region for all Amazon Web Services API and CLI calls made -// from the commercial Amazon Web Services Regions outside of China. If calling -// from one of the Amazon Web Services Regions in China, then specify -// cn-northwest-1 . You can do this in the CLI by using these parameters and -// commands: +// accounts and their resources. +// +// This guide provides descriptions of the Organizations operations. For more +// information about using this service, see the [Organizations User Guide]. +// +// # Support and feedback for Organizations +// +// We welcome your feedback. Send your comments to feedback-awsorganizations@amazon.com or post your feedback and +// questions in the [Organizations support forum]. For more information about the Amazon Web Services support +// forums, see [Forums Help]. +// +// # Endpoint to call When using the CLI or the Amazon Web Services SDK +// +// For the current release of Organizations, specify the us-east-1 region for all +// Amazon Web Services API and CLI calls made from the commercial Amazon Web +// Services Regions outside of China. If calling from one of the Amazon Web +// Services Regions in China, then specify cn-northwest-1 . You can do this in the +// CLI by using these parameters and commands: +// // - Use the following parameter with each command to specify both the endpoint -// and its region: --endpoint-url https://organizations.us-east-1.amazonaws.com -// (from commercial Amazon Web Services Regions outside of China) or -// --endpoint-url https://organizations.cn-northwest-1.amazonaws.com.cn (from -// Amazon Web Services Regions in China) -// - Use the default endpoint, but configure your default region with this -// command: aws configure set default.region us-east-1 (from commercial Amazon -// Web Services Regions outside of China) or aws configure set default.region -// cn-northwest-1 (from Amazon Web Services Regions in China) -// - Use the following parameter with each command to specify the endpoint: -// --region us-east-1 (from commercial Amazon Web Services Regions outside of -// China) or --region cn-northwest-1 (from Amazon Web Services Regions in China) -// -// Recording API Requests Organizations supports CloudTrail, a service that -// records Amazon Web Services API calls for your Amazon Web Services account and -// delivers log files to an Amazon S3 bucket. By using information collected by -// CloudTrail, you can determine which requests the Organizations service received, -// who made the request and when, and so on. For more about Organizations and its -// support for CloudTrail, see Logging Organizations API calls with CloudTrail (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_incident-response.html#orgs_cloudtrail-integration) -// in the Organizations User Guide. To learn more about CloudTrail, including how -// to turn it on and find your log files, see the CloudTrail User Guide (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html) -// . +// and its region: +// +// --endpoint-url https://organizations.us-east-1.amazonaws.com (from commercial +// +// Amazon Web Services Regions outside of China) +// +// or +// +// --endpoint-url https://organizations.cn-northwest-1.amazonaws.com.cn (from +// +// Amazon Web Services Regions in China) +// +// - Use the default endpoint, but configure your default region with this +// command: +// +// aws configure set default.region us-east-1 (from commercial Amazon Web Services +// +// Regions outside of China) +// +// or +// +// aws configure set default.region cn-northwest-1 (from Amazon Web Services +// +// Regions in China) +// +// - Use the following parameter with each command to specify the endpoint: +// +// --region us-east-1 (from commercial Amazon Web Services Regions outside of +// +// China) +// +// or +// +// --region cn-northwest-1 (from Amazon Web Services Regions in China) +// +// # Recording API Requests +// +// Organizations supports CloudTrail, a service that records Amazon Web Services +// API calls for your Amazon Web Services account and delivers log files to an +// Amazon S3 bucket. By using information collected by CloudTrail, you can +// determine which requests the Organizations service received, who made the +// request and when, and so on. For more about Organizations and its support for +// CloudTrail, see [Logging Organizations API calls with CloudTrail]in the Organizations User Guide. To learn more about +// CloudTrail, including how to turn it on and find your log files, see the [CloudTrail User Guide]. +// +// [Forums Help]: http://forums.aws.amazon.com/help.jspa +// [Organizations support forum]: http://forums.aws.amazon.com/forum.jspa?forumID=219 +// [CloudTrail User Guide]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html +// [Organizations User Guide]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html +// [Logging Organizations API calls with CloudTrail]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_incident-response.html#orgs_cloudtrail-integration package organizations diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/endpoints.go index 7058ea37..a116538f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/endpoints.go @@ -217,6 +217,13 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) { } } +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 { @@ -282,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, @@ -509,6 +527,108 @@ func (r *resolver) ResolveEndpoint( } } } + if _PartitionResult.Name == "aws-iso" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://organizations.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, "organizations") + smithyhttp.SetSigV4ASigningName(&sp, "organizations") + + 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://organizations.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, "organizations") + smithyhttp.SetSigV4ASigningName(&sp, "organizations") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws-iso-f" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://organizations.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, "organizations") + smithyhttp.SetSigV4ASigningName(&sp, "organizations") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-isof-south-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } if _UseFIPS == true { if _UseDualStack == true { if true == _PartitionResult.SupportsFIPS { @@ -537,7 +657,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://organizations-fips.") @@ -610,10 +730,10 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} - params.Region = aws.String(endpoints.MapFIPSRegion(options.Region)) + 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 @@ -640,6 +760,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return next.HandleFinalize(ctx, in) } + if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { + return out, metadata, fmt.Errorf("invalid accountID set: %w", err) + } + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -649,7 +773,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(getOperationInput(ctx), m.options) + params := bindEndpointParams(ctx, 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) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/generated.json index ee9f6887..6f979661 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/generated.json @@ -3,8 +3,7 @@ "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", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", @@ -76,6 +75,7 @@ "options.go", "protocol_test.go", "serializers.go", + "snapshot_test.go", "types/enums.go", "types/errors.go", "types/types.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/go_module_metadata.go index b3016bac..dbbf1a42 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/go_module_metadata.go @@ -3,4 +3,4 @@ package organizations // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.22.3" +const goModuleVersion = "1.31.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/options.go index e9a2c148..a14a816b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/options.go @@ -24,6 +24,9 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error + // Indicates how aws account ID is applied in endpoint2.0 routing + AccountIDEndpointMode aws.AccountIDEndpointMode + // The optional application specific identifier appended to the User-Agent header. AppID string @@ -50,8 +53,10 @@ type Options struct { // 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. + // 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 @@ -70,19 +75,20 @@ type Options struct { // 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. 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. 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. + // 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. + // 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 @@ -99,8 +105,9 @@ type Options struct { // 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. + // 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 @@ -145,6 +152,7 @@ func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { // 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) { @@ -213,7 +221,7 @@ func WithSigV4SigningRegion(region string) func(*Options) { } func ignoreAnonymousAuth(options *Options) { - if _, ok := options.Credentials.(aws.AnonymousCredentials); ok { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { options.Credentials = nil } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/enums.go index 516d0055..b74717e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/enums.go @@ -11,8 +11,9 @@ const ( // Values returns all known values for AccessDeniedForDependencyExceptionReason. // 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. +// the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. func (AccessDeniedForDependencyExceptionReason) Values() []AccessDeniedForDependencyExceptionReason { return []AccessDeniedForDependencyExceptionReason{ "ACCESS_DENIED_DURING_CREATE_SERVICE_LINKED_ROLE", @@ -28,8 +29,9 @@ const ( ) // Values returns all known values for AccountJoinedMethod. 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. +// 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 (AccountJoinedMethod) Values() []AccountJoinedMethod { return []AccountJoinedMethod{ "INVITED", @@ -47,8 +49,9 @@ const ( ) // Values returns all known values for AccountStatus. 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. +// 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 (AccountStatus) Values() []AccountStatus { return []AccountStatus{ "ACTIVE", @@ -68,8 +71,9 @@ const ( ) // Values returns all known values for ActionType. 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. +// 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 (ActionType) Values() []ActionType { return []ActionType{ "INVITE", @@ -88,8 +92,9 @@ const ( ) // Values returns all known values for ChildType. 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. +// 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 (ChildType) Values() []ChildType { return []ChildType{ "ACCOUNT", @@ -101,46 +106,48 @@ type ConstraintViolationExceptionReason string // Enum values for ConstraintViolationExceptionReason const ( - ConstraintViolationExceptionReasonAccountNumberLimitExceeded ConstraintViolationExceptionReason = "ACCOUNT_NUMBER_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonHandshakeRateLimitExceeded ConstraintViolationExceptionReason = "HANDSHAKE_RATE_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonOuNumberLimitExceeded ConstraintViolationExceptionReason = "OU_NUMBER_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonOuDepthLimitExceeded ConstraintViolationExceptionReason = "OU_DEPTH_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonPolicyNumberLimitExceeded ConstraintViolationExceptionReason = "POLICY_NUMBER_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonPolicyContentLimitExceeded ConstraintViolationExceptionReason = "POLICY_CONTENT_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded ConstraintViolationExceptionReason = "MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded ConstraintViolationExceptionReason = "MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonAccountCannotLeaveOrganization ConstraintViolationExceptionReason = "ACCOUNT_CANNOT_LEAVE_ORGANIZATION" - ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula ConstraintViolationExceptionReason = "ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA" - ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification ConstraintViolationExceptionReason = "ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION" - ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired ConstraintViolationExceptionReason = "MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED" - ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired ConstraintViolationExceptionReason = "MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED" - ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded ConstraintViolationExceptionReason = "ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace ConstraintViolationExceptionReason = "MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE" - ConstraintViolationExceptionReasonMasterAccountMissingContactInfo ConstraintViolationExceptionReason = "MASTER_ACCOUNT_MISSING_CONTACT_INFO" - ConstraintViolationExceptionReasonMasterAccountNotGovcloudEnabled ConstraintViolationExceptionReason = "MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED" - ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode ConstraintViolationExceptionReason = "ORGANIZATION_NOT_IN_ALL_FEATURES_MODE" - ConstraintViolationExceptionReasonCreateOrganizationInBillingModeUnsupportedRegion ConstraintViolationExceptionReason = "CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION" - ConstraintViolationExceptionReasonEmailVerificationCodeExpired ConstraintViolationExceptionReason = "EMAIL_VERIFICATION_CODE_EXPIRED" - ConstraintViolationExceptionReasonWaitPeriodActive ConstraintViolationExceptionReason = "WAIT_PERIOD_ACTIVE" - ConstraintViolationExceptionReasonMaxTagLimitExceeded ConstraintViolationExceptionReason = "MAX_TAG_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonTagPolicyViolation ConstraintViolationExceptionReason = "TAG_POLICY_VIOLATION" - ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded ConstraintViolationExceptionReason = "MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator ConstraintViolationExceptionReason = "CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR" - ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg ConstraintViolationExceptionReason = "CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG" - ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService ConstraintViolationExceptionReason = "DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE" - ConstraintViolationExceptionReasonMasterAccountMissingBusinessLicense ConstraintViolationExceptionReason = "MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE" - ConstraintViolationExceptionReasonCannotCloseManagementAccount ConstraintViolationExceptionReason = "CANNOT_CLOSE_MANAGEMENT_ACCOUNT" - ConstraintViolationExceptionReasonCloseAccountQuotaExceeded ConstraintViolationExceptionReason = "CLOSE_ACCOUNT_QUOTA_EXCEEDED" - ConstraintViolationExceptionReasonCloseAccountRequestsLimitExceeded ConstraintViolationExceptionReason = "CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED" - ConstraintViolationExceptionReasonServiceAccessNotEnabled ConstraintViolationExceptionReason = "SERVICE_ACCESS_NOT_ENABLED" - ConstraintViolationExceptionReasonInvalidPaymentInstrument ConstraintViolationExceptionReason = "INVALID_PAYMENT_INSTRUMENT" - ConstraintViolationExceptionReasonAccountCreationNotComplete ConstraintViolationExceptionReason = "ACCOUNT_CREATION_NOT_COMPLETE" + ConstraintViolationExceptionReasonAccountNumberLimitExceeded ConstraintViolationExceptionReason = "ACCOUNT_NUMBER_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonHandshakeRateLimitExceeded ConstraintViolationExceptionReason = "HANDSHAKE_RATE_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonOuNumberLimitExceeded ConstraintViolationExceptionReason = "OU_NUMBER_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonOuDepthLimitExceeded ConstraintViolationExceptionReason = "OU_DEPTH_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonPolicyNumberLimitExceeded ConstraintViolationExceptionReason = "POLICY_NUMBER_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonPolicyContentLimitExceeded ConstraintViolationExceptionReason = "POLICY_CONTENT_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded ConstraintViolationExceptionReason = "MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded ConstraintViolationExceptionReason = "MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonAccountCannotLeaveOrganization ConstraintViolationExceptionReason = "ACCOUNT_CANNOT_LEAVE_ORGANIZATION" + ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula ConstraintViolationExceptionReason = "ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA" + ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification ConstraintViolationExceptionReason = "ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION" + ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired ConstraintViolationExceptionReason = "MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED" + ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired ConstraintViolationExceptionReason = "MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED" + ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded ConstraintViolationExceptionReason = "ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace ConstraintViolationExceptionReason = "MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE" + ConstraintViolationExceptionReasonMasterAccountMissingContactInfo ConstraintViolationExceptionReason = "MASTER_ACCOUNT_MISSING_CONTACT_INFO" + ConstraintViolationExceptionReasonMasterAccountNotGovcloudEnabled ConstraintViolationExceptionReason = "MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED" + ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode ConstraintViolationExceptionReason = "ORGANIZATION_NOT_IN_ALL_FEATURES_MODE" + ConstraintViolationExceptionReasonCreateOrganizationInBillingModeUnsupportedRegion ConstraintViolationExceptionReason = "CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION" + ConstraintViolationExceptionReasonEmailVerificationCodeExpired ConstraintViolationExceptionReason = "EMAIL_VERIFICATION_CODE_EXPIRED" + ConstraintViolationExceptionReasonWaitPeriodActive ConstraintViolationExceptionReason = "WAIT_PERIOD_ACTIVE" + ConstraintViolationExceptionReasonMaxTagLimitExceeded ConstraintViolationExceptionReason = "MAX_TAG_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonTagPolicyViolation ConstraintViolationExceptionReason = "TAG_POLICY_VIOLATION" + ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded ConstraintViolationExceptionReason = "MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator ConstraintViolationExceptionReason = "CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR" + ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg ConstraintViolationExceptionReason = "CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG" + ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService ConstraintViolationExceptionReason = "DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE" + ConstraintViolationExceptionReasonMasterAccountMissingBusinessLicense ConstraintViolationExceptionReason = "MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE" + ConstraintViolationExceptionReasonCannotCloseManagementAccount ConstraintViolationExceptionReason = "CANNOT_CLOSE_MANAGEMENT_ACCOUNT" + ConstraintViolationExceptionReasonCloseAccountQuotaExceeded ConstraintViolationExceptionReason = "CLOSE_ACCOUNT_QUOTA_EXCEEDED" + ConstraintViolationExceptionReasonCloseAccountRequestsLimitExceeded ConstraintViolationExceptionReason = "CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED" + ConstraintViolationExceptionReasonServiceAccessNotEnabled ConstraintViolationExceptionReason = "SERVICE_ACCESS_NOT_ENABLED" + ConstraintViolationExceptionReasonInvalidPaymentInstrument ConstraintViolationExceptionReason = "INVALID_PAYMENT_INSTRUMENT" + ConstraintViolationExceptionReasonAccountCreationNotComplete ConstraintViolationExceptionReason = "ACCOUNT_CREATION_NOT_COMPLETE" + ConstraintViolationExceptionReasonCannotRegisterSuspendedAccountAsDelegatedAdministrator ConstraintViolationExceptionReason = "CANNOT_REGISTER_SUSPENDED_ACCOUNT_AS_DELEGATED_ADMINISTRATOR" ) // Values returns all known values for ConstraintViolationExceptionReason. 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. +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. func (ConstraintViolationExceptionReason) Values() []ConstraintViolationExceptionReason { return []ConstraintViolationExceptionReason{ "ACCOUNT_NUMBER_LIMIT_EXCEEDED", @@ -177,6 +184,7 @@ func (ConstraintViolationExceptionReason) Values() []ConstraintViolationExceptio "SERVICE_ACCESS_NOT_ENABLED", "INVALID_PAYMENT_INSTRUMENT", "ACCOUNT_CREATION_NOT_COMPLETE", + "CANNOT_REGISTER_SUSPENDED_ACCOUNT_AS_DELEGATED_ADMINISTRATOR", } } @@ -203,6 +211,7 @@ const ( // Values returns all known values for CreateAccountFailureReason. 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 (CreateAccountFailureReason) Values() []CreateAccountFailureReason { return []CreateAccountFailureReason{ @@ -234,8 +243,9 @@ const ( ) // Values returns all known values for CreateAccountState. 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. +// 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 (CreateAccountState) Values() []CreateAccountState { return []CreateAccountState{ "IN_PROGRESS", @@ -254,8 +264,9 @@ const ( ) // Values returns all known values for EffectivePolicyType. 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. +// 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 (EffectivePolicyType) Values() []EffectivePolicyType { return []EffectivePolicyType{ "TAG_POLICY", @@ -282,8 +293,9 @@ const ( // Values returns all known values for // HandshakeConstraintViolationExceptionReason. 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. +// 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 (HandshakeConstraintViolationExceptionReason) Values() []HandshakeConstraintViolationExceptionReason { return []HandshakeConstraintViolationExceptionReason{ "ACCOUNT_NUMBER_LIMIT_EXCEEDED", @@ -309,8 +321,9 @@ const ( ) // Values returns all known values for HandshakePartyType. 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. +// 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 (HandshakePartyType) Values() []HandshakePartyType { return []HandshakePartyType{ "ACCOUNT", @@ -334,8 +347,9 @@ const ( ) // Values returns all known values for HandshakeResourceType. 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. +// 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 (HandshakeResourceType) Values() []HandshakeResourceType { return []HandshakeResourceType{ "ACCOUNT", @@ -362,8 +376,9 @@ const ( ) // Values returns all known values for HandshakeState. 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. +// 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 (HandshakeState) Values() []HandshakeState { return []HandshakeState{ "REQUESTED", @@ -384,8 +399,9 @@ const ( ) // Values returns all known values for IAMUserAccessToBilling. 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. +// 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 (IAMUserAccessToBilling) Values() []IAMUserAccessToBilling { return []IAMUserAccessToBilling{ "ALLOW", @@ -429,6 +445,7 @@ const ( // Values returns all known values for InvalidInputExceptionReason. 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 (InvalidInputExceptionReason) Values() []InvalidInputExceptionReason { return []InvalidInputExceptionReason{ @@ -472,8 +489,9 @@ const ( ) // Values returns all known values for OrganizationFeatureSet. 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. +// 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 (OrganizationFeatureSet) Values() []OrganizationFeatureSet { return []OrganizationFeatureSet{ "ALL", @@ -490,8 +508,9 @@ const ( ) // Values returns all known values for ParentType. 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. +// 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 (ParentType) Values() []ParentType { return []ParentType{ "ROOT", @@ -510,8 +529,9 @@ const ( ) // 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. +// 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{ "SERVICE_CONTROL_POLICY", @@ -531,8 +551,9 @@ const ( ) // Values returns all known values for PolicyTypeStatus. 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. +// 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 (PolicyTypeStatus) Values() []PolicyTypeStatus { return []PolicyTypeStatus{ "ENABLED", @@ -551,8 +572,9 @@ const ( ) // Values returns all known values for TargetType. 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. +// 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 (TargetType) Values() []TargetType { return []TargetType{ "ACCOUNT", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/errors.go index 8098c6c0..6d2601fc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/errors.go @@ -9,9 +9,10 @@ import ( // You don't have permissions to perform the requested operation. The user or role // that is making the request must have at least one IAM permissions policy -// attached that grants the required permissions. For more information, see Access -// Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) in the +// attached that grants the required permissions. For more information, see [Access Management]in the // IAM User Guide. +// +// [Access Management]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html type AccessDeniedException struct { Message *string @@ -123,7 +124,8 @@ func (e *AccountAlreadyRegisteredException) ErrorCode() string { } func (e *AccountAlreadyRegisteredException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// We can't find an Amazon Web Services account with the AccountId that you +// We can't find an Amazon Web Services account with the AccountId that you +// // specified, or the account whose credentials you used to make this request isn't // a member of an organization. type AccountNotFoundException struct { @@ -180,8 +182,9 @@ func (e *AccountNotRegisteredException) ErrorFault() smithy.ErrorFault { return // You can't invite an existing account to your organization until you verify that // you own the email address associated with the management account. For more -// information, see Email address verification (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification) -// in the Organizations User Guide. +// information, see [Email address verification]in the Organizations User Guide. +// +// [Email address verification]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification type AccountOwnerNotVerifiedException struct { Message *string @@ -346,125 +349,164 @@ func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.Fault // example, attempting to remove the last service control policy (SCP) from an OU // or root, inviting or creating too many accounts to the organization, or // attaching too many policies to an account, OU, or root. This exception includes -// a reason that contains additional information about the violated limit: Some of -// the reasons in the following list might not be applicable to this specific API -// or operation. +// a reason that contains additional information about the violated limit: +// +// Some of the reasons in the following list might not be applicable to this +// specific API or operation. +// // - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management // account from the organization. You can't remove the management account. Instead, // after you remove all member accounts, delete the organization itself. +// // - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove an // account from the organization that doesn't yet have enough information to exist // as a standalone account. This account requires you to first complete phone -// verification. Follow the steps at Removing a member account from your -// organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master) -// in the Organizations User Guide. +// verification. Follow the steps at [Removing a member account from your organization]in the Organizations User Guide. +// // - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // accounts that you can create in one day. +// // - ACCOUNT_CREATION_NOT_COMPLETE: Your account setup isn't complete or your // account isn't fully active. You must complete the account setup before you // create an organization. +// // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the -// number of accounts in an organization. If you need more accounts, contact -// Amazon Web Services Support (https://console.aws.amazon.com/support/home#/) to -// request an increase in your limit. Or the number of invitations that you tried -// to send would cause you to exceed the limit of accounts in your organization. -// Send fewer invitations or contact Amazon Web Services Support to request an -// increase in the number of accounts. Deleted and closed accounts still count -// toward your limit. If you get this exception when running a command immediately -// after creating the organization, wait one hour and try again. After an hour, if -// the command continues to fail with this error, contact Amazon Web Services -// Support (https://console.aws.amazon.com/support/home#/) . -// - CANNOT_REGISTER_SUSPENDED_ACCOUNT_AS_DELEGATED_ADMINISTRATOR: You cannot -// register a suspended account as a delegated administrator. -// - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to -// register the management account of the organization as a delegated administrator -// for an Amazon Web Services service integrated with Organizations. You can -// designate only a member account as a delegated administrator. -// - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management -// account. To close the management account for the organization, you must first -// either remove or close all member accounts in the organization. Follow standard -// account closure process using root credentials. -// - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove an -// account that is registered as a delegated administrator for a service integrated -// with your organization. To complete this operation, you must first deregister -// this account as a delegated administrator. -// - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota for the -// past 30 days. -// - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number -// of accounts that you can close at a time. -// - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an -// organization in the specified region, you must enable all features mode. -// - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register -// an Amazon Web Services account as a delegated administrator for an Amazon Web -// Services service that already has a delegated administrator. To complete this -// operation, you must first deregister any existing delegated administrators for -// this service. -// - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only valid -// for a limited period of time. You must resubmit the request and generate a new -// verfication code. -// - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no -// supported payment method is associated with the account. Amazon Web Services -// does not support cards issued by financial institutions in Russia or Belarus. -// For more information, see Managing your Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html) -// . -// - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account in -// this organization, you first must migrate the organization's management account -// to the marketplace that corresponds to the management account's address. For -// example, accounts with India addresses must be associated with the AISPL -// marketplace. All accounts in an organization must be associated with the same -// marketplace. -// - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon Web -// Services /> Regions in China. To create an organization, the master must have a -// valid business license. For more information, contact customer support. -// - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you must -// first provide a valid contact address and phone number for the management -// account. Then try the operation again. -// - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the -// management account must have an associated account in the Amazon Web Services -// GovCloud (US-West) Region. For more information, see Organizations (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) -// in the Amazon Web Services GovCloud User Guide. -// - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization with -// this management account, you first must associate a valid payment instrument, -// such as a credit card, with the account. For more information, see -// Considerations before removing an account from an organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) -// in the Organizations User Guide. -// - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted to -// register more delegated administrators than allowed for the service principal. -// - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the -// number of policies of a certain type that can be attached to an entity at one -// time. -// - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed on -// this resource. -// - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation with -// this member account, you first must associate a valid payment instrument, such -// as a credit card, with the account. For more information, see Considerations -// before removing an account from an organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html) -// in the Organizations User Guide. -// - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a policy -// from an entity that would cause the entity to have fewer than the minimum number -// of policies of a certain type required. -// - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an -// operation that requires the organization to be configured to support all -// features. An organization that supports only consolidated billing features can't -// perform this operation. -// - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is too -// many levels deep. -// - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs that -// you can have in an organization. -// - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that is -// larger than the maximum size. -// - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of -// policies that you can have in an organization. -// - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated -// administrator before you enabled service access. Call the -// EnableAWSServiceAccess API first. -// - TAG_POLICY_VIOLATION: You attempted to create or update a resource with -// tags that are not compliant with the tag policy requirements for this account. -// - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account, there -// is a waiting period before you can remove it from the organization. If you get -// an error that indicates that a wait period is required, try again in a few days. +// number of accounts in an organization. If you need more accounts, contact [Amazon Web Services Support]to +// request an increase in your limit. +// +// Or the number of invitations that you tried to send would cause you to exceed +// +// the limit of accounts in your organization. Send fewer invitations or contact +// Amazon Web Services Support to request an increase in the number of accounts. +// +// Deleted and closed accounts still count toward your limit. +// +// If you get this exception when running a command immediately after creating the +// +// organization, wait one hour and try again. After an hour, if the command +// continues to fail with this error, contact [Amazon Web Services Support]. +// +// - CANNOT_REGISTER_SUSPENDED_ACCOUNT_AS_DELEGATED_ADMINISTRATOR: You cannot +// register a suspended account as a delegated administrator. +// +// - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to +// register the management account of the organization as a delegated administrator +// for an Amazon Web Services service integrated with Organizations. You can +// designate only a member account as a delegated administrator. +// +// - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management +// account. To close the management account for the organization, you must first +// either remove or close all member accounts in the organization. Follow standard +// account closure process using root credentials. +// +// - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove an +// account that is registered as a delegated administrator for a service integrated +// with your organization. To complete this operation, you must first deregister +// this account as a delegated administrator. +// +// - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota for the +// past 30 days. +// +// - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number +// of accounts that you can close at a time. +// +// - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an +// organization in the specified region, you must enable all features mode. +// +// - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register +// an Amazon Web Services account as a delegated administrator for an Amazon Web +// Services service that already has a delegated administrator. To complete this +// operation, you must first deregister any existing delegated administrators for +// this service. +// +// - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only valid +// for a limited period of time. You must resubmit the request and generate a new +// verfication code. +// +// - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of +// handshakes that you can send in one day. +// +// - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no +// supported payment method is associated with the account. Amazon Web Services +// does not support cards issued by financial institutions in Russia or Belarus. +// For more information, see [Managing your Amazon Web Services payments]. +// +// - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account in +// this organization, you first must migrate the organization's management account +// to the marketplace that corresponds to the management account's address. All +// accounts in an organization must be associated with the same marketplace. +// +// - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon Web +// Services Regions in China. To create an organization, the master must have a +// valid business license. For more information, contact customer support. +// +// - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you must +// first provide a valid contact address and phone number for the management +// account. Then try the operation again. +// +// - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the +// management account must have an associated account in the Amazon Web Services +// GovCloud (US-West) Region. For more information, see [Organizations]in the Amazon Web +// Services GovCloud User Guide. +// +// - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization with +// this management account, you first must associate a valid payment instrument, +// such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization]in the +// Organizations User Guide. +// +// - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted to +// register more delegated administrators than allowed for the service principal. +// +// - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the +// number of policies of a certain type that can be attached to an entity at one +// time. +// +// - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed on +// this resource. +// +// - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation with +// this member account, you first must associate a valid payment instrument, such +// as a credit card, with the account. For more information, see [Considerations before removing an account from an organization]in the +// Organizations User Guide. +// +// - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a policy +// from an entity that would cause the entity to have fewer than the minimum number +// of policies of a certain type required. +// +// - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an +// operation that requires the organization to be configured to support all +// features. An organization that supports only consolidated billing features can't +// perform this operation. +// +// - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is too +// many levels deep. +// +// - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs that +// you can have in an organization. +// +// - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that is +// larger than the maximum size. +// +// - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// policies that you can have in an organization. +// +// - SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated +// administrator before you enabled service access. Call the +// EnableAWSServiceAccess API first. +// +// - TAG_POLICY_VIOLATION: You attempted to create or update a resource with +// tags that are not compliant with the tag policy requirements for this account. +// +// - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account, there +// is a waiting period before you can remove it from the organization. If you get +// an error that indicates that a wait period is required, try again in a few days. +// +// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/ +// [Removing a member account from your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master +// +// [Managing your Amazon Web Services payments]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html +// [Organizations]: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html +// [Considerations before removing an account from an organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html type ConstraintViolationException struct { Message *string @@ -719,8 +761,9 @@ func (e *EffectivePolicyNotFoundException) ErrorFault() smithy.ErrorFault { retu // Organizations couldn't perform the operation because your organization hasn't // finished initializing. This can take up to an hour. Try again later. If after -// one hour you continue to receive this error, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/) -// . +// one hour you continue to receive this error, contact [Amazon Web Services Support]. +// +// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/ type FinalizingOrganizationException struct { Message *string @@ -774,37 +817,52 @@ func (e *HandshakeAlreadyInStateException) ErrorCode() string { func (e *HandshakeAlreadyInStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The requested operation would violate the constraint identified in the reason -// code. Some of the reasons in the following list might not be applicable to this +// code. +// +// Some of the reasons in the following list might not be applicable to this // specific API or operation: +// // - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the // number of accounts in an organization. Note that deleted and closed accounts -// still count toward your limit. If you get this exception immediately after -// creating the organization, wait one hour and try again. If after an hour it -// continues to fail with this error, contact Amazon Web Services Support (https://console.aws.amazon.com/support/home#/) -// . -// - ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because the -// invited account is already a member of an organization. -// - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes that you can send in one day. -// - INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations -// to join an organization while it's in the process of enabling all features. You -// can resume inviting accounts after you finalize the process when all accounts -// have agreed to the change. -// - ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid -// because the organization has already enabled all features. -// - ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake -// request is invalid because the organization has already started the process to -// enable all features. -// - ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because -// the account is from a different marketplace than the accounts in the -// organization. For example, accounts with India addresses must be associated with -// the AISPL marketplace. All accounts in an organization must be from the same -// marketplace. -// - ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to change -// the membership of an account too quickly after its previous change. -// - PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an -// account that doesn't have a payment instrument, such as a credit card, -// associated with it. +// still count toward your limit. +// +// If you get this exception immediately after creating the organization, wait one +// +// hour and try again. If after an hour it continues to fail with this error, +// contact [Amazon Web Services Support]. +// +// - ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because the +// invited account is already a member of an organization. +// +// - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of +// handshakes that you can send in one day. +// +// - INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations +// to join an organization while it's in the process of enabling all features. You +// can resume inviting accounts after you finalize the process when all accounts +// have agreed to the change. +// +// - ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid +// because the organization has already enabled all features. +// +// - ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake +// request is invalid because the organization has already started the process to +// enable all features. +// +// - ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because +// the account is from a different marketplace than the accounts in the +// organization. For example, accounts with India addresses must be associated with +// the AISPL marketplace. All accounts in an organization must be from the same +// marketplace. +// +// - ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to change +// the membership of an account too quickly after its previous change. +// +// - PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an +// account that doesn't have a payment instrument, such as a credit card, +// associated with it. +// +// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/ type HandshakeConstraintViolationException struct { Message *string @@ -892,52 +950,78 @@ func (e *InvalidHandshakeTransitionException) ErrorFault() smithy.ErrorFault { // The requested operation failed because you provided invalid values for one or // more of the request parameters. This exception includes a reason that contains -// additional information about the violated limit: Some of the reasons in the -// following list might not be applicable to this specific API or operation. +// additional information about the violated limit: +// +// Some of the reasons in the following list might not be applicable to this +// specific API or operation. +// // - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to the // same entity. +// // - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web // Services and can't be modified. +// // - INPUT_REQUIRED: You must include a value for all required parameters. +// // - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address for // the invited account owner. +// // - INVALID_ENUM: You specified an invalid value. +// // - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string. +// // - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. +// // - INVALID_LIST_MEMBER: You provided a list to a parameter that contains at // least one invalid value. +// // - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter from the // response to a previous call of the operation. +// // - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, // organization, or email) as a party. +// // - INVALID_PATTERN: You provided a value that doesn't match the required // pattern. +// // - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. +// // - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role name // can't begin with the reserved prefix AWSServiceRoleFor . +// // - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource // Name (ARN) for the organization. +// // - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. +// // - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system // tag. You can’t add, edit, or delete system tag keys because they're reserved for // Amazon Web Services use. System tags don’t count against your tags per resource // limit. +// // - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter for // the operation. +// // - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer than // allowed. +// // - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger // value than allowed. +// // - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter than // allowed. +// // - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller // value than allowed. +// // - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only // between entities in the same root. +// // - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that // target entity. +// // - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that // isn't recognized. type InvalidInputException struct { @@ -969,8 +1053,9 @@ func (e *InvalidInputException) ErrorFault() smithy.ErrorFault { return smithy.F // The provided policy document doesn't meet the requirements of the specified // policy type. For example, the syntax might be incorrect. For details about -// service control policy syntax, see SCP syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html) -// in the Organizations User Guide. +// service control policy syntax, see [SCP syntax]in the Organizations User Guide. +// +// [SCP syntax]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html type MalformedPolicyDocumentException struct { Message *string @@ -1270,9 +1355,10 @@ func (e *PolicyTypeAlreadyEnabledException) ErrorFault() smithy.ErrorFault { ret // You can't use the specified policy type with the feature set currently enabled // for this organization. For example, you can enable SCPs only after you enable -// all features in the organization. For more information, see Managing -// Organizations policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) -// in the Organizations User Guide. +// all features in the organization. For more information, see [Managing Organizations policies]in the +// Organizations User Guide. +// +// [Managing Organizations policies]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root type PolicyTypeNotAvailableForOrganizationException struct { Message *string @@ -1302,9 +1388,10 @@ func (e *PolicyTypeNotAvailableForOrganizationException) ErrorFault() smithy.Err // The specified policy type isn't currently enabled in this root. You can't // attach policies of the specified type to entities in a root until you enable -// that type in the root. For more information, see Enabling all features in your -// organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) -// in the Organizations User Guide. +// that type in the root. For more information, see [Enabling all features in your organization]in the Organizations User +// Guide. +// +// [Enabling all features in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html type PolicyTypeNotEnabledException struct { Message *string @@ -1463,9 +1550,12 @@ func (e *TargetNotFoundException) ErrorCode() string { func (e *TargetNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You have sent too many requests in too short a period of time. The quota helps -// protect against denial-of-service attacks. Try again later. For information -// about quotas that affect Organizations, see Quotas for Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) -// in the Organizations User Guide. +// protect against denial-of-service attacks. Try again later. +// +// For information about quotas that affect Organizations, see [Quotas for Organizations] in the +// Organizations User Guide. +// +// [Quotas for Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html type TooManyRequestsException struct { Message *string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/types.go index cab36bb4..d725efd8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/types.go @@ -11,18 +11,27 @@ import ( // an organization. type Account struct { - // The Amazon Resource Name (ARN) of the account. For more information about ARNs - // in Organizations, see ARN Formats Supported by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies) - // in the Amazon Web Services Service Authorization Reference. + // The Amazon Resource Name (ARN) of the account. + // + // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web + // Services Service Authorization Reference. + // + // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies Arn *string - // The email address associated with the Amazon Web Services account. The regex - // pattern (http://wikipedia.org/wiki/regex) for this parameter is a string of - // characters that represents a standard internet email address. + // The email address associated with the Amazon Web Services account. + // + // The [regex pattern] for this parameter is a string of characters that represents a standard + // internet email address. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Email *string - // The unique identifier (ID) of the account. The regex pattern (http://wikipedia.org/wiki/regex) - // for an account ID string requires exactly 12 digits. + // The unique identifier (ID) of the account. + // + // The [regex pattern] for an account ID string requires exactly 12 digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Id *string // The method by which the account joined the organization. @@ -31,9 +40,12 @@ type Account struct { // The date the account became a part of the organization. JoinedTimestamp *time.Time - // The friendly name of the account. The regex pattern (http://wikipedia.org/wiki/regex) - // that is used to validate this parameter is a string of any of the characters in - // the ASCII character range. + // The friendly name of the account. + // + // The [regex pattern] that is used to validate this parameter is a string of any of the + // characters in the ASCII character range. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Name *string // The status of the account in the organization. @@ -45,13 +57,18 @@ type Account struct { // Contains a list of child entities, either OUs or accounts. type Child struct { - // The unique identifier (ID) of this child entity. The regex pattern (http://wikipedia.org/wiki/regex) - // for a child ID string requires one of the following: + // The unique identifier (ID) of this child entity. + // + // The [regex pattern] for a child ID string requires one of the following: + // // - Account - A string that consists of exactly 12 digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). // This string is followed by a second "-" dash and from 8 to 32 additional // lowercase letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Id *string // The type of this child entity. @@ -60,14 +77,16 @@ type Child struct { noSmithyDocumentSerde } -// Contains the status about a CreateAccount or CreateGovCloudAccount request to -// create an Amazon Web Services account or an Amazon Web Services GovCloud (US) -// account in an organization. +// Contains the status about a CreateAccount or CreateGovCloudAccount request to create an Amazon Web Services +// account or an Amazon Web Services GovCloud (US) account in an organization. type CreateAccountStatus struct { // If the account was created successfully, the unique identifier (ID) of the new - // account. The regex pattern (http://wikipedia.org/wiki/regex) for an account ID - // string requires exactly 12 digits. + // account. + // + // The [regex pattern] for an account ID string requires exactly 12 digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex AccountId *string // The account name given to the account when it was created. @@ -77,41 +96,55 @@ type CreateAccountStatus struct { CompletedTimestamp *time.Time // If the request failed, a description of the reason for the failure. + // // - ACCOUNT_LIMIT_EXCEEDED: The account couldn't be created because you reached // the limit on the number of accounts in your organization. + // // - CONCURRENT_ACCOUNT_MODIFICATION: You already submitted a request with the // same information. + // // - EMAIL_ALREADY_EXISTS: The account could not be created because another // Amazon Web Services account with that email address already exists. + // // - FAILED_BUSINESS_VALIDATION: The Amazon Web Services account that owns your // organization failed to receive business license validation. + // // - GOVCLOUD_ACCOUNT_ALREADY_EXISTS: The account in the Amazon Web Services // GovCloud (US) Region could not be created because this Region already includes // an account with that email address. + // // - IDENTITY_INVALID_BUSINESS_VALIDATION: The Amazon Web Services account that // owns your organization can't complete business license validation because it // doesn't have valid identity data. + // // - INVALID_ADDRESS: The account could not be created because the address you // provided is not valid. + // // - INVALID_EMAIL: The account could not be created because the email address // you provided is not valid. + // // - INVALID_PAYMENT_INSTRUMENT: The Amazon Web Services account that owns your // organization does not have a supported payment method associated with the // account. Amazon Web Services does not support cards issued by financial - // institutions in Russia or Belarus. For more information, see Managing your - // Amazon Web Services payments (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html) - // . + // institutions in Russia or Belarus. For more information, see [Managing your Amazon Web Services payments]. + // // - INTERNAL_FAILURE: The account could not be created because of an internal // failure. Try again later. If the problem persists, contact Amazon Web Services // Customer Support. + // // - MISSING_BUSINESS_VALIDATION: The Amazon Web Services account that owns your // organization has not received Business Validation. + // // - MISSING_PAYMENT_INSTRUMENT: You must configure the management account with // a valid payment method, such as a credit card. + // // - PENDING_BUSINESS_VALIDATION: The Amazon Web Services account that owns your // organization is still in the process of completing business license validation. + // // - UNKNOWN_BUSINESS_VALIDATION: The Amazon Web Services account that owns your // organization has an unknown issue with business license validation. + // + // [Managing your Amazon Web Services payments]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html FailureReason CreateAccountFailureReason // If the account was created successfully, the unique identifier (ID) of the new @@ -119,10 +152,12 @@ type CreateAccountStatus struct { GovCloudAccountId *string // The unique identifier (ID) that references this request. You get this value - // from the response of the initial CreateAccount request to create the account. - // The regex pattern (http://wikipedia.org/wiki/regex) for a create account - // request ID string requires "car-" followed by from 8 to 32 lowercase letters or - // digits. + // from the response of the initial CreateAccountrequest to create the account. + // + // The [regex pattern] for a create account request ID string requires "car-" followed by from 8 + // to 32 lowercase letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Id *string // The date and time that the request was made for the account creation. @@ -221,30 +256,37 @@ type EnabledServicePrincipal struct { // relationship between two accounts (an originator and a recipient). For example, // when a management account (the originator) invites another account (the // recipient) to join its organization, the two accounts exchange information as a -// series of handshake requests and responses. Note: Handshakes that are CANCELED , -// ACCEPTED , DECLINED , or EXPIRED show up in lists for only 30 days after -// entering that state After that they are deleted. +// series of handshake requests and responses. +// +// Note: Handshakes that are CANCELED , ACCEPTED , DECLINED , or EXPIRED show up +// in lists for only 30 days after entering that state After that they are deleted. type Handshake struct { // The type of handshake, indicating what action occurs when the recipient accepts // the handshake. The following handshake types are supported: + // // - INVITE: This type of handshake represents a request to join an // organization. It is always sent from the management account to only non-member // accounts. + // // - ENABLE_ALL_FEATURES: This type of handshake represents a request to enable // all features in an organization. It is always sent from the management account // to only invited member accounts. Created accounts do not receive this because // those accounts were created by the organization's management account and // approval is inferred. + // // - APPROVE_ALL_FEATURES: This type of handshake is sent from the Organizations // service when all member accounts have approved the ENABLE_ALL_FEATURES // invitation. It is sent only to the management account and signals the master // that it can finalize the process to enable all features. Action ActionType - // The Amazon Resource Name (ARN) of a handshake. For more information about ARNs - // in Organizations, see ARN Formats Supported by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies) - // in the Amazon Web Services Service Authorization Reference. + // The Amazon Resource Name (ARN) of a handshake. + // + // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web + // Services Service Authorization Reference. + // + // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies Arn *string // The date and time that the handshake expires. If the recipient of the handshake @@ -253,9 +295,12 @@ type Handshake struct { ExpirationTimestamp *time.Time // The unique identifier (ID) of a handshake. The originating account creates the - // ID when it initiates the handshake. The regex pattern (http://wikipedia.org/wiki/regex) - // for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters - // or digits. + // ID when it initiates the handshake. + // + // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Id *string // Information about the two accounts that are participating in the handshake. @@ -270,18 +315,24 @@ type Handshake struct { // The current state of the handshake. Use the state to trace the flow of the // handshake through the process from its creation to its acceptance. The meaning // of each of the valid values is as follows: + // // - REQUESTED: This handshake was sent to multiple recipients (applicable to // only some handshake types) and not all recipients have responded yet. The // request stays in this state until all recipients respond. + // // - OPEN: This handshake was sent to multiple recipients (applicable to only // some policy types) and all recipients have responded, allowing the originator to // complete the handshake action. + // // - CANCELED: This handshake is no longer active because it was canceled by the // originating account. + // // - ACCEPTED: This handshake is complete because it has been accepted by the // recipient. + // // - DECLINED: This handshake is no longer active because it was declined by the // recipient account. + // // - EXPIRED: This handshake is no longer active because the originator did not // receive a response of any kind from the recipient before the expiration time (15 // days). @@ -293,14 +344,20 @@ type Handshake struct { // Specifies the criteria that are used to select the handshakes for the operation. type HandshakeFilter struct { - // Specifies the type of handshake action. If you specify ActionType , you cannot - // also specify ParentHandshakeId . + // Specifies the type of handshake action. + // + // If you specify ActionType , you cannot also specify ParentHandshakeId . ActionType ActionType // Specifies the parent handshake. Only used for handshake types that are a child - // of another type. If you specify ParentHandshakeId , you cannot also specify - // ActionType . The regex pattern (http://wikipedia.org/wiki/regex) for handshake - // ID string requires "h-" followed by from 8 to 32 lowercase letters or digits. + // of another type. + // + // If you specify ParentHandshakeId , you cannot also specify ActionType . + // + // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex ParentHandshakeId *string noSmithyDocumentSerde @@ -309,9 +366,12 @@ type HandshakeFilter struct { // Identifies a participant in a handshake. type HandshakeParty struct { - // The unique identifier (ID) for the party. The regex pattern (http://wikipedia.org/wiki/regex) - // for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters - // or digits. + // The unique identifier (ID) for the party. + // + // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. Id *string @@ -332,14 +392,20 @@ type HandshakeResource struct { // The type of information being passed, specifying how the value is to be // interpreted by the other party: + // // - ACCOUNT - Specifies an Amazon Web Services account ID number. + // // - ORGANIZATION - Specifies an organization ID number. + // // - EMAIL - Specifies the email address that is associated with the account that // receives the handshake. + // // - OWNER_EMAIL - Specifies the email address associated with the management // account. Included as information about an organization. + // // - OWNER_NAME - Specifies the name associated with the management account. // Included as information about an organization. + // // - NOTES - Additional text provided by the handshake initiator and intended for // the recipient to read. Type HandshakeResourceType @@ -357,43 +423,56 @@ type HandshakeResource struct { // policies . type Organization struct { - // The Amazon Resource Name (ARN) of an organization. For more information about - // ARNs in Organizations, see ARN Formats Supported by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies) - // in the Amazon Web Services Service Authorization Reference. + // The Amazon Resource Name (ARN) of an organization. + // + // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web + // Services Service Authorization Reference. + // + // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies Arn *string // Do not use. This field is deprecated and doesn't provide complete information - // about the policies in your organization. To determine the policies that are - // enabled and available for use in your organization, use the ListRoots operation - // instead. + // about the policies in your organization. + // + // To determine the policies that are enabled and available for use in your + // organization, use the ListRootsoperation instead. AvailablePolicyTypes []PolicyTypeSummary // Specifies the functionality that currently is available to the organization. If // set to "ALL", then all features are enabled and policies can be applied to // accounts in the organization. If set to "CONSOLIDATED_BILLING", then only - // consolidated billing functionality is available. For more information, see - // Enabling all features in your organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) - // in the Organizations User Guide. + // consolidated billing functionality is available. For more information, see [Enabling all features in your organization]in + // the Organizations User Guide. + // + // [Enabling all features in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html FeatureSet OrganizationFeatureSet - // The unique identifier (ID) of an organization. The regex pattern (http://wikipedia.org/wiki/regex) - // for an organization ID string requires "o-" followed by from 10 to 32 lowercase - // letters or digits. + // The unique identifier (ID) of an organization. + // + // The [regex pattern] for an organization ID string requires "o-" followed by from 10 to 32 + // lowercase letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Id *string // The Amazon Resource Name (ARN) of the account that is designated as the - // management account for the organization. For more information about ARNs in - // Organizations, see ARN Formats Supported by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies) - // in the Amazon Web Services Service Authorization Reference. + // management account for the organization. + // + // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web + // Services Service Authorization Reference. + // + // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies MasterAccountArn *string // The email address that is associated with the Amazon Web Services account that // is designated as the management account for the organization. MasterAccountEmail *string - // The unique identifier (ID) of the management account of an organization. The - // regex pattern (http://wikipedia.org/wiki/regex) for an account ID string - // requires exactly 12 digits. + // The unique identifier (ID) of the management account of an organization. + // + // The [regex pattern] for an account ID string requires exactly 12 digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex MasterAccountId *string noSmithyDocumentSerde @@ -405,21 +484,31 @@ type Organization struct { // OUs. type OrganizationalUnit struct { - // The Amazon Resource Name (ARN) of this OU. For more information about ARNs in - // Organizations, see ARN Formats Supported by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies) - // in the Amazon Web Services Service Authorization Reference. + // The Amazon Resource Name (ARN) of this OU. + // + // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web + // Services Service Authorization Reference. + // + // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies Arn *string - // The unique identifier (ID) associated with this OU. The regex pattern (http://wikipedia.org/wiki/regex) - // for an organizational unit ID string requires "ou-" followed by from 4 to 32 - // lowercase letters or digits (the ID of the root that contains the OU). This + // The unique identifier (ID) associated with this OU. The ID is unique to the + // organization only. + // + // The [regex pattern] for an organizational unit ID string requires "ou-" followed by from 4 to + // 32 lowercase letters or digits (the ID of the root that contains the OU). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Id *string - // The friendly name of this OU. The regex pattern (http://wikipedia.org/wiki/regex) - // that is used to validate this parameter is a string of any of the characters in - // the ASCII character range. + // The friendly name of this OU. + // + // The [regex pattern] that is used to validate this parameter is a string of any of the + // characters in the ASCII character range. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Name *string noSmithyDocumentSerde @@ -429,14 +518,19 @@ type OrganizationalUnit struct { // can contain OUs or accounts in an organization. type Parent struct { - // The unique identifier (ID) of the parent entity. The regex pattern (http://wikipedia.org/wiki/regex) - // for a parent ID string requires one of the following: + // The unique identifier (ID) of the parent entity. + // + // The [regex pattern] for a parent ID string requires one of the following: + // // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase // letters or digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Id *string // The type of the parent entity. @@ -460,12 +554,15 @@ type Policy struct { } // Contains information about a policy, but does not include the content. To see -// the content of a policy, see DescribePolicy . +// the content of a policy, see DescribePolicy. type PolicySummary struct { - // The Amazon Resource Name (ARN) of the policy. For more information about ARNs - // in Organizations, see ARN Formats Supported by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies) - // in the Amazon Web Services Service Authorization Reference. + // The Amazon Resource Name (ARN) of the policy. + // + // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web + // Services Service Authorization Reference. + // + // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies Arn *string // A boolean value that indicates whether the specified policy is an Amazon Web @@ -476,14 +573,20 @@ type PolicySummary struct { // The description of the policy. Description *string - // The unique identifier (ID) of the policy. The regex pattern (http://wikipedia.org/wiki/regex) - // for a policy ID string requires "p-" followed by from 8 to 128 lowercase or - // uppercase letters, digits, or the underscore character (_). + // The unique identifier (ID) of the policy. + // + // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase + // or uppercase letters, digits, or the underscore character (_). + // + // [regex pattern]: http://wikipedia.org/wiki/regex Id *string - // The friendly name of the policy. The regex pattern (http://wikipedia.org/wiki/regex) - // that is used to validate this parameter is a string of any of the characters in - // the ASCII character range. + // The friendly name of the policy. + // + // The [regex pattern] that is used to validate this parameter is a string of any of the + // characters in the ASCII character range. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Name *string // The type of policy. @@ -495,25 +598,37 @@ type PolicySummary struct { // Contains information about a root, OU, or account that a policy is attached to. type PolicyTargetSummary struct { - // The Amazon Resource Name (ARN) of the policy target. For more information about - // ARNs in Organizations, see ARN Formats Supported by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies) - // in the Amazon Web Services Service Authorization Reference. + // The Amazon Resource Name (ARN) of the policy target. + // + // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web + // Services Service Authorization Reference. + // + // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies Arn *string - // The friendly name of the policy target. The regex pattern (http://wikipedia.org/wiki/regex) - // that is used to validate this parameter is a string of any of the characters in - // the ASCII character range. + // The friendly name of the policy target. + // + // The [regex pattern] that is used to validate this parameter is a string of any of the + // characters in the ASCII character range. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Name *string - // The unique identifier (ID) of the policy target. The regex pattern (http://wikipedia.org/wiki/regex) - // for a target ID string requires one of the following: + // The unique identifier (ID) of the policy target. + // + // The [regex pattern] for a target ID string requires one of the following: + // // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase // letters or digits. + // // - Account - A string that consists of exactly 12 digits. + // // - Organizational unit (OU) - A string that begins with "ou-" followed by from // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This // string is followed by a second "-" dash and from 8 to 32 additional lowercase // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex TargetId *string // The type of the policy target. @@ -566,37 +681,52 @@ type ResourcePolicySummary struct { // organization. type Root struct { - // The Amazon Resource Name (ARN) of the root. For more information about ARNs in - // Organizations, see ARN Formats Supported by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies) - // in the Amazon Web Services Service Authorization Reference. + // The Amazon Resource Name (ARN) of the root. + // + // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web + // Services Service Authorization Reference. + // + // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies Arn *string - // The unique identifier (ID) for the root. The regex pattern (http://wikipedia.org/wiki/regex) - // for a root ID string requires "r-" followed by from 4 to 32 lowercase letters or - // digits. + // The unique identifier (ID) for the root. The ID is unique to the organization + // only. + // + // The [regex pattern] for a root ID string requires "r-" followed by from 4 to 32 lowercase + // letters or digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Id *string - // The friendly name of the root. The regex pattern (http://wikipedia.org/wiki/regex) - // that is used to validate this parameter is a string of any of the characters in - // the ASCII character range. + // The friendly name of the root. + // + // The [regex pattern] that is used to validate this parameter is a string of any of the + // characters in the ASCII character range. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Name *string // The types of policies that are currently enabled for the root and therefore can - // be attached to the root or to its OUs or accounts. Even if a policy type is - // shown as available in the organization, you can separately enable and disable - // them at the root level by using EnablePolicyType and DisablePolicyType . Use - // DescribeOrganization to see the availability of the policy types in that - // organization. + // be attached to the root or to its OUs or accounts. + // + // Even if a policy type is shown as available in the organization, you can + // separately enable and disable them at the root level by using EnablePolicyTypeand DisablePolicyType. Use DescribeOrganization to see + // the availability of the policy types in that organization. PolicyTypes []PolicyTypeSummary noSmithyDocumentSerde } // A custom key-value pair associated with a resource within your organization. +// // You can attach tags to any of the following organization resources. +// // - Amazon Web Services account +// // - Organizational unit (OU) +// // - Organization root +// // - Policy type Tag struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md index 4a3e25ac..c9ade7bc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md @@ -1,3 +1,66 @@ +# v1.22.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.4 (2024-07-18) + +* No change notes available for this release. + +# v1.22.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.21.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.12 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.11 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.10 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.9 (2024-05-23) + +* No change notes available for this release. + +# v1.20.8 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.7 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.6 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + # v1.20.5 (2024-04-05) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go index fff45773..a06c6e73 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go @@ -14,13 +14,16 @@ import ( 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" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" 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" + "sync/atomic" "time" ) @@ -30,6 +33,9 @@ const ServiceAPIVersion = "2019-06-10" // Client provides the API client to make operations call for AWS Single Sign-On. type Client struct { options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 } // New returns an initialized Client based on the functional options. Provide @@ -68,6 +74,8 @@ func New(options Options, optFns ...func(*Options)) *Client { options: options, } + initializeTimeOffsetResolver(client) + return client } @@ -229,15 +237,16 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AccountIDEndpointMode: cfg.AccountIDEndpointMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -441,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -484,6 +517,63 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { + switch mode { + case aws.AccountIDEndpointModeUnset: + case aws.AccountIDEndpointModePreferred: + case aws.AccountIDEndpointModeDisabled: + case aws.AccountIDEndpointModeRequired: + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { + return fmt.Errorf("accountID is required but not set") + } else if ca.Credentials.AccountID == "" { + return fmt.Errorf("accountID is required but not set") + } + // default check in case invalid mode is configured through request config + default: + return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) + } + + return nil +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go index 4b21e8b0..5ce00b49 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go @@ -30,9 +30,10 @@ func (c *Client) GetRoleCredentials(ctx context.Context, params *GetRoleCredenti type GetRoleCredentialsInput struct { - // The token issued by the CreateToken API call. For more information, see - // CreateToken (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) - // in the IAM Identity Center OIDC API Reference Guide. + // The token issued by the CreateToken API call. For more information, see [CreateToken] in the + // IAM Identity Center OIDC API Reference Guide. + // + // [CreateToken]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html // // This member is required. AccessToken *string @@ -113,6 +114,12 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRoleCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go index e44da697..f20e3acb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go @@ -29,9 +29,10 @@ func (c *Client) ListAccountRoles(ctx context.Context, params *ListAccountRolesI type ListAccountRolesInput struct { - // The token issued by the CreateToken API call. For more information, see - // CreateToken (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) - // in the IAM Identity Center OIDC API Reference Guide. + // The token issued by the CreateToken API call. For more information, see [CreateToken] in the + // IAM Identity Center OIDC API Reference Guide. + // + // [CreateToken]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html // // This member is required. AccessToken *string @@ -118,6 +119,12 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountRolesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +149,6 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack return nil } -// ListAccountRolesAPIClient is a client that implements the ListAccountRoles -// operation. -type ListAccountRolesAPIClient interface { - ListAccountRoles(context.Context, *ListAccountRolesInput, ...func(*Options)) (*ListAccountRolesOutput, error) -} - -var _ ListAccountRolesAPIClient = (*Client)(nil) - // ListAccountRolesPaginatorOptions is the paginator options for ListAccountRoles type ListAccountRolesPaginatorOptions struct { // The number of items that clients can request per page. @@ -213,6 +212,9 @@ func (p *ListAccountRolesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountRoles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +234,14 @@ func (p *ListAccountRolesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListAccountRolesAPIClient is a client that implements the ListAccountRoles +// operation. +type ListAccountRolesAPIClient interface { + ListAccountRoles(context.Context, *ListAccountRolesInput, ...func(*Options)) (*ListAccountRolesOutput, error) +} + +var _ ListAccountRolesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountRoles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go index 2d7add06..391b567d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go @@ -12,9 +12,10 @@ import ( ) // Lists all AWS accounts assigned to the user. These AWS accounts are assigned by -// the administrator of the account. For more information, see Assign User Access (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers) -// in the IAM Identity Center User Guide. This operation returns a paginated -// response. +// the administrator of the account. For more information, see [Assign User Access]in the IAM Identity +// Center User Guide. This operation returns a paginated response. +// +// [Assign User Access]: https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers func (c *Client) ListAccounts(ctx context.Context, params *ListAccountsInput, optFns ...func(*Options)) (*ListAccountsOutput, error) { if params == nil { params = &ListAccountsInput{} @@ -32,9 +33,10 @@ func (c *Client) ListAccounts(ctx context.Context, params *ListAccountsInput, op type ListAccountsInput struct { - // The token issued by the CreateToken API call. For more information, see - // CreateToken (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) - // in the IAM Identity Center OIDC API Reference Guide. + // The token issued by the CreateToken API call. For more information, see [CreateToken] in the + // IAM Identity Center OIDC API Reference Guide. + // + // [CreateToken]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html // // This member is required. AccessToken *string @@ -116,6 +118,12 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountsValidationMiddleware(stack); err != nil { return err } @@ -140,13 +148,6 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op return nil } -// ListAccountsAPIClient is a client that implements the ListAccounts operation. -type ListAccountsAPIClient interface { - ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) -} - -var _ ListAccountsAPIClient = (*Client)(nil) - // ListAccountsPaginatorOptions is the paginator options for ListAccounts type ListAccountsPaginatorOptions struct { // This is the number of items clients can request per page. @@ -210,6 +211,9 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +233,13 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListAccountsAPIClient is a client that implements the ListAccounts operation. +type ListAccountsAPIClient interface { + ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) +} + +var _ ListAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go index 3ee682d1..456e4a37 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go @@ -12,16 +12,20 @@ import ( // Removes the locally stored SSO tokens from the client-side cache and sends an // API call to the IAM Identity Center service to invalidate the corresponding -// server-side IAM Identity Center sign in session. If a user uses IAM Identity -// Center to access the AWS CLI, the user’s IAM Identity Center sign in session is -// used to obtain an IAM session, as specified in the corresponding IAM Identity -// Center permission set. More specifically, IAM Identity Center assumes an IAM -// role in the target account on behalf of the user, and the corresponding -// temporary AWS credentials are returned to the client. After user logout, any -// existing IAM role sessions that were created by using IAM Identity Center -// permission sets continue based on the duration configured in the permission set. -// For more information, see User authentications (https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html) -// in the IAM Identity Center User Guide. +// server-side IAM Identity Center sign in session. +// +// If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM +// Identity Center sign in session is used to obtain an IAM session, as specified +// in the corresponding IAM Identity Center permission set. More specifically, IAM +// Identity Center assumes an IAM role in the target account on behalf of the user, +// and the corresponding temporary AWS credentials are returned to the client. +// +// After user logout, any existing IAM role sessions that were created by using +// IAM Identity Center permission sets continue based on the duration configured in +// the permission set. For more information, see [User authentications]in the IAM Identity Center User +// Guide. +// +// [User authentications]: https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html func (c *Client) Logout(ctx context.Context, params *LogoutInput, optFns ...func(*Options)) (*LogoutOutput, error) { if params == nil { params = &LogoutInput{} @@ -39,9 +43,10 @@ func (c *Client) Logout(ctx context.Context, params *LogoutInput, optFns ...func type LogoutInput struct { - // The token issued by the CreateToken API call. For more information, see - // CreateToken (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) - // in the IAM Identity Center OIDC API Reference Guide. + // The token issued by the CreateToken API call. For more information, see [CreateToken] in the + // IAM Identity Center OIDC API Reference Guide. + // + // [CreateToken]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html // // This member is required. AccessToken *string @@ -108,6 +113,12 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpLogoutValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go index 3b28e825..a93a77cd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { params.Region = options.Region } @@ -90,12 +90,12 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(params, input, options) + bindAuthParamsRegion(ctx, params, input, options) return params } @@ -169,7 +169,7 @@ func (*resolveAuthSchemeMiddleware) ID() string { 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) + params := bindAuthResolverParams(ctx, 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) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go index 8bba205f..d6297fa6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go @@ -13,12 +13,22 @@ import ( 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" "strings" + "time" ) +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + type awsRestjson1_deserializeOpGetRoleCredentials struct { } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go index 59456d5d..7f6e429f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go @@ -6,16 +6,22 @@ // AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web // service that makes it easy for you to assign user access to IAM Identity Center // resources such as the AWS access portal. Users can get AWS account applications -// and roles assigned to them and get federated into the application. Although AWS -// Single Sign-On was renamed, the sso and identitystore API namespaces will -// continue to retain their original name for backward compatibility purposes. For -// more information, see IAM Identity Center rename (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed) -// . This reference guide describes the IAM Identity Center Portal operations that +// and roles assigned to them and get federated into the application. +// +// Although AWS Single Sign-On was renamed, the sso and identitystore API +// namespaces will continue to retain their original name for backward +// compatibility purposes. For more information, see [IAM Identity Center rename]. +// +// This reference guide describes the IAM Identity Center Portal operations that // you can call programatically and includes detailed information on data types and -// errors. AWS provides SDKs that consist of libraries and sample code for various +// errors. +// +// AWS provides SDKs that consist of libraries and sample code for various // programming languages and platforms, such as Java, Ruby, .Net, iOS, or Android. // The SDKs provide a convenient way to create programmatic access to IAM Identity // Center and other AWS services. For more information about the AWS SDKs, -// including how to download and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/) -// . +// including how to download and install them, see [Tools for Amazon Web Services]. +// +// [Tools for Amazon Web Services]: http://aws.amazon.com/tools/ +// [IAM Identity Center rename]: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed package sso diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go index 76521eec..75ae283e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, @@ -465,7 +476,7 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} params.Region = bindRegion(options.Region) @@ -495,6 +506,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return next.HandleFinalize(ctx, in) } + if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { + return out, metadata, fmt.Errorf("invalid accountID set: %w", err) + } + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -504,7 +519,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(getOperationInput(ctx), m.options) + params := bindEndpointParams(ctx, 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) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go index 44379817..6f4bbae7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go @@ -3,4 +3,4 @@ package sso // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.20.5" +const goModuleVersion = "1.22.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go index 2c3a77ce..d522129e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go @@ -235,6 +235,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "ca-central-1", }, }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{ + Hostname: "portal.sso.ca-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-west-1", + }, + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go index 5dee7e53..0ba182e9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go @@ -24,6 +24,9 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error + // Indicates how aws account ID is applied in endpoint2.0 routing + AccountIDEndpointMode aws.AccountIDEndpointMode + // The optional application specific identifier appended to the User-Agent header. AppID string @@ -50,8 +53,10 @@ type Options struct { // 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. + // 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 @@ -70,17 +75,20 @@ type Options struct { // 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. + // 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. + // 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 @@ -97,8 +105,9 @@ type Options struct { // 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. + // 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 @@ -143,6 +152,7 @@ func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { // 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) { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go index 8dc02296..07ac468e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go @@ -25,22 +25,24 @@ type AccountInfo struct { type RoleCredentials struct { // The identifier used for the temporary security credentials. For more - // information, see Using Temporary Security Credentials to Request Access to AWS - // Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) - // in the AWS IAM User Guide. + // information, see [Using Temporary Security Credentials to Request Access to AWS Resources]in the AWS IAM User Guide. + // + // [Using Temporary Security Credentials to Request Access to AWS Resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html AccessKeyId *string // The date on which temporary security credentials expire. Expiration int64 - // The key that is used to sign the request. For more information, see Using - // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) - // in the AWS IAM User Guide. + // The key that is used to sign the request. For more information, see [Using Temporary Security Credentials to Request Access to AWS Resources] in the AWS + // IAM User Guide. + // + // [Using Temporary Security Credentials to Request Access to AWS Resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html SecretAccessKey *string - // The token used for temporary credentials. For more information, see Using - // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) - // in the AWS IAM User Guide. + // The token used for temporary credentials. For more information, see [Using Temporary Security Credentials to Request Access to AWS Resources] in the AWS + // IAM User Guide. + // + // [Using Temporary Security Credentials to Request Access to AWS Resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html SessionToken *string noSmithyDocumentSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/CHANGELOG.md index 6b36f684..6d0bc13b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/CHANGELOG.md @@ -1,3 +1,152 @@ +# v1.27.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.4 (2024-07-29) + +* No change notes available for this release. + +# v1.27.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.26.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.12 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.11 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.10 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.9 (2024-05-23) + +* No change notes available for this release. + +# v1.25.8 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.7 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.6 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + +# v1.25.5 (2024-04-05) + +* No change notes available for this release. + +# v1.25.4 (2024-03-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.3 (2024-03-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.2 (2024-03-07) + +* **Bug Fix**: Remove dependency on go-cmp. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.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.25.0 (2024-02-22) + +* **Feature**: Add middleware stack snapshot tests. + +# v1.24.3 (2024-02-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.2 (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.24.1 (2024-02-15) + +* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field. + +# v1.24.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.23.7 (2024-01-19) + +* No change notes available for this release. + +# v1.23.6 (2024-01-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.5 (2023-12-08) + +* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. + +# v1.23.4 (2023-12-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.3 (2023-12-06) + +* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. + +# v1.23.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.23.1 (2023-11-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.0 (2023-11-29) + +* **Feature**: Expose Options() accessor on service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.3 (2023-11-28.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.2 (2023-11-28) + +* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. + # v1.22.1 (2023-11-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_client.go index d5124e87..5ef0a62b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_client.go @@ -15,7 +15,9 @@ import ( 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" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" @@ -23,6 +25,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" + "sync/atomic" "time" ) @@ -33,6 +36,9 @@ const ServiceAPIVersion = "2020-07-20" // Admin. type Client struct { options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 } // New returns an initialized Client based on the functional options. Provide @@ -61,17 +67,32 @@ func New(options Options, optFns ...func(*Options)) *Client { fn(&options) } + finalizeRetryMaxAttempts(&options) + ignoreAnonymousAuth(&options) + wrapWithAnonymousAuth(&options) + resolveAuthSchemes(&options) client := &Client{ options: options, } + initializeTimeOffsetResolver(client) + 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) @@ -81,7 +102,7 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf fn(&options) } - finalizeRetryMaxAttemptOptions(&options, *c) + finalizeOperationRetryMaxAttempts(&options, *c) finalizeClientEndpointResolverOptions(&options) @@ -135,7 +156,7 @@ func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in mi 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: %v", err) + 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) @@ -144,7 +165,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o return fmt.Errorf("add ResolveEndpointV2: %v", err) } if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %v", err) + return fmt.Errorf("add Signing: %w", err) } return nil } @@ -221,15 +242,16 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AccountIDEndpointMode: cfg.AccountIDEndpointMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -329,7 +351,15 @@ func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { o.RetryMaxAttempts = cfg.RetryMaxAttempts } -func finalizeRetryMaxAttemptOptions(o *Options, client Client) { +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 } @@ -345,17 +375,37 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { } func addClientUserAgent(stack *middleware.Stack, options Options) error { - if err := awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ssoadmin", goModuleVersion)(stack); err != nil { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { return err } + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ssoadmin", goModuleVersion) if len(options.AppID) > 0 { - return awsmiddleware.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)(stack) + 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 } @@ -374,6 +424,61 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } +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 addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -381,12 +486,17 @@ func resolveIdempotencyTokenProvider(o *Options) { o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) } -func addRetryMiddlewares(stack *middleware.Stack, o Options) error { - mo := retry.AddRetryMiddlewaresOptions{ - Retryer: o.Retryer, - LogRetryAttempts: o.ClientLogMode.IsRetries(), +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 } - return retry.AddRetryMiddlewares(stack, mo) + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil } // resolves dual-stack endpoint configuration @@ -419,17 +529,80 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { + switch mode { + case aws.AccountIDEndpointModeUnset: + case aws.AccountIDEndpointModePreferred: + case aws.AccountIDEndpointModeDisabled: + case aws.AccountIDEndpointModeRequired: + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { + return fmt.Errorf("accountID is required but not set") + } else if ca.Credentials.AccountID == "" { + return fmt.Errorf("accountID is required but not set") + } + // default check in case invalid mode is configured through request config + default: + return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) + } + + return nil +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) } +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + } func addResponseErrorMiddleware(stack *middleware.Stack) error { - return awshttp.AddResponseErrorMiddleware(stack) + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_AttachCustomerManagedPolicyReferenceToPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_AttachCustomerManagedPolicyReferenceToPermissionSet.go index 3a11f0d3..55f6b2ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_AttachCustomerManagedPolicyReferenceToPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_AttachCustomerManagedPolicyReferenceToPermissionSet.go @@ -6,13 +6,12 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Attaches the specified customer managed policy to the specified PermissionSet . +// Attaches the specified customer managed policy to the specified PermissionSet. func (c *Client) AttachCustomerManagedPolicyReferenceToPermissionSet(ctx context.Context, params *AttachCustomerManagedPolicyReferenceToPermissionSetInput, optFns ...func(*Options)) (*AttachCustomerManagedPolicyReferenceToPermissionSetOutput, error) { if params == nil { params = &AttachCustomerManagedPolicyReferenceToPermissionSetInput{} @@ -80,25 +79,25 @@ func (c *Client) addOperationAttachCustomerManagedPolicyReferenceToPermissionSet if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +112,19 @@ func (c *Client) addOperationAttachCustomerManagedPolicyReferenceToPermissionSet if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachCustomerManagedPolicyReferenceToPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachCustomerManagedPolicyReferenceToPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_AttachManagedPolicyToPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_AttachManagedPolicyToPermissionSet.go index 3ab5f169..f2c64857 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_AttachManagedPolicyToPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_AttachManagedPolicyToPermissionSet.go @@ -6,16 +6,15 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Attaches an Amazon Web Services managed policy ARN to a permission set. If the -// permission set is already referenced by one or more account assignments, you -// will need to call ProvisionPermissionSet after this operation. Calling -// ProvisionPermissionSet applies the corresponding IAM policy updates to all -// assigned accounts. +// Attaches an Amazon Web Services managed policy ARN to a permission set. +// +// If the permission set is already referenced by one or more account assignments, +// you will need to call ProvisionPermissionSetafter this operation. Calling ProvisionPermissionSet +// applies the corresponding IAM policy updates to all assigned accounts. func (c *Client) AttachManagedPolicyToPermissionSet(ctx context.Context, params *AttachManagedPolicyToPermissionSetInput, optFns ...func(*Options)) (*AttachManagedPolicyToPermissionSetOutput, error) { if params == nil { params = &AttachManagedPolicyToPermissionSetInput{} @@ -34,9 +33,8 @@ func (c *Client) AttachManagedPolicyToPermissionSet(ctx context.Context, params type AttachManagedPolicyToPermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -83,25 +81,25 @@ func (c *Client) addOperationAttachManagedPolicyToPermissionSetMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -116,13 +114,19 @@ func (c *Client) addOperationAttachManagedPolicyToPermissionSetMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachManagedPolicyToPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachManagedPolicyToPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateAccountAssignment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateAccountAssignment.go index 0baca208..c4e2e04d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateAccountAssignment.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateAccountAssignment.go @@ -6,23 +6,26 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Assigns access to a principal for a specified Amazon Web Services account using -// a specified permission set. The term principal here refers to a user or group -// that is defined in IAM Identity Center. As part of a successful -// CreateAccountAssignment call, the specified permission set will automatically be -// provisioned to the account in the form of an IAM policy. That policy is attached -// to the IAM role created in IAM Identity Center. If the permission set is -// subsequently updated, the corresponding IAM policies attached to roles in your -// accounts will not be updated automatically. In this case, you must call -// ProvisionPermissionSet to make these updates. After a successful response, call -// DescribeAccountAssignmentCreationStatus to describe the status of an assignment -// creation request. +// a specified permission set. +// +// The term principal here refers to a user or group that is defined in IAM +// Identity Center. +// +// As part of a successful CreateAccountAssignment call, the specified permission +// set will automatically be provisioned to the account in the form of an IAM +// policy. That policy is attached to the IAM role created in IAM Identity Center. +// If the permission set is subsequently updated, the corresponding IAM policies +// attached to roles in your accounts will not be updated automatically. In this +// case, you must call ProvisionPermissionSetto make these updates. +// +// After a successful response, call DescribeAccountAssignmentCreationStatus to +// describe the status of an assignment creation request. func (c *Client) CreateAccountAssignment(ctx context.Context, params *CreateAccountAssignmentInput, optFns ...func(*Options)) (*CreateAccountAssignmentOutput, error) { if params == nil { params = &CreateAccountAssignmentInput{} @@ -41,9 +44,8 @@ func (c *Client) CreateAccountAssignment(ctx context.Context, params *CreateAcco type CreateAccountAssignmentInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -56,8 +58,7 @@ type CreateAccountAssignmentInput struct { // An identifier for an object in IAM Identity Center, such as a user or group. // PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For - // more information about PrincipalIds in IAM Identity Center, see the IAM - // Identity Center Identity Store API Reference . + // more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API Reference. // // This member is required. PrincipalId *string @@ -114,25 +115,25 @@ func (c *Client) addOperationCreateAccountAssignmentMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -147,13 +148,19 @@ func (c *Client) addOperationCreateAccountAssignmentMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccountAssignmentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccountAssignment(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateApplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateApplication.go index ac5a767d..7aa98c9a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateApplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateApplication.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -37,8 +36,7 @@ type CreateApplicationInput struct { ApplicationProviderArn *string // The ARN of the instance of IAM Identity Center under which the operation will - // run. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General + // run. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services General // Reference. // // This member is required. @@ -53,10 +51,15 @@ type CreateApplicationInput struct { // idempotency of the request. This lets you safely retry the request without // accidentally performing the same operation a second time. Passing the same value // to a later call to an operation requires that you also pass the same value for - // all other parameters. We recommend that you use a UUID type of value (https://wikipedia.org/wiki/Universally_unique_identifier) - // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. If you retry the operation with the same ClientToken , but with - // different parameters, the retry fails with an IdempotentParameterMismatch error. + // all other parameters. We recommend that you use a [UUID type of value]. + // + // If you don't provide this value, then Amazon Web Services generates a random + // one for you. + // + // If you retry the operation with the same ClientToken , but with different + // parameters, the retry fails with an IdempotentParameterMismatch error. + // + // [UUID type of value]: https://wikipedia.org/wiki/Universally_unique_identifier ClientToken *string // The description of the . @@ -108,25 +111,25 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -141,6 +144,12 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { return err } @@ -150,7 +159,7 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateApplication(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateApplicationAssignment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateApplicationAssignment.go index 8ab9efdc..387c03ff 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateApplicationAssignment.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateApplicationAssignment.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -37,8 +36,7 @@ type CreateApplicationAssignmentInput struct { // An identifier for an object in IAM Identity Center, such as a user or group. // PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For - // more information about PrincipalIds in IAM Identity Center, see the IAM - // Identity Center Identity Store API Reference . + // more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API Reference. // // This member is required. PrincipalId *string @@ -80,25 +78,25 @@ func (c *Client) addOperationCreateApplicationAssignmentMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +111,19 @@ func (c *Client) addOperationCreateApplicationAssignmentMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationAssignmentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateApplicationAssignment(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateInstance.go index ae6cef3a..662b826e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateInstance.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,9 +14,12 @@ import ( // Creates an instance of IAM Identity Center for a standalone Amazon Web Services // account that is not managed by Organizations or a member Amazon Web Services // account in an organization. You can create only one instance per account and -// across all Amazon Web Services Regions. The CreateInstance request is rejected -// if the following apply: +// across all Amazon Web Services Regions. +// +// The CreateInstance request is rejected if the following apply: +// // - The instance is created within the organization management account. +// // - An instance already exists in the same account. func (c *Client) CreateInstance(ctx context.Context, params *CreateInstanceInput, optFns ...func(*Options)) (*CreateInstanceOutput, error) { if params == nil { @@ -40,10 +42,15 @@ type CreateInstanceInput struct { // idempotency of the request. This lets you safely retry the request without // accidentally performing the same operation a second time. Passing the same value // to a later call to an operation requires that you also pass the same value for - // all other parameters. We recommend that you use a UUID type of value (https://wikipedia.org/wiki/Universally_unique_identifier) - // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. If you retry the operation with the same ClientToken , but with - // different parameters, the retry fails with an IdempotentParameterMismatch error. + // all other parameters. We recommend that you use a [UUID type of value]. + // + // If you don't provide this value, then Amazon Web Services generates a random + // one for you. + // + // If you retry the operation with the same ClientToken , but with different + // parameters, the retry fails with an IdempotentParameterMismatch error. + // + // [UUID type of value]: https://wikipedia.org/wiki/Universally_unique_identifier ClientToken *string // The name of the instance of IAM Identity Center. @@ -58,8 +65,9 @@ type CreateInstanceInput struct { type CreateInstanceOutput struct { // The ARN of the instance of IAM Identity Center under which the operation will - // run. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General + // run. + // + // For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General // Reference. InstanceArn *string @@ -91,25 +99,25 @@ func (c *Client) addOperationCreateInstanceMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -124,6 +132,12 @@ func (c *Client) addOperationCreateInstanceMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateInstanceMiddleware(stack, options); err != nil { return err } @@ -133,7 +147,7 @@ func (c *Client) addOperationCreateInstanceMiddlewares(stack *middleware.Stack, if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInstance(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateInstanceAccessControlAttributeConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateInstanceAccessControlAttributeConfiguration.go index 1c1b0d61..d41dccfa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateInstanceAccessControlAttributeConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateInstanceAccessControlAttributeConfiguration.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,9 +14,11 @@ import ( // Enables the attributes-based access control (ABAC) feature for the specified // IAM Identity Center instance. You can also specify new attributes to add to your // ABAC configuration during the enabling process. For more information about ABAC, -// see Attribute-Based Access Control in the IAM Identity Center User Guide. After -// a successful response, call DescribeInstanceAccessControlAttributeConfiguration -// to validate that InstanceAccessControlAttributeConfiguration was created. +// see Attribute-Based Access Controlin the IAM Identity Center User Guide. +// +// After a successful response, call +// DescribeInstanceAccessControlAttributeConfiguration to validate that +// InstanceAccessControlAttributeConfiguration was created. func (c *Client) CreateInstanceAccessControlAttributeConfiguration(ctx context.Context, params *CreateInstanceAccessControlAttributeConfigurationInput, optFns ...func(*Options)) (*CreateInstanceAccessControlAttributeConfigurationOutput, error) { if params == nil { params = &CreateInstanceAccessControlAttributeConfigurationInput{} @@ -84,25 +85,25 @@ func (c *Client) addOperationCreateInstanceAccessControlAttributeConfigurationMi if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +118,19 @@ func (c *Client) addOperationCreateInstanceAccessControlAttributeConfigurationMi if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstanceAccessControlAttributeConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInstanceAccessControlAttributeConfiguration(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreatePermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreatePermissionSet.go index 402aa5b9..c0e18330 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreatePermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreatePermissionSet.go @@ -6,15 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a permission set within a specified IAM Identity Center instance. To -// grant users and groups access to Amazon Web Services account resources, use -// CreateAccountAssignment . +// Creates a permission set within a specified IAM Identity Center instance. +// +// To grant users and groups access to Amazon Web Services account resources, use CreateAccountAssignment. func (c *Client) CreatePermissionSet(ctx context.Context, params *CreatePermissionSetInput, optFns ...func(*Options)) (*CreatePermissionSetOutput, error) { if params == nil { params = &CreatePermissionSetInput{} @@ -33,19 +32,18 @@ func (c *Client) CreatePermissionSet(ctx context.Context, params *CreatePermissi type CreatePermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string - // The name of the PermissionSet . + // The name of the PermissionSet. // // This member is required. Name *string - // The description of the PermissionSet . + // The description of the PermissionSet. Description *string // Used to redirect users within the application during the federation @@ -56,7 +54,7 @@ type CreatePermissionSetInput struct { // standard. SessionDuration *string - // The tags to attach to the new PermissionSet . + // The tags to attach to the new PermissionSet. Tags []types.Tag noSmithyDocumentSerde @@ -95,25 +93,25 @@ func (c *Client) addOperationCreatePermissionSetMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -128,13 +126,19 @@ func (c *Client) addOperationCreatePermissionSetMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateTrustedTokenIssuer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateTrustedTokenIssuer.go index 94e97f59..97760fef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateTrustedTokenIssuer.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_CreateTrustedTokenIssuer.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -14,10 +13,12 @@ import ( // Creates a connection to a trusted token issuer in an instance of IAM Identity // Center. A trusted token issuer enables trusted identity propagation to be used -// with applications that authenticate outside of Amazon Web Services. This trusted -// token issuer describes an external identity provider (IdP) that can generate -// claims or assertions in the form of access tokens for a user. Applications -// enabled for IAM Identity Center can use these tokens for authentication. +// with applications that authenticate outside of Amazon Web Services. +// +// This trusted token issuer describes an external identity provider (IdP) that +// can generate claims or assertions in the form of access tokens for a user. +// Applications enabled for IAM Identity Center can use these tokens for +// authentication. func (c *Client) CreateTrustedTokenIssuer(ctx context.Context, params *CreateTrustedTokenIssuerInput, optFns ...func(*Options)) (*CreateTrustedTokenIssuerOutput, error) { if params == nil { params = &CreateTrustedTokenIssuerInput{} @@ -62,10 +63,15 @@ type CreateTrustedTokenIssuerInput struct { // idempotency of the request. This lets you safely retry the request without // accidentally performing the same operation a second time. Passing the same value // to a later call to an operation requires that you also pass the same value for - // all other parameters. We recommend that you use a UUID type of value. (https://wikipedia.org/wiki/Universally_unique_identifier) - // . If you don't provide this value, then Amazon Web Services generates a random - // one for you. If you retry the operation with the same ClientToken , but with - // different parameters, the retry fails with an IdempotentParameterMismatch error. + // all other parameters. We recommend that you use a [UUID type of value.]. + // + // If you don't provide this value, then Amazon Web Services generates a random + // one for you. + // + // If you retry the operation with the same ClientToken , but with different + // parameters, the retry fails with an IdempotentParameterMismatch error. + // + // [UUID type of value.]: https://wikipedia.org/wiki/Universally_unique_identifier ClientToken *string // Specifies tags to be attached to the new trusted token issuer configuration. @@ -107,25 +113,25 @@ func (c *Client) addOperationCreateTrustedTokenIssuerMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -140,6 +146,12 @@ func (c *Client) addOperationCreateTrustedTokenIssuerMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTrustedTokenIssuerMiddleware(stack, options); err != nil { return err } @@ -149,7 +161,7 @@ func (c *Client) addOperationCreateTrustedTokenIssuerMiddlewares(stack *middlewa if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrustedTokenIssuer(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteAccountAssignment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteAccountAssignment.go index 6e0d7e3d..36d9d664 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteAccountAssignment.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteAccountAssignment.go @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a principal's access from a specified Amazon Web Services account using -// a specified permission set. After a successful response, call -// DescribeAccountAssignmentDeletionStatus to describe the status of an assignment -// deletion request. +// a specified permission set. +// +// After a successful response, call DescribeAccountAssignmentDeletionStatus to +// describe the status of an assignment deletion request. func (c *Client) DeleteAccountAssignment(ctx context.Context, params *DeleteAccountAssignmentInput, optFns ...func(*Options)) (*DeleteAccountAssignmentOutput, error) { if params == nil { params = &DeleteAccountAssignmentInput{} @@ -34,9 +34,8 @@ func (c *Client) DeleteAccountAssignment(ctx context.Context, params *DeleteAcco type DeleteAccountAssignmentInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -48,8 +47,7 @@ type DeleteAccountAssignmentInput struct { // An identifier for an object in IAM Identity Center, such as a user or group. // PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For - // more information about PrincipalIds in IAM Identity Center, see the IAM - // Identity Center Identity Store API Reference . + // more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API Reference. // // This member is required. PrincipalId *string @@ -106,25 +104,25 @@ func (c *Client) addOperationDeleteAccountAssignmentMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -139,13 +137,19 @@ func (c *Client) addOperationDeleteAccountAssignmentMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccountAssignmentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountAssignment(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplication.go index 80e87f0a..32dfa27d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplication.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -30,9 +29,8 @@ func (c *Client) DeleteApplication(ctx context.Context, params *DeleteApplicatio type DeleteApplicationInput struct { - // Specifies the ARN of the application. For more information about ARNs, see - // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the - // Amazon Web Services General Reference. + // Specifies the ARN of the application. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in + // the Amazon Web Services General Reference. // // This member is required. ApplicationArn *string @@ -69,25 +67,25 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -102,13 +100,19 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteApplication(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAccessScope.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAccessScope.go index 75916e91..101dc6d5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAccessScope.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAccessScope.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -71,25 +70,25 @@ func (c *Client) addOperationDeleteApplicationAccessScopeMiddlewares(stack *midd if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -104,13 +103,19 @@ func (c *Client) addOperationDeleteApplicationAccessScopeMiddlewares(stack *midd if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationAccessScopeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteApplicationAccessScope(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAssignment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAssignment.go index 7117778c..54eee4e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAssignment.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAssignment.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -38,8 +37,7 @@ type DeleteApplicationAssignmentInput struct { // An identifier for an object in IAM Identity Center, such as a user or group. // PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For - // more information about PrincipalIds in IAM Identity Center, see the IAM - // Identity Center Identity Store API Reference . + // more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API Reference. // // This member is required. PrincipalId *string @@ -81,25 +79,25 @@ func (c *Client) addOperationDeleteApplicationAssignmentMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +112,19 @@ func (c *Client) addOperationDeleteApplicationAssignmentMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationAssignmentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteApplicationAssignment(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAuthenticationMethod.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAuthenticationMethod.go index b349836e..81c19959 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAuthenticationMethod.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationAuthenticationMethod.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -72,25 +71,25 @@ func (c *Client) addOperationDeleteApplicationAuthenticationMethodMiddlewares(st if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -105,13 +104,19 @@ func (c *Client) addOperationDeleteApplicationAuthenticationMethodMiddlewares(st if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationAuthenticationMethodValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteApplicationAuthenticationMethod(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationGrant.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationGrant.go index 7243a08e..c355e953 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationGrant.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteApplicationGrant.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -72,25 +71,25 @@ func (c *Client) addOperationDeleteApplicationGrantMiddlewares(stack *middleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -105,13 +104,19 @@ func (c *Client) addOperationDeleteApplicationGrantMiddlewares(stack *middleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationGrantValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteApplicationGrant(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInlinePolicyFromPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInlinePolicyFromPermissionSet.go index 0fd7d033..6e2d1c61 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInlinePolicyFromPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInlinePolicyFromPermissionSet.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -30,9 +29,8 @@ func (c *Client) DeleteInlinePolicyFromPermissionSet(ctx context.Context, params type DeleteInlinePolicyFromPermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -74,25 +72,25 @@ func (c *Client) addOperationDeleteInlinePolicyFromPermissionSetMiddlewares(stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -107,13 +105,19 @@ func (c *Client) addOperationDeleteInlinePolicyFromPermissionSetMiddlewares(stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInlinePolicyFromPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInlinePolicyFromPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInstance.go index 906190fe..f109a2d0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInstance.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -70,25 +69,25 @@ func (c *Client) addOperationDeleteInstanceMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -103,13 +102,19 @@ func (c *Client) addOperationDeleteInstanceMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInstance(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInstanceAccessControlAttributeConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInstanceAccessControlAttributeConfiguration.go index db98f35b..768a77a7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInstanceAccessControlAttributeConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteInstanceAccessControlAttributeConfiguration.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -15,8 +14,8 @@ import ( // IAM Identity Center instance and deletes all of the attribute mappings that have // been configured. Once deleted, any attributes that are received from an identity // source and any custom attributes you have previously configured will not be -// passed. For more information about ABAC, see Attribute-Based Access Control in -// the IAM Identity Center User Guide. +// passed. For more information about ABAC, see Attribute-Based Access Controlin the IAM Identity Center User +// Guide. func (c *Client) DeleteInstanceAccessControlAttributeConfiguration(ctx context.Context, params *DeleteInstanceAccessControlAttributeConfigurationInput, optFns ...func(*Options)) (*DeleteInstanceAccessControlAttributeConfigurationOutput, error) { if params == nil { params = &DeleteInstanceAccessControlAttributeConfigurationInput{} @@ -72,25 +71,25 @@ func (c *Client) addOperationDeleteInstanceAccessControlAttributeConfigurationMi if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -105,13 +104,19 @@ func (c *Client) addOperationDeleteInstanceAccessControlAttributeConfigurationMi if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceAccessControlAttributeConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInstanceAccessControlAttributeConfiguration(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeletePermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeletePermissionSet.go index 5b0c60a8..31580fe3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeletePermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeletePermissionSet.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -30,9 +29,8 @@ func (c *Client) DeletePermissionSet(ctx context.Context, params *DeletePermissi type DeletePermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -74,25 +72,25 @@ func (c *Client) addOperationDeletePermissionSetMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -107,13 +105,19 @@ func (c *Client) addOperationDeletePermissionSetMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeletePermissionsBoundaryFromPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeletePermissionsBoundaryFromPermissionSet.go index f60d7631..ca862a92 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeletePermissionsBoundaryFromPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeletePermissionsBoundaryFromPermissionSet.go @@ -6,12 +6,11 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the permissions boundary from a specified PermissionSet . +// Deletes the permissions boundary from a specified PermissionSet. func (c *Client) DeletePermissionsBoundaryFromPermissionSet(ctx context.Context, params *DeletePermissionsBoundaryFromPermissionSetInput, optFns ...func(*Options)) (*DeletePermissionsBoundaryFromPermissionSetOutput, error) { if params == nil { params = &DeletePermissionsBoundaryFromPermissionSetInput{} @@ -72,25 +71,25 @@ func (c *Client) addOperationDeletePermissionsBoundaryFromPermissionSetMiddlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -105,13 +104,19 @@ func (c *Client) addOperationDeletePermissionsBoundaryFromPermissionSetMiddlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePermissionsBoundaryFromPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePermissionsBoundaryFromPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteTrustedTokenIssuer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteTrustedTokenIssuer.go index d732d8f9..30208513 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteTrustedTokenIssuer.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DeleteTrustedTokenIssuer.go @@ -6,15 +6,15 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a trusted token issuer configuration from an instance of IAM Identity -// Center. Deleting this trusted token issuer configuration will cause users to -// lose access to any applications that are configured to use the trusted token -// issuer. +// Center. +// +// Deleting this trusted token issuer configuration will cause users to lose +// access to any applications that are configured to use the trusted token issuer. func (c *Client) DeleteTrustedTokenIssuer(ctx context.Context, params *DeleteTrustedTokenIssuerInput, optFns ...func(*Options)) (*DeleteTrustedTokenIssuerOutput, error) { if params == nil { params = &DeleteTrustedTokenIssuerInput{} @@ -69,25 +69,25 @@ func (c *Client) addOperationDeleteTrustedTokenIssuerMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -102,13 +102,19 @@ func (c *Client) addOperationDeleteTrustedTokenIssuerMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrustedTokenIssuerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrustedTokenIssuer(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeAccountAssignmentCreationStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeAccountAssignmentCreationStatus.go index ae846b30..f31e948b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeAccountAssignmentCreationStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeAccountAssignmentCreationStatus.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -36,9 +35,8 @@ type DescribeAccountAssignmentCreationStatusInput struct { AccountAssignmentCreationRequestId *string // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -79,25 +77,25 @@ func (c *Client) addOperationDescribeAccountAssignmentCreationStatusMiddlewares( if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -112,13 +110,19 @@ func (c *Client) addOperationDescribeAccountAssignmentCreationStatusMiddlewares( if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountAssignmentCreationStatusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAssignmentCreationStatus(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeAccountAssignmentDeletionStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeAccountAssignmentDeletionStatus.go index 1a600dfa..268be3d5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeAccountAssignmentDeletionStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeAccountAssignmentDeletionStatus.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -36,9 +35,8 @@ type DescribeAccountAssignmentDeletionStatusInput struct { AccountAssignmentDeletionRequestId *string // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -79,25 +77,25 @@ func (c *Client) addOperationDescribeAccountAssignmentDeletionStatusMiddlewares( if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -112,13 +110,19 @@ func (c *Client) addOperationDescribeAccountAssignmentDeletionStatusMiddlewares( if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountAssignmentDeletionStatusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAssignmentDeletionStatus(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplication.go index 0953959d..e6654acf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplication.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -32,9 +31,8 @@ func (c *Client) DescribeApplication(ctx context.Context, params *DescribeApplic type DescribeApplicationInput struct { - // Specifies the ARN of the application. For more information about ARNs, see - // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the - // Amazon Web Services General Reference. + // Specifies the ARN of the application. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in + // the Amazon Web Services General Reference. // // This member is required. ApplicationArn *string @@ -60,8 +58,7 @@ type DescribeApplicationOutput struct { Description *string // The ARN of the IAM Identity Center application under which the operation will - // run. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General + // run. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services General // Reference. InstanceArn *string @@ -103,25 +100,25 @@ func (c *Client) addOperationDescribeApplicationMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -136,13 +133,19 @@ func (c *Client) addOperationDescribeApplicationMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplication(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplicationAssignment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplicationAssignment.go index ed9651a6..0094aa96 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplicationAssignment.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplicationAssignment.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,8 +14,7 @@ import ( // Retrieves a direct assignment of a user or group to an application. If the user // doesn’t have a direct assignment to the application, the user may still have // access to the application through a group. Therefore, don’t use this API to test -// access to an application for a user. Instead use -// ListApplicationAssignmentsForPrincipal . +// access to an application for a user. Instead use ListApplicationAssignmentsForPrincipal. func (c *Client) DescribeApplicationAssignment(ctx context.Context, params *DescribeApplicationAssignmentInput, optFns ...func(*Options)) (*DescribeApplicationAssignmentOutput, error) { if params == nil { params = &DescribeApplicationAssignmentInput{} @@ -34,17 +32,15 @@ func (c *Client) DescribeApplicationAssignment(ctx context.Context, params *Desc type DescribeApplicationAssignmentInput struct { - // Specifies the ARN of the application. For more information about ARNs, see - // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the - // Amazon Web Services General Reference. + // Specifies the ARN of the application. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in + // the Amazon Web Services General Reference. // // This member is required. ApplicationArn *string // An identifier for an object in IAM Identity Center, such as a user or group. // PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For - // more information about PrincipalIds in IAM Identity Center, see the IAM - // Identity Center Identity Store API Reference . + // more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API Reference. // // This member is required. PrincipalId *string @@ -59,15 +55,13 @@ type DescribeApplicationAssignmentInput struct { type DescribeApplicationAssignmentOutput struct { - // Specifies the ARN of the application. For more information about ARNs, see - // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the - // Amazon Web Services General Reference. + // Specifies the ARN of the application. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in + // the Amazon Web Services General Reference. ApplicationArn *string // An identifier for an object in IAM Identity Center, such as a user or group. // PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For - // more information about PrincipalIds in IAM Identity Center, see the IAM - // Identity Center Identity Store API Reference . + // more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API Reference. PrincipalId *string // The entity type for which the assignment will be created. @@ -101,25 +95,25 @@ func (c *Client) addOperationDescribeApplicationAssignmentMiddlewares(stack *mid if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -134,13 +128,19 @@ func (c *Client) addOperationDescribeApplicationAssignmentMiddlewares(stack *mid if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationAssignmentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplicationAssignment(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplicationProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplicationProvider.go index cc469f39..2f17b594 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplicationProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeApplicationProvider.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -84,25 +83,25 @@ func (c *Client) addOperationDescribeApplicationProviderMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +116,19 @@ func (c *Client) addOperationDescribeApplicationProviderMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplicationProvider(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeInstance.go index 6929d784..5cbf2f57 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeInstance.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -15,12 +14,15 @@ import ( // Returns the details of an instance of IAM Identity Center. The status can be // one of the following: +// // - CREATE_IN_PROGRESS - The instance is in the process of being created. When // the instance is ready for use, DescribeInstance returns the status of ACTIVE . // While the instance is in the CREATE_IN_PROGRESS state, you can call only // DescribeInstance and DeleteInstance operations. +// // - DELETE_IN_PROGRESS - The instance is being deleted. Returns // AccessDeniedException after the delete operation completes. +// // - ACTIVE - The instance is active. func (c *Client) DescribeInstance(ctx context.Context, params *DescribeInstanceInput, optFns ...func(*Options)) (*DescribeInstanceOutput, error) { if params == nil { @@ -58,8 +60,7 @@ type DescribeInstanceOutput struct { IdentityStoreId *string // The ARN of the instance of IAM Identity Center under which the operation will - // run. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General + // run. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services General // Reference. InstanceArn *string @@ -101,25 +102,25 @@ func (c *Client) addOperationDescribeInstanceMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -134,13 +135,19 @@ func (c *Client) addOperationDescribeInstanceMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstance(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeInstanceAccessControlAttributeConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeInstanceAccessControlAttributeConfiguration.go index d6896b9f..35957e40 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeInstanceAccessControlAttributeConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeInstanceAccessControlAttributeConfiguration.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -16,7 +15,7 @@ import ( // been configured to work with attributes-based access control (ABAC) for the // specified IAM Identity Center instance. This will not return attributes // configured and sent by an external identity provider. For more information about -// ABAC, see Attribute-Based Access Control in the IAM Identity Center User Guide. +// ABAC, see Attribute-Based Access Controlin the IAM Identity Center User Guide. func (c *Client) DescribeInstanceAccessControlAttributeConfiguration(ctx context.Context, params *DescribeInstanceAccessControlAttributeConfigurationInput, optFns ...func(*Options)) (*DescribeInstanceAccessControlAttributeConfigurationOutput, error) { if params == nil { params = &DescribeInstanceAccessControlAttributeConfigurationInput{} @@ -83,25 +82,25 @@ func (c *Client) addOperationDescribeInstanceAccessControlAttributeConfiguration if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -116,13 +115,19 @@ func (c *Client) addOperationDescribeInstanceAccessControlAttributeConfiguration if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceAccessControlAttributeConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceAccessControlAttributeConfiguration(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribePermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribePermissionSet.go index 59bb7122..795fa44a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribePermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribePermissionSet.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -31,9 +30,8 @@ func (c *Client) DescribePermissionSet(ctx context.Context, params *DescribePerm type DescribePermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -79,25 +77,25 @@ func (c *Client) addOperationDescribePermissionSetMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -112,13 +110,19 @@ func (c *Client) addOperationDescribePermissionSetMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribePermissionSetProvisioningStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribePermissionSetProvisioningStatus.go index 9e5515bb..3b3dfaba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribePermissionSetProvisioningStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribePermissionSetProvisioningStatus.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -31,15 +30,14 @@ func (c *Client) DescribePermissionSetProvisioningStatus(ctx context.Context, pa type DescribePermissionSetProvisioningStatusInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string - // The identifier that is provided by the ProvisionPermissionSet call to retrieve - // the current status of the provisioning workflow. + // The identifier that is provided by the ProvisionPermissionSet call to retrieve the current status of + // the provisioning workflow. // // This member is required. ProvisionPermissionSetRequestId *string @@ -80,25 +78,25 @@ func (c *Client) addOperationDescribePermissionSetProvisioningStatusMiddlewares( if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +111,19 @@ func (c *Client) addOperationDescribePermissionSetProvisioningStatusMiddlewares( if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePermissionSetProvisioningStatusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePermissionSetProvisioningStatus(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeTrustedTokenIssuer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeTrustedTokenIssuer.go index 7364f945..6386c891 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeTrustedTokenIssuer.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DescribeTrustedTokenIssuer.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -84,25 +83,25 @@ func (c *Client) addOperationDescribeTrustedTokenIssuerMiddlewares(stack *middle if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +116,19 @@ func (c *Client) addOperationDescribeTrustedTokenIssuerMiddlewares(stack *middle if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrustedTokenIssuerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrustedTokenIssuer(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DetachCustomerManagedPolicyReferenceFromPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DetachCustomerManagedPolicyReferenceFromPermissionSet.go index 5d9af4aa..93a01646 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DetachCustomerManagedPolicyReferenceFromPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DetachCustomerManagedPolicyReferenceFromPermissionSet.go @@ -6,13 +6,12 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Detaches the specified customer managed policy from the specified PermissionSet . +// Detaches the specified customer managed policy from the specified PermissionSet. func (c *Client) DetachCustomerManagedPolicyReferenceFromPermissionSet(ctx context.Context, params *DetachCustomerManagedPolicyReferenceFromPermissionSetInput, optFns ...func(*Options)) (*DetachCustomerManagedPolicyReferenceFromPermissionSetOutput, error) { if params == nil { params = &DetachCustomerManagedPolicyReferenceFromPermissionSetInput{} @@ -80,25 +79,25 @@ func (c *Client) addOperationDetachCustomerManagedPolicyReferenceFromPermissionS if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +112,19 @@ func (c *Client) addOperationDetachCustomerManagedPolicyReferenceFromPermissionS if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachCustomerManagedPolicyReferenceFromPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachCustomerManagedPolicyReferenceFromPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DetachManagedPolicyFromPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DetachManagedPolicyFromPermissionSet.go index 65a81b43..bf0ebcef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DetachManagedPolicyFromPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_DetachManagedPolicyFromPermissionSet.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -31,9 +30,8 @@ func (c *Client) DetachManagedPolicyFromPermissionSet(ctx context.Context, param type DetachManagedPolicyFromPermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -80,25 +78,25 @@ func (c *Client) addOperationDetachManagedPolicyFromPermissionSetMiddlewares(sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +111,19 @@ func (c *Client) addOperationDetachManagedPolicyFromPermissionSetMiddlewares(sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachManagedPolicyFromPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachManagedPolicyFromPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAccessScope.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAccessScope.go index aa42c3a5..90d357d4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAccessScope.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAccessScope.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -83,25 +82,25 @@ func (c *Client) addOperationGetApplicationAccessScopeMiddlewares(stack *middlew if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -116,13 +115,19 @@ func (c *Client) addOperationGetApplicationAccessScopeMiddlewares(stack *middlew if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationAccessScopeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApplicationAccessScope(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAssignmentConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAssignmentConfiguration.go index f26903da..d8d99d1c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAssignmentConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAssignmentConfiguration.go @@ -6,12 +6,11 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the configuration of PutApplicationAssignmentConfiguration . +// Retrieves the configuration of PutApplicationAssignmentConfiguration. func (c *Client) GetApplicationAssignmentConfiguration(ctx context.Context, params *GetApplicationAssignmentConfigurationInput, optFns ...func(*Options)) (*GetApplicationAssignmentConfigurationOutput, error) { if params == nil { params = &GetApplicationAssignmentConfigurationInput{} @@ -29,9 +28,8 @@ func (c *Client) GetApplicationAssignmentConfiguration(ctx context.Context, para type GetApplicationAssignmentConfigurationInput struct { - // Specifies the ARN of the application. For more information about ARNs, see - // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the - // Amazon Web Services General Reference. + // Specifies the ARN of the application. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in + // the Amazon Web Services General Reference. // // This member is required. ApplicationArn *string @@ -42,9 +40,10 @@ type GetApplicationAssignmentConfigurationInput struct { type GetApplicationAssignmentConfigurationOutput struct { // If AssignmentsRequired is true (default value), users don’t have access to the - // application unless an assignment is created using the - // CreateApplicationAssignment API (https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_CreateApplicationAssignment.html) - // . If false , all users have access to the application. + // application unless an assignment is created using the [CreateApplicationAssignment API]. If false , all users + // have access to the application. + // + // [CreateApplicationAssignment API]: https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_CreateApplicationAssignment.html // // This member is required. AssignmentRequired *bool @@ -77,25 +76,25 @@ func (c *Client) addOperationGetApplicationAssignmentConfigurationMiddlewares(st if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +109,19 @@ func (c *Client) addOperationGetApplicationAssignmentConfigurationMiddlewares(st if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationAssignmentConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApplicationAssignmentConfiguration(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAuthenticationMethod.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAuthenticationMethod.go index 7a3959fa..fa4049e6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAuthenticationMethod.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationAuthenticationMethod.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -76,25 +75,25 @@ func (c *Client) addOperationGetApplicationAuthenticationMethodMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -109,13 +108,19 @@ func (c *Client) addOperationGetApplicationAuthenticationMethodMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationAuthenticationMethodValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApplicationAuthenticationMethod(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationGrant.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationGrant.go index 60b5977e..3e157c14 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationGrant.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetApplicationGrant.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -78,25 +77,25 @@ func (c *Client) addOperationGetApplicationGrantMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -111,13 +110,19 @@ func (c *Client) addOperationGetApplicationGrantMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationGrantValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApplicationGrant(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetInlinePolicyForPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetInlinePolicyForPermissionSet.go index d172e234..c360eaa1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetInlinePolicyForPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetInlinePolicyForPermissionSet.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -30,9 +29,8 @@ func (c *Client) GetInlinePolicyForPermissionSet(ctx context.Context, params *Ge type GetInlinePolicyForPermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -47,9 +45,10 @@ type GetInlinePolicyForPermissionSetInput struct { type GetInlinePolicyForPermissionSetOutput struct { - // The inline policy that is attached to the permission set. For Length Constraints - // , if a valid ARN is provided for a permission set, it is possible for an empty - // inline policy to be returned. + // The inline policy that is attached to the permission set. + // + // For Length Constraints , if a valid ARN is provided for a permission set, it is + // possible for an empty inline policy to be returned. InlinePolicy *string // Metadata pertaining to the operation's result. @@ -80,25 +79,25 @@ func (c *Client) addOperationGetInlinePolicyForPermissionSetMiddlewares(stack *m if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +112,19 @@ func (c *Client) addOperationGetInlinePolicyForPermissionSetMiddlewares(stack *m if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInlinePolicyForPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInlinePolicyForPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetPermissionsBoundaryForPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetPermissionsBoundaryForPermissionSet.go index 0600c58f..8edda53b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetPermissionsBoundaryForPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_GetPermissionsBoundaryForPermissionSet.go @@ -6,13 +6,12 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Obtains the permissions boundary for a specified PermissionSet . +// Obtains the permissions boundary for a specified PermissionSet. func (c *Client) GetPermissionsBoundaryForPermissionSet(ctx context.Context, params *GetPermissionsBoundaryForPermissionSetInput, optFns ...func(*Options)) (*GetPermissionsBoundaryForPermissionSetOutput, error) { if params == nil { params = &GetPermissionsBoundaryForPermissionSetInput{} @@ -77,25 +76,25 @@ func (c *Client) addOperationGetPermissionsBoundaryForPermissionSetMiddlewares(s if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +109,19 @@ func (c *Client) addOperationGetPermissionsBoundaryForPermissionSetMiddlewares(s if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPermissionsBoundaryForPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPermissionsBoundaryForPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go index f3e9ff4a..c42651a9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -32,9 +31,8 @@ func (c *Client) ListAccountAssignmentCreationStatus(ctx context.Context, params type ListAccountAssignmentCreationStatusInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -89,25 +87,25 @@ func (c *Client) addOperationListAccountAssignmentCreationStatusMiddlewares(stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +120,19 @@ func (c *Client) addOperationListAccountAssignmentCreationStatusMiddlewares(stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountAssignmentCreationStatusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountAssignmentCreationStatus(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -146,14 +150,6 @@ func (c *Client) addOperationListAccountAssignmentCreationStatusMiddlewares(stac return nil } -// ListAccountAssignmentCreationStatusAPIClient is a client that implements the -// ListAccountAssignmentCreationStatus operation. -type ListAccountAssignmentCreationStatusAPIClient interface { - ListAccountAssignmentCreationStatus(context.Context, *ListAccountAssignmentCreationStatusInput, ...func(*Options)) (*ListAccountAssignmentCreationStatusOutput, error) -} - -var _ ListAccountAssignmentCreationStatusAPIClient = (*Client)(nil) - // ListAccountAssignmentCreationStatusPaginatorOptions is the paginator options // for ListAccountAssignmentCreationStatus type ListAccountAssignmentCreationStatusPaginatorOptions struct { @@ -220,6 +216,9 @@ func (p *ListAccountAssignmentCreationStatusPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAssignmentCreationStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,14 @@ func (p *ListAccountAssignmentCreationStatusPaginator) NextPage(ctx context.Cont return result, nil } +// ListAccountAssignmentCreationStatusAPIClient is a client that implements the +// ListAccountAssignmentCreationStatus operation. +type ListAccountAssignmentCreationStatusAPIClient interface { + ListAccountAssignmentCreationStatus(context.Context, *ListAccountAssignmentCreationStatusInput, ...func(*Options)) (*ListAccountAssignmentCreationStatusOutput, error) +} + +var _ ListAccountAssignmentCreationStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAssignmentCreationStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go index 9173fc5c..1486a750 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -32,9 +31,8 @@ func (c *Client) ListAccountAssignmentDeletionStatus(ctx context.Context, params type ListAccountAssignmentDeletionStatusInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -89,25 +87,25 @@ func (c *Client) addOperationListAccountAssignmentDeletionStatusMiddlewares(stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +120,19 @@ func (c *Client) addOperationListAccountAssignmentDeletionStatusMiddlewares(stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountAssignmentDeletionStatusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountAssignmentDeletionStatus(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -146,14 +150,6 @@ func (c *Client) addOperationListAccountAssignmentDeletionStatusMiddlewares(stac return nil } -// ListAccountAssignmentDeletionStatusAPIClient is a client that implements the -// ListAccountAssignmentDeletionStatus operation. -type ListAccountAssignmentDeletionStatusAPIClient interface { - ListAccountAssignmentDeletionStatus(context.Context, *ListAccountAssignmentDeletionStatusInput, ...func(*Options)) (*ListAccountAssignmentDeletionStatusOutput, error) -} - -var _ ListAccountAssignmentDeletionStatusAPIClient = (*Client)(nil) - // ListAccountAssignmentDeletionStatusPaginatorOptions is the paginator options // for ListAccountAssignmentDeletionStatus type ListAccountAssignmentDeletionStatusPaginatorOptions struct { @@ -220,6 +216,9 @@ func (p *ListAccountAssignmentDeletionStatusPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAssignmentDeletionStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,14 @@ func (p *ListAccountAssignmentDeletionStatusPaginator) NextPage(ctx context.Cont return result, nil } +// ListAccountAssignmentDeletionStatusAPIClient is a client that implements the +// ListAccountAssignmentDeletionStatus operation. +type ListAccountAssignmentDeletionStatusAPIClient interface { + ListAccountAssignmentDeletionStatus(context.Context, *ListAccountAssignmentDeletionStatusInput, ...func(*Options)) (*ListAccountAssignmentDeletionStatusOutput, error) +} + +var _ ListAccountAssignmentDeletionStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAssignmentDeletionStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignments.go index 037fdf56..2fae295c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignments.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignments.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -38,9 +37,8 @@ type ListAccountAssignmentsInput struct { AccountId *string // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -98,25 +96,25 @@ func (c *Client) addOperationListAccountAssignmentsMiddlewares(stack *middleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -131,13 +129,19 @@ func (c *Client) addOperationListAccountAssignmentsMiddlewares(stack *middleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountAssignmentsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountAssignments(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -155,14 +159,6 @@ func (c *Client) addOperationListAccountAssignmentsMiddlewares(stack *middleware return nil } -// ListAccountAssignmentsAPIClient is a client that implements the -// ListAccountAssignments operation. -type ListAccountAssignmentsAPIClient interface { - ListAccountAssignments(context.Context, *ListAccountAssignmentsInput, ...func(*Options)) (*ListAccountAssignmentsOutput, error) -} - -var _ ListAccountAssignmentsAPIClient = (*Client)(nil) - // ListAccountAssignmentsPaginatorOptions is the paginator options for // ListAccountAssignments type ListAccountAssignmentsPaginatorOptions struct { @@ -227,6 +223,9 @@ func (p *ListAccountAssignmentsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAssignments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +245,14 @@ func (p *ListAccountAssignmentsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListAccountAssignmentsAPIClient is a client that implements the +// ListAccountAssignments operation. +type ListAccountAssignmentsAPIClient interface { + ListAccountAssignments(context.Context, *ListAccountAssignmentsInput, ...func(*Options)) (*ListAccountAssignmentsOutput, error) +} + +var _ ListAccountAssignmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAssignments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentsForPrincipal.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentsForPrincipal.go index 0c79f649..e33528f2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentsForPrincipal.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountAssignmentsForPrincipal.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -110,25 +109,25 @@ func (c *Client) addOperationListAccountAssignmentsForPrincipalMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -143,13 +142,19 @@ func (c *Client) addOperationListAccountAssignmentsForPrincipalMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountAssignmentsForPrincipalValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountAssignmentsForPrincipal(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -167,14 +172,6 @@ func (c *Client) addOperationListAccountAssignmentsForPrincipalMiddlewares(stack return nil } -// ListAccountAssignmentsForPrincipalAPIClient is a client that implements the -// ListAccountAssignmentsForPrincipal operation. -type ListAccountAssignmentsForPrincipalAPIClient interface { - ListAccountAssignmentsForPrincipal(context.Context, *ListAccountAssignmentsForPrincipalInput, ...func(*Options)) (*ListAccountAssignmentsForPrincipalOutput, error) -} - -var _ ListAccountAssignmentsForPrincipalAPIClient = (*Client)(nil) - // ListAccountAssignmentsForPrincipalPaginatorOptions is the paginator options for // ListAccountAssignmentsForPrincipal type ListAccountAssignmentsForPrincipalPaginatorOptions struct { @@ -247,6 +244,9 @@ func (p *ListAccountAssignmentsForPrincipalPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAssignmentsForPrincipal(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +266,14 @@ func (p *ListAccountAssignmentsForPrincipalPaginator) NextPage(ctx context.Conte return result, nil } +// ListAccountAssignmentsForPrincipalAPIClient is a client that implements the +// ListAccountAssignmentsForPrincipal operation. +type ListAccountAssignmentsForPrincipalAPIClient interface { + ListAccountAssignmentsForPrincipal(context.Context, *ListAccountAssignmentsForPrincipalInput, ...func(*Options)) (*ListAccountAssignmentsForPrincipalOutput, error) +} + +var _ ListAccountAssignmentsForPrincipalAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAssignmentsForPrincipal(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go index e52c430b..ed388133 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -32,20 +31,19 @@ func (c *Client) ListAccountsForProvisionedPermissionSet(ctx context.Context, pa type ListAccountsForProvisionedPermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string - // The ARN of the PermissionSet from which the associated Amazon Web Services - // accounts will be listed. + // The ARN of the PermissionSet from which the associated Amazon Web Services accounts will be + // listed. // // This member is required. PermissionSetArn *string - // The maximum number of results to display for the PermissionSet . + // The maximum number of results to display for the PermissionSet. MaxResults *int32 // The pagination token for the list API. Initially the value is null. Use the @@ -95,25 +93,25 @@ func (c *Client) addOperationListAccountsForProvisionedPermissionSetMiddlewares( if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -128,13 +126,19 @@ func (c *Client) addOperationListAccountsForProvisionedPermissionSetMiddlewares( if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountsForProvisionedPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountsForProvisionedPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -152,18 +156,10 @@ func (c *Client) addOperationListAccountsForProvisionedPermissionSetMiddlewares( return nil } -// ListAccountsForProvisionedPermissionSetAPIClient is a client that implements -// the ListAccountsForProvisionedPermissionSet operation. -type ListAccountsForProvisionedPermissionSetAPIClient interface { - ListAccountsForProvisionedPermissionSet(context.Context, *ListAccountsForProvisionedPermissionSetInput, ...func(*Options)) (*ListAccountsForProvisionedPermissionSetOutput, error) -} - -var _ ListAccountsForProvisionedPermissionSetAPIClient = (*Client)(nil) - // ListAccountsForProvisionedPermissionSetPaginatorOptions is the paginator // options for ListAccountsForProvisionedPermissionSet type ListAccountsForProvisionedPermissionSetPaginatorOptions struct { - // The maximum number of results to display for the PermissionSet . + // The maximum number of results to display for the PermissionSet. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -226,6 +222,9 @@ func (p *ListAccountsForProvisionedPermissionSetPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountsForProvisionedPermissionSet(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,14 @@ func (p *ListAccountsForProvisionedPermissionSetPaginator) NextPage(ctx context. return result, nil } +// ListAccountsForProvisionedPermissionSetAPIClient is a client that implements +// the ListAccountsForProvisionedPermissionSet operation. +type ListAccountsForProvisionedPermissionSetAPIClient interface { + ListAccountsForProvisionedPermissionSet(context.Context, *ListAccountsForProvisionedPermissionSetInput, ...func(*Options)) (*ListAccountsForProvisionedPermissionSetOutput, error) +} + +var _ ListAccountsForProvisionedPermissionSetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountsForProvisionedPermissionSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAccessScopes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAccessScopes.go index b4e2da1e..feda9ee1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAccessScopes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAccessScopes.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -96,25 +95,25 @@ func (c *Client) addOperationListApplicationAccessScopesMiddlewares(stack *middl if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -129,13 +128,19 @@ func (c *Client) addOperationListApplicationAccessScopesMiddlewares(stack *middl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationAccessScopesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationAccessScopes(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -153,14 +158,6 @@ func (c *Client) addOperationListApplicationAccessScopesMiddlewares(stack *middl return nil } -// ListApplicationAccessScopesAPIClient is a client that implements the -// ListApplicationAccessScopes operation. -type ListApplicationAccessScopesAPIClient interface { - ListApplicationAccessScopes(context.Context, *ListApplicationAccessScopesInput, ...func(*Options)) (*ListApplicationAccessScopesOutput, error) -} - -var _ ListApplicationAccessScopesAPIClient = (*Client)(nil) - // ListApplicationAccessScopesPaginatorOptions is the paginator options for // ListApplicationAccessScopes type ListApplicationAccessScopesPaginatorOptions struct { @@ -233,6 +230,9 @@ func (p *ListApplicationAccessScopesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationAccessScopes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +252,14 @@ func (p *ListApplicationAccessScopesPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListApplicationAccessScopesAPIClient is a client that implements the +// ListApplicationAccessScopes operation. +type ListApplicationAccessScopesAPIClient interface { + ListApplicationAccessScopes(context.Context, *ListApplicationAccessScopesInput, ...func(*Options)) (*ListApplicationAccessScopesOutput, error) +} + +var _ ListApplicationAccessScopesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationAccessScopes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAssignments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAssignments.go index 8c20afdc..66a04bb8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAssignments.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAssignments.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -93,25 +92,25 @@ func (c *Client) addOperationListApplicationAssignmentsMiddlewares(stack *middle if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -126,13 +125,19 @@ func (c *Client) addOperationListApplicationAssignmentsMiddlewares(stack *middle if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationAssignmentsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationAssignments(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -150,14 +155,6 @@ func (c *Client) addOperationListApplicationAssignmentsMiddlewares(stack *middle return nil } -// ListApplicationAssignmentsAPIClient is a client that implements the -// ListApplicationAssignments operation. -type ListApplicationAssignmentsAPIClient interface { - ListApplicationAssignments(context.Context, *ListApplicationAssignmentsInput, ...func(*Options)) (*ListApplicationAssignmentsOutput, error) -} - -var _ ListApplicationAssignmentsAPIClient = (*Client)(nil) - // ListApplicationAssignmentsPaginatorOptions is the paginator options for // ListApplicationAssignments type ListApplicationAssignmentsPaginatorOptions struct { @@ -230,6 +227,9 @@ func (p *ListApplicationAssignmentsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationAssignments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +249,14 @@ func (p *ListApplicationAssignmentsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListApplicationAssignmentsAPIClient is a client that implements the +// ListApplicationAssignments operation. +type ListApplicationAssignmentsAPIClient interface { + ListApplicationAssignments(context.Context, *ListApplicationAssignmentsInput, ...func(*Options)) (*ListApplicationAssignmentsOutput, error) +} + +var _ ListApplicationAssignmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationAssignments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAssignmentsForPrincipal.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAssignmentsForPrincipal.go index 0ce90444..40b6a309 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAssignmentsForPrincipal.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAssignmentsForPrincipal.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -110,25 +109,25 @@ func (c *Client) addOperationListApplicationAssignmentsForPrincipalMiddlewares(s if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -143,13 +142,19 @@ func (c *Client) addOperationListApplicationAssignmentsForPrincipalMiddlewares(s if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationAssignmentsForPrincipalValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationAssignmentsForPrincipal(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -167,14 +172,6 @@ func (c *Client) addOperationListApplicationAssignmentsForPrincipalMiddlewares(s return nil } -// ListApplicationAssignmentsForPrincipalAPIClient is a client that implements the -// ListApplicationAssignmentsForPrincipal operation. -type ListApplicationAssignmentsForPrincipalAPIClient interface { - ListApplicationAssignmentsForPrincipal(context.Context, *ListApplicationAssignmentsForPrincipalInput, ...func(*Options)) (*ListApplicationAssignmentsForPrincipalOutput, error) -} - -var _ ListApplicationAssignmentsForPrincipalAPIClient = (*Client)(nil) - // ListApplicationAssignmentsForPrincipalPaginatorOptions is the paginator options // for ListApplicationAssignmentsForPrincipal type ListApplicationAssignmentsForPrincipalPaginatorOptions struct { @@ -247,6 +244,9 @@ func (p *ListApplicationAssignmentsForPrincipalPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationAssignmentsForPrincipal(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +266,14 @@ func (p *ListApplicationAssignmentsForPrincipalPaginator) NextPage(ctx context.C return result, nil } +// ListApplicationAssignmentsForPrincipalAPIClient is a client that implements the +// ListApplicationAssignmentsForPrincipal operation. +type ListApplicationAssignmentsForPrincipalAPIClient interface { + ListApplicationAssignmentsForPrincipal(context.Context, *ListApplicationAssignmentsForPrincipalInput, ...func(*Options)) (*ListApplicationAssignmentsForPrincipalOutput, error) +} + +var _ ListApplicationAssignmentsForPrincipalAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationAssignmentsForPrincipal(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAuthenticationMethods.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAuthenticationMethods.go index a0cc00db..75d6631a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAuthenticationMethods.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationAuthenticationMethods.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -85,25 +84,25 @@ func (c *Client) addOperationListApplicationAuthenticationMethodsMiddlewares(sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -118,13 +117,19 @@ func (c *Client) addOperationListApplicationAuthenticationMethodsMiddlewares(sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationAuthenticationMethodsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationAuthenticationMethods(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -142,14 +147,6 @@ func (c *Client) addOperationListApplicationAuthenticationMethodsMiddlewares(sta return nil } -// ListApplicationAuthenticationMethodsAPIClient is a client that implements the -// ListApplicationAuthenticationMethods operation. -type ListApplicationAuthenticationMethodsAPIClient interface { - ListApplicationAuthenticationMethods(context.Context, *ListApplicationAuthenticationMethodsInput, ...func(*Options)) (*ListApplicationAuthenticationMethodsOutput, error) -} - -var _ ListApplicationAuthenticationMethodsAPIClient = (*Client)(nil) - // ListApplicationAuthenticationMethodsPaginatorOptions is the paginator options // for ListApplicationAuthenticationMethods type ListApplicationAuthenticationMethodsPaginatorOptions struct { @@ -204,6 +201,9 @@ func (p *ListApplicationAuthenticationMethodsPaginator) NextPage(ctx context.Con params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationAuthenticationMethods(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +223,14 @@ func (p *ListApplicationAuthenticationMethodsPaginator) NextPage(ctx context.Con return result, nil } +// ListApplicationAuthenticationMethodsAPIClient is a client that implements the +// ListApplicationAuthenticationMethods operation. +type ListApplicationAuthenticationMethodsAPIClient interface { + ListApplicationAuthenticationMethods(context.Context, *ListApplicationAuthenticationMethodsInput, ...func(*Options)) (*ListApplicationAuthenticationMethodsOutput, error) +} + +var _ ListApplicationAuthenticationMethodsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationAuthenticationMethods(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationGrants.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationGrants.go index 15f5d36c..067e319f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationGrants.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationGrants.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -86,25 +85,25 @@ func (c *Client) addOperationListApplicationGrantsMiddlewares(stack *middleware. if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -119,13 +118,19 @@ func (c *Client) addOperationListApplicationGrantsMiddlewares(stack *middleware. if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationGrantsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationGrants(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -143,14 +148,6 @@ func (c *Client) addOperationListApplicationGrantsMiddlewares(stack *middleware. return nil } -// ListApplicationGrantsAPIClient is a client that implements the -// ListApplicationGrants operation. -type ListApplicationGrantsAPIClient interface { - ListApplicationGrants(context.Context, *ListApplicationGrantsInput, ...func(*Options)) (*ListApplicationGrantsOutput, error) -} - -var _ ListApplicationGrantsAPIClient = (*Client)(nil) - // ListApplicationGrantsPaginatorOptions is the paginator options for // ListApplicationGrants type ListApplicationGrantsPaginatorOptions struct { @@ -203,6 +200,9 @@ func (p *ListApplicationGrantsPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationGrants(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +222,14 @@ func (p *ListApplicationGrantsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListApplicationGrantsAPIClient is a client that implements the +// ListApplicationGrants operation. +type ListApplicationGrantsAPIClient interface { + ListApplicationGrants(context.Context, *ListApplicationGrantsInput, ...func(*Options)) (*ListApplicationGrantsOutput, error) +} + +var _ ListApplicationGrantsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationGrants(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationProviders.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationProviders.go index 616cb083..c75cb902 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationProviders.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplicationProviders.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -89,25 +88,25 @@ func (c *Client) addOperationListApplicationProvidersMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,10 +121,16 @@ func (c *Client) addOperationListApplicationProvidersMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationProviders(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -143,14 +148,6 @@ func (c *Client) addOperationListApplicationProvidersMiddlewares(stack *middlewa return nil } -// ListApplicationProvidersAPIClient is a client that implements the -// ListApplicationProviders operation. -type ListApplicationProvidersAPIClient interface { - ListApplicationProviders(context.Context, *ListApplicationProvidersInput, ...func(*Options)) (*ListApplicationProvidersOutput, error) -} - -var _ ListApplicationProvidersAPIClient = (*Client)(nil) - // ListApplicationProvidersPaginatorOptions is the paginator options for // ListApplicationProviders type ListApplicationProvidersPaginatorOptions struct { @@ -222,6 +219,9 @@ func (p *ListApplicationProvidersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationProviders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +241,14 @@ func (p *ListApplicationProvidersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListApplicationProvidersAPIClient is a client that implements the +// ListApplicationProviders operation. +type ListApplicationProvidersAPIClient interface { + ListApplicationProviders(context.Context, *ListApplicationProvidersInput, ...func(*Options)) (*ListApplicationProvidersOutput, error) +} + +var _ ListApplicationProvidersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationProviders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplications.go index bd6afef0..5449aff0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplications.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListApplications.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -34,8 +33,7 @@ func (c *Client) ListApplications(ctx context.Context, params *ListApplicationsI type ListApplicationsInput struct { // The ARN of the IAM Identity Center application under which the operation will - // run. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General + // run. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services General // Reference. // // This member is required. @@ -102,25 +100,25 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -135,13 +133,19 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -159,14 +163,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // Specifies the total number of results that you want included in each response. @@ -236,6 +232,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +254,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListCustomerManagedPolicyReferencesInPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListCustomerManagedPolicyReferencesInPermissionSet.go index c0f2a7c7..f2412de1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListCustomerManagedPolicyReferencesInPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListCustomerManagedPolicyReferencesInPermissionSet.go @@ -6,13 +6,12 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists all customer managed policies attached to a specified PermissionSet . +// Lists all customer managed policies attached to a specified PermissionSet. func (c *Client) ListCustomerManagedPolicyReferencesInPermissionSet(ctx context.Context, params *ListCustomerManagedPolicyReferencesInPermissionSetInput, optFns ...func(*Options)) (*ListCustomerManagedPolicyReferencesInPermissionSetOutput, error) { if params == nil { params = &ListCustomerManagedPolicyReferencesInPermissionSetInput{} @@ -89,25 +88,25 @@ func (c *Client) addOperationListCustomerManagedPolicyReferencesInPermissionSetM if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +121,19 @@ func (c *Client) addOperationListCustomerManagedPolicyReferencesInPermissionSetM if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCustomerManagedPolicyReferencesInPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomerManagedPolicyReferencesInPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -146,14 +151,6 @@ func (c *Client) addOperationListCustomerManagedPolicyReferencesInPermissionSetM return nil } -// ListCustomerManagedPolicyReferencesInPermissionSetAPIClient is a client that -// implements the ListCustomerManagedPolicyReferencesInPermissionSet operation. -type ListCustomerManagedPolicyReferencesInPermissionSetAPIClient interface { - ListCustomerManagedPolicyReferencesInPermissionSet(context.Context, *ListCustomerManagedPolicyReferencesInPermissionSetInput, ...func(*Options)) (*ListCustomerManagedPolicyReferencesInPermissionSetOutput, error) -} - -var _ ListCustomerManagedPolicyReferencesInPermissionSetAPIClient = (*Client)(nil) - // ListCustomerManagedPolicyReferencesInPermissionSetPaginatorOptions is the // paginator options for ListCustomerManagedPolicyReferencesInPermissionSet type ListCustomerManagedPolicyReferencesInPermissionSetPaginatorOptions struct { @@ -221,6 +218,9 @@ func (p *ListCustomerManagedPolicyReferencesInPermissionSetPaginator) NextPage(c } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomerManagedPolicyReferencesInPermissionSet(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +240,14 @@ func (p *ListCustomerManagedPolicyReferencesInPermissionSetPaginator) NextPage(c return result, nil } +// ListCustomerManagedPolicyReferencesInPermissionSetAPIClient is a client that +// implements the ListCustomerManagedPolicyReferencesInPermissionSet operation. +type ListCustomerManagedPolicyReferencesInPermissionSetAPIClient interface { + ListCustomerManagedPolicyReferencesInPermissionSet(context.Context, *ListCustomerManagedPolicyReferencesInPermissionSetInput, ...func(*Options)) (*ListCustomerManagedPolicyReferencesInPermissionSetOutput, error) +} + +var _ ListCustomerManagedPolicyReferencesInPermissionSetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomerManagedPolicyReferencesInPermissionSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListInstances.go index 794b4fcb..534e392b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListInstances.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListInstances.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -78,25 +77,25 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -111,10 +110,16 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstances(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -132,13 +137,6 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o return nil } -// ListInstancesAPIClient is a client that implements the ListInstances operation. -type ListInstancesAPIClient interface { - ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) -} - -var _ ListInstancesAPIClient = (*Client)(nil) - // ListInstancesPaginatorOptions is the paginator options for ListInstances type ListInstancesPaginatorOptions struct { // The maximum number of results to display for the instance. @@ -202,6 +200,9 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +222,13 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListInstancesAPIClient is a client that implements the ListInstances operation. +type ListInstancesAPIClient interface { + ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) +} + +var _ ListInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go index 9cb27f46..da2d98f0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -32,9 +31,8 @@ func (c *Client) ListManagedPoliciesInPermissionSet(ctx context.Context, params type ListManagedPoliciesInPermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -44,7 +42,7 @@ type ListManagedPoliciesInPermissionSetInput struct { // This member is required. PermissionSetArn *string - // The maximum number of results to display for the PermissionSet . + // The maximum number of results to display for the PermissionSet. MaxResults *int32 // The pagination token for the list API. Initially the value is null. Use the @@ -91,25 +89,25 @@ func (c *Client) addOperationListManagedPoliciesInPermissionSetMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -124,13 +122,19 @@ func (c *Client) addOperationListManagedPoliciesInPermissionSetMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListManagedPoliciesInPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListManagedPoliciesInPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -148,18 +152,10 @@ func (c *Client) addOperationListManagedPoliciesInPermissionSetMiddlewares(stack return nil } -// ListManagedPoliciesInPermissionSetAPIClient is a client that implements the -// ListManagedPoliciesInPermissionSet operation. -type ListManagedPoliciesInPermissionSetAPIClient interface { - ListManagedPoliciesInPermissionSet(context.Context, *ListManagedPoliciesInPermissionSetInput, ...func(*Options)) (*ListManagedPoliciesInPermissionSetOutput, error) -} - -var _ ListManagedPoliciesInPermissionSetAPIClient = (*Client)(nil) - // ListManagedPoliciesInPermissionSetPaginatorOptions is the paginator options for // ListManagedPoliciesInPermissionSet type ListManagedPoliciesInPermissionSetPaginatorOptions struct { - // The maximum number of results to display for the PermissionSet . + // The maximum number of results to display for the PermissionSet. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -222,6 +218,9 @@ func (p *ListManagedPoliciesInPermissionSetPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListManagedPoliciesInPermissionSet(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,14 @@ func (p *ListManagedPoliciesInPermissionSetPaginator) NextPage(ctx context.Conte return result, nil } +// ListManagedPoliciesInPermissionSetAPIClient is a client that implements the +// ListManagedPoliciesInPermissionSet operation. +type ListManagedPoliciesInPermissionSetAPIClient interface { + ListManagedPoliciesInPermissionSet(context.Context, *ListManagedPoliciesInPermissionSetInput, ...func(*Options)) (*ListManagedPoliciesInPermissionSetOutput, error) +} + +var _ ListManagedPoliciesInPermissionSetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListManagedPoliciesInPermissionSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go index e05daa84..828125df 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -32,9 +31,8 @@ func (c *Client) ListPermissionSetProvisioningStatus(ctx context.Context, params type ListPermissionSetProvisioningStatusInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -89,25 +87,25 @@ func (c *Client) addOperationListPermissionSetProvisioningStatusMiddlewares(stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +120,19 @@ func (c *Client) addOperationListPermissionSetProvisioningStatusMiddlewares(stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionSetProvisioningStatusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPermissionSetProvisioningStatus(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -146,14 +150,6 @@ func (c *Client) addOperationListPermissionSetProvisioningStatusMiddlewares(stac return nil } -// ListPermissionSetProvisioningStatusAPIClient is a client that implements the -// ListPermissionSetProvisioningStatus operation. -type ListPermissionSetProvisioningStatusAPIClient interface { - ListPermissionSetProvisioningStatus(context.Context, *ListPermissionSetProvisioningStatusInput, ...func(*Options)) (*ListPermissionSetProvisioningStatusOutput, error) -} - -var _ ListPermissionSetProvisioningStatusAPIClient = (*Client)(nil) - // ListPermissionSetProvisioningStatusPaginatorOptions is the paginator options // for ListPermissionSetProvisioningStatus type ListPermissionSetProvisioningStatusPaginatorOptions struct { @@ -220,6 +216,9 @@ func (p *ListPermissionSetProvisioningStatusPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissionSetProvisioningStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,14 @@ func (p *ListPermissionSetProvisioningStatusPaginator) NextPage(ctx context.Cont return result, nil } +// ListPermissionSetProvisioningStatusAPIClient is a client that implements the +// ListPermissionSetProvisioningStatus operation. +type ListPermissionSetProvisioningStatusAPIClient interface { + ListPermissionSetProvisioningStatus(context.Context, *ListPermissionSetProvisioningStatusInput, ...func(*Options)) (*ListPermissionSetProvisioningStatusOutput, error) +} + +var _ ListPermissionSetProvisioningStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissionSetProvisioningStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSets.go index 4c4b29cc..64bcdb73 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSets.go @@ -6,12 +6,11 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the PermissionSet s in an IAM Identity Center instance. +// Lists the PermissionSets in an IAM Identity Center instance. func (c *Client) ListPermissionSets(ctx context.Context, params *ListPermissionSetsInput, optFns ...func(*Options)) (*ListPermissionSetsOutput, error) { if params == nil { params = &ListPermissionSetsInput{} @@ -30,9 +29,8 @@ func (c *Client) ListPermissionSets(ctx context.Context, params *ListPermissionS type ListPermissionSetsInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -84,25 +82,25 @@ func (c *Client) addOperationListPermissionSetsMiddlewares(stack *middleware.Sta if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -117,13 +115,19 @@ func (c *Client) addOperationListPermissionSetsMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionSetsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPermissionSets(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -141,14 +145,6 @@ func (c *Client) addOperationListPermissionSetsMiddlewares(stack *middleware.Sta return nil } -// ListPermissionSetsAPIClient is a client that implements the ListPermissionSets -// operation. -type ListPermissionSetsAPIClient interface { - ListPermissionSets(context.Context, *ListPermissionSetsInput, ...func(*Options)) (*ListPermissionSetsOutput, error) -} - -var _ ListPermissionSetsAPIClient = (*Client)(nil) - // ListPermissionSetsPaginatorOptions is the paginator options for // ListPermissionSets type ListPermissionSetsPaginatorOptions struct { @@ -213,6 +209,9 @@ func (p *ListPermissionSetsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissionSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,14 @@ func (p *ListPermissionSetsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListPermissionSetsAPIClient is a client that implements the ListPermissionSets +// operation. +type ListPermissionSetsAPIClient interface { + ListPermissionSets(context.Context, *ListPermissionSetsInput, ...func(*Options)) (*ListPermissionSetsOutput, error) +} + +var _ ListPermissionSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissionSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go index 72478cbd..ba084330 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -38,9 +37,8 @@ type ListPermissionSetsProvisionedToAccountInput struct { AccountId *string // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -95,25 +93,25 @@ func (c *Client) addOperationListPermissionSetsProvisionedToAccountMiddlewares(s if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -128,13 +126,19 @@ func (c *Client) addOperationListPermissionSetsProvisionedToAccountMiddlewares(s if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionSetsProvisionedToAccountValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPermissionSetsProvisionedToAccount(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -152,14 +156,6 @@ func (c *Client) addOperationListPermissionSetsProvisionedToAccountMiddlewares(s return nil } -// ListPermissionSetsProvisionedToAccountAPIClient is a client that implements the -// ListPermissionSetsProvisionedToAccount operation. -type ListPermissionSetsProvisionedToAccountAPIClient interface { - ListPermissionSetsProvisionedToAccount(context.Context, *ListPermissionSetsProvisionedToAccountInput, ...func(*Options)) (*ListPermissionSetsProvisionedToAccountOutput, error) -} - -var _ ListPermissionSetsProvisionedToAccountAPIClient = (*Client)(nil) - // ListPermissionSetsProvisionedToAccountPaginatorOptions is the paginator options // for ListPermissionSetsProvisionedToAccount type ListPermissionSetsProvisionedToAccountPaginatorOptions struct { @@ -226,6 +222,9 @@ func (p *ListPermissionSetsProvisionedToAccountPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissionSetsProvisionedToAccount(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,14 @@ func (p *ListPermissionSetsProvisionedToAccountPaginator) NextPage(ctx context.C return result, nil } +// ListPermissionSetsProvisionedToAccountAPIClient is a client that implements the +// ListPermissionSetsProvisionedToAccount operation. +type ListPermissionSetsProvisionedToAccountAPIClient interface { + ListPermissionSetsProvisionedToAccount(context.Context, *ListPermissionSetsProvisionedToAccountInput, ...func(*Options)) (*ListPermissionSetsProvisionedToAccountOutput, error) +} + +var _ ListPermissionSetsProvisionedToAccountAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissionSetsProvisionedToAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListTagsForResource.go index 08c5bd43..ea8ec7d7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListTagsForResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListTagsForResource.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -36,9 +35,8 @@ type ListTagsForResourceInput struct { ResourceArn *string // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. InstanceArn *string // The pagination token for the list API. Initially the value is null. Use the @@ -85,25 +83,25 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -118,13 +116,19 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -142,14 +146,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -202,6 +198,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +220,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListTrustedTokenIssuers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListTrustedTokenIssuers.go index 48f13483..3b8ec425 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListTrustedTokenIssuers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ListTrustedTokenIssuers.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -95,25 +94,25 @@ func (c *Client) addOperationListTrustedTokenIssuersMiddlewares(stack *middlewar if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -128,13 +127,19 @@ func (c *Client) addOperationListTrustedTokenIssuersMiddlewares(stack *middlewar if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTrustedTokenIssuersValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrustedTokenIssuers(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -152,14 +157,6 @@ func (c *Client) addOperationListTrustedTokenIssuersMiddlewares(stack *middlewar return nil } -// ListTrustedTokenIssuersAPIClient is a client that implements the -// ListTrustedTokenIssuers operation. -type ListTrustedTokenIssuersAPIClient interface { - ListTrustedTokenIssuers(context.Context, *ListTrustedTokenIssuersInput, ...func(*Options)) (*ListTrustedTokenIssuersOutput, error) -} - -var _ ListTrustedTokenIssuersAPIClient = (*Client)(nil) - // ListTrustedTokenIssuersPaginatorOptions is the paginator options for // ListTrustedTokenIssuers type ListTrustedTokenIssuersPaginatorOptions struct { @@ -231,6 +228,9 @@ func (p *ListTrustedTokenIssuersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrustedTokenIssuers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +250,14 @@ func (p *ListTrustedTokenIssuersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListTrustedTokenIssuersAPIClient is a client that implements the +// ListTrustedTokenIssuers operation. +type ListTrustedTokenIssuersAPIClient interface { + ListTrustedTokenIssuers(context.Context, *ListTrustedTokenIssuersInput, ...func(*Options)) (*ListTrustedTokenIssuersOutput, error) +} + +var _ ListTrustedTokenIssuersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrustedTokenIssuers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ProvisionPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ProvisionPermissionSet.go index 8a843530..3a189f73 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ProvisionPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_ProvisionPermissionSet.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -32,9 +31,8 @@ func (c *Client) ProvisionPermissionSet(ctx context.Context, params *ProvisionPe type ProvisionPermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -89,25 +87,25 @@ func (c *Client) addOperationProvisionPermissionSetMiddlewares(stack *middleware if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -122,13 +120,19 @@ func (c *Client) addOperationProvisionPermissionSetMiddlewares(stack *middleware if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpProvisionPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opProvisionPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAccessScope.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAccessScope.go index 7b45bc61..166b01b5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAccessScope.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAccessScope.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -78,25 +77,25 @@ func (c *Client) addOperationPutApplicationAccessScopeMiddlewares(stack *middlew if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -111,13 +110,19 @@ func (c *Client) addOperationPutApplicationAccessScopeMiddlewares(stack *middlew if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutApplicationAccessScopeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutApplicationAccessScope(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAssignmentConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAssignmentConfiguration.go index 0bb14a57..a5422b6a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAssignmentConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAssignmentConfiguration.go @@ -6,17 +6,18 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Configure how users gain access to an application. If AssignmentsRequired is // true (default value), users don’t have access to the application unless an -// assignment is created using the CreateApplicationAssignment API (https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_CreateApplicationAssignment.html) -// . If false , all users have access to the application. If an assignment is -// created using CreateApplicationAssignment (https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_CreateApplicationAssignment.html) -// ., the user retains access if AssignmentsRequired is set to true . +// assignment is created using the [CreateApplicationAssignment API]. If false , all users have access to the +// application. If an assignment is created using [CreateApplicationAssignment]., the user retains access if +// AssignmentsRequired is set to true . +// +// [CreateApplicationAssignment API]: https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_CreateApplicationAssignment.html +// [CreateApplicationAssignment]: https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_CreateApplicationAssignment.html func (c *Client) PutApplicationAssignmentConfiguration(ctx context.Context, params *PutApplicationAssignmentConfigurationInput, optFns ...func(*Options)) (*PutApplicationAssignmentConfigurationOutput, error) { if params == nil { params = &PutApplicationAssignmentConfigurationInput{} @@ -34,17 +35,17 @@ func (c *Client) PutApplicationAssignmentConfiguration(ctx context.Context, para type PutApplicationAssignmentConfigurationInput struct { - // Specifies the ARN of the application. For more information about ARNs, see - // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the - // Amazon Web Services General Reference. + // Specifies the ARN of the application. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in + // the Amazon Web Services General Reference. // // This member is required. ApplicationArn *string // If AssignmentsRequired is true (default value), users don’t have access to the - // application unless an assignment is created using the - // CreateApplicationAssignment API (https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_CreateApplicationAssignment.html) - // . If false , all users have access to the application. + // application unless an assignment is created using the [CreateApplicationAssignment API]. If false , all users + // have access to the application. + // + // [CreateApplicationAssignment API]: https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_CreateApplicationAssignment.html // // This member is required. AssignmentRequired *bool @@ -81,25 +82,25 @@ func (c *Client) addOperationPutApplicationAssignmentConfigurationMiddlewares(st if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +115,19 @@ func (c *Client) addOperationPutApplicationAssignmentConfigurationMiddlewares(st if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutApplicationAssignmentConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutApplicationAssignmentConfiguration(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAuthenticationMethod.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAuthenticationMethod.go index ba769187..ef898616 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAuthenticationMethod.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationAuthenticationMethod.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -80,25 +79,25 @@ func (c *Client) addOperationPutApplicationAuthenticationMethodMiddlewares(stack if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +112,19 @@ func (c *Client) addOperationPutApplicationAuthenticationMethodMiddlewares(stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutApplicationAuthenticationMethodValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutApplicationAuthenticationMethod(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationGrant.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationGrant.go index 61f104b6..b1053106 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationGrant.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutApplicationGrant.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -77,25 +76,25 @@ func (c *Client) addOperationPutApplicationGrantMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +109,19 @@ func (c *Client) addOperationPutApplicationGrantMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutApplicationGrantValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutApplicationGrant(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutInlinePolicyToPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutInlinePolicyToPermissionSet.go index 6215194d..025c66da 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutInlinePolicyToPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutInlinePolicyToPermissionSet.go @@ -6,14 +6,14 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Attaches an inline policy to a permission set. If the permission set is already -// referenced by one or more account assignments, you will need to call -// ProvisionPermissionSet after this action to apply the corresponding IAM policy +// Attaches an inline policy to a permission set. +// +// If the permission set is already referenced by one or more account assignments, +// you will need to call ProvisionPermissionSetafter this action to apply the corresponding IAM policy // updates to all assigned accounts. func (c *Client) PutInlinePolicyToPermissionSet(ctx context.Context, params *PutInlinePolicyToPermissionSetInput, optFns ...func(*Options)) (*PutInlinePolicyToPermissionSetOutput, error) { if params == nil { @@ -32,15 +32,14 @@ func (c *Client) PutInlinePolicyToPermissionSet(ctx context.Context, params *Put type PutInlinePolicyToPermissionSetInput struct { - // The inline policy to attach to a PermissionSet . + // The inline policy to attach to a PermissionSet. // // This member is required. InlinePolicy *string // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -82,25 +81,25 @@ func (c *Client) addOperationPutInlinePolicyToPermissionSetMiddlewares(stack *mi if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -115,13 +114,19 @@ func (c *Client) addOperationPutInlinePolicyToPermissionSetMiddlewares(stack *mi if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutInlinePolicyToPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutInlinePolicyToPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutPermissionsBoundaryToPermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutPermissionsBoundaryToPermissionSet.go index ac6937f8..b4ca0732 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutPermissionsBoundaryToPermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_PutPermissionsBoundaryToPermissionSet.go @@ -6,14 +6,13 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Attaches an Amazon Web Services managed or customer managed policy to the -// specified PermissionSet as a permissions boundary. +// specified PermissionSetas a permissions boundary. func (c *Client) PutPermissionsBoundaryToPermissionSet(ctx context.Context, params *PutPermissionsBoundaryToPermissionSetInput, optFns ...func(*Options)) (*PutPermissionsBoundaryToPermissionSetOutput, error) { if params == nil { params = &PutPermissionsBoundaryToPermissionSetInput{} @@ -79,25 +78,25 @@ func (c *Client) addOperationPutPermissionsBoundaryToPermissionSetMiddlewares(st if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -112,13 +111,19 @@ func (c *Client) addOperationPutPermissionsBoundaryToPermissionSetMiddlewares(st if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPermissionsBoundaryToPermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutPermissionsBoundaryToPermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_TagResource.go index d7bd5bc3..42c337ed 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_TagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_TagResource.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -41,9 +40,8 @@ type TagResourceInput struct { Tags []types.Tag // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. InstanceArn *string noSmithyDocumentSerde @@ -78,25 +76,25 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -111,13 +109,19 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UntagResource.go index 917224fa..19ff59f1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UntagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UntagResource.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -40,9 +39,8 @@ type UntagResourceInput struct { TagKeys []string // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. InstanceArn *string noSmithyDocumentSerde @@ -77,25 +75,25 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -110,13 +108,19 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateApplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateApplication.go index 653958a9..02b3316c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateApplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateApplication.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -30,9 +29,8 @@ func (c *Client) UpdateApplication(ctx context.Context, params *UpdateApplicatio type UpdateApplicationInput struct { - // Specifies the ARN of the application. For more information about ARNs, see - // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the - // Amazon Web Services General Reference. + // Specifies the ARN of the application. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in + // the Amazon Web Services General Reference. // // This member is required. ApplicationArn *string @@ -82,25 +80,25 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -115,13 +113,19 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateApplication(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateInstance.go index 5d236685..8b6520b5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateInstance.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -31,8 +30,7 @@ func (c *Client) UpdateInstance(ctx context.Context, params *UpdateInstanceInput type UpdateInstanceInput struct { // The ARN of the instance of IAM Identity Center under which the operation will - // run. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General + // run. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services General // Reference. // // This member is required. @@ -75,25 +73,25 @@ func (c *Client) addOperationUpdateInstanceMiddlewares(stack *middleware.Stack, if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -108,13 +106,19 @@ func (c *Client) addOperationUpdateInstanceMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInstanceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateInstance(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateInstanceAccessControlAttributeConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateInstanceAccessControlAttributeConfiguration.go index 9df8a6dc..51635111 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateInstanceAccessControlAttributeConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateInstanceAccessControlAttributeConfiguration.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -19,8 +18,7 @@ import ( // attributes from the IAM Identity Center identity store. If a SAML assertion // passes any of these attributes, IAM Identity Center replaces the attribute value // with the value from the IAM Identity Center identity store. For more information -// about ABAC, see Attribute-Based Access Control in the IAM Identity Center User -// Guide. +// about ABAC, see Attribute-Based Access Controlin the IAM Identity Center User Guide. func (c *Client) UpdateInstanceAccessControlAttributeConfiguration(ctx context.Context, params *UpdateInstanceAccessControlAttributeConfigurationInput, optFns ...func(*Options)) (*UpdateInstanceAccessControlAttributeConfigurationOutput, error) { if params == nil { params = &UpdateInstanceAccessControlAttributeConfigurationInput{} @@ -81,25 +79,25 @@ func (c *Client) addOperationUpdateInstanceAccessControlAttributeConfigurationMi if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -114,13 +112,19 @@ func (c *Client) addOperationUpdateInstanceAccessControlAttributeConfigurationMi if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInstanceAccessControlAttributeConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateInstanceAccessControlAttributeConfiguration(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdatePermissionSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdatePermissionSet.go index 6acf34d2..b80c3a25 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdatePermissionSet.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdatePermissionSet.go @@ -6,7 +6,6 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -30,9 +29,8 @@ func (c *Client) UpdatePermissionSet(ctx context.Context, params *UpdatePermissi type UpdatePermissionSetInput struct { // The ARN of the IAM Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. // // This member is required. InstanceArn *string @@ -42,7 +40,7 @@ type UpdatePermissionSetInput struct { // This member is required. PermissionSetArn *string - // The description of the PermissionSet . + // The description of the PermissionSet. Description *string // Used to redirect users within the application during the federation @@ -85,25 +83,25 @@ func (c *Client) addOperationUpdatePermissionSetMiddlewares(stack *middleware.St if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -118,13 +116,19 @@ func (c *Client) addOperationUpdatePermissionSetMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePermissionSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePermissionSet(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateTrustedTokenIssuer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateTrustedTokenIssuer.go index b78ec0f4..dcd3a3ff 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateTrustedTokenIssuer.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/api_op_UpdateTrustedTokenIssuer.go @@ -6,16 +6,16 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ssoadmin/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the name of the trusted token issuer, or the path of a source attribute -// or destination attribute for a trusted token issuer configuration. Updating this -// trusted token issuer configuration might cause users to lose access to any -// applications that are configured to use the trusted token issuer. +// or destination attribute for a trusted token issuer configuration. +// +// Updating this trusted token issuer configuration might cause users to lose +// access to any applications that are configured to use the trusted token issuer. func (c *Client) UpdateTrustedTokenIssuer(ctx context.Context, params *UpdateTrustedTokenIssuerInput, optFns ...func(*Options)) (*UpdateTrustedTokenIssuerOutput, error) { if params == nil { params = &UpdateTrustedTokenIssuerInput{} @@ -80,25 +80,25 @@ func (c *Client) addOperationUpdateTrustedTokenIssuerMiddlewares(stack *middlewa if err = addSetLoggerMiddleware(stack, options); err != nil { return err } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + if err = addClientRequestID(stack); err != nil { return err } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetryMiddlewares(stack, options); err != nil { + if err = addRetry(stack, options); err != nil { return err } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + if err = addRawResponseToMetadata(stack); err != nil { return err } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { @@ -113,13 +113,19 @@ func (c *Client) addOperationUpdateTrustedTokenIssuerMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrustedTokenIssuerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTrustedTokenIssuer(options.Region), middleware.Before); err != nil { return err } - if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/auth.go index d8b20b19..adc19d33 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/auth.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { params.Region = options.Region } @@ -52,6 +52,34 @@ 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 { @@ -62,12 +90,12 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(params, input, options) + bindAuthParamsRegion(ctx, params, input, options) return params } @@ -117,10 +145,10 @@ func (*resolveAuthSchemeMiddleware) ID() string { 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) + params := bindAuthResolverParams(ctx, 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: %v", err) + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) } scheme, ok := m.selectScheme(options) @@ -200,7 +228,7 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) if err != nil { - return out, metadata, fmt.Errorf("get identity: %v", err) + return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) @@ -249,7 +277,7 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar } if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { - return out, metadata, fmt.Errorf("sign request: %v", err) + 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/ssoadmin/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/deserializers.go index 02e624cd..39208ede 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/deserializers.go @@ -20,8 +20,17 @@ import ( "io" "io/ioutil" "strings" + "time" ) +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + type awsAwsjson11_deserializeOpAttachCustomerManagedPolicyReferenceToPermissionSet struct { } @@ -90,9 +99,6 @@ func awsAwsjson11_deserializeOpErrorAttachCustomerManagedPolicyReferenceToPermis errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -100,7 +106,7 @@ func awsAwsjson11_deserializeOpErrorAttachCustomerManagedPolicyReferenceToPermis body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -112,13 +118,12 @@ func awsAwsjson11_deserializeOpErrorAttachCustomerManagedPolicyReferenceToPermis } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -219,9 +224,6 @@ func awsAwsjson11_deserializeOpErrorAttachManagedPolicyToPermissionSet(response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -229,7 +231,7 @@ func awsAwsjson11_deserializeOpErrorAttachManagedPolicyToPermissionSet(response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -241,13 +243,12 @@ func awsAwsjson11_deserializeOpErrorAttachManagedPolicyToPermissionSet(response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -348,9 +349,6 @@ func awsAwsjson11_deserializeOpErrorCreateAccountAssignment(response *smithyhttp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -358,7 +356,7 @@ func awsAwsjson11_deserializeOpErrorCreateAccountAssignment(response *smithyhttp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -370,13 +368,12 @@ func awsAwsjson11_deserializeOpErrorCreateAccountAssignment(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -477,9 +474,6 @@ func awsAwsjson11_deserializeOpErrorCreateApplication(response *smithyhttp.Respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -487,7 +481,7 @@ func awsAwsjson11_deserializeOpErrorCreateApplication(response *smithyhttp.Respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -499,13 +493,12 @@ func awsAwsjson11_deserializeOpErrorCreateApplication(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -606,9 +599,6 @@ func awsAwsjson11_deserializeOpErrorCreateApplicationAssignment(response *smithy errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -616,7 +606,7 @@ func awsAwsjson11_deserializeOpErrorCreateApplicationAssignment(response *smithy body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -628,13 +618,12 @@ func awsAwsjson11_deserializeOpErrorCreateApplicationAssignment(response *smithy } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -735,9 +724,6 @@ func awsAwsjson11_deserializeOpErrorCreateInstance(response *smithyhttp.Response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -745,7 +731,7 @@ func awsAwsjson11_deserializeOpErrorCreateInstance(response *smithyhttp.Response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -757,13 +743,12 @@ func awsAwsjson11_deserializeOpErrorCreateInstance(response *smithyhttp.Response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -861,9 +846,6 @@ func awsAwsjson11_deserializeOpErrorCreateInstanceAccessControlAttributeConfigur errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -871,7 +853,7 @@ func awsAwsjson11_deserializeOpErrorCreateInstanceAccessControlAttributeConfigur body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -883,13 +865,12 @@ func awsAwsjson11_deserializeOpErrorCreateInstanceAccessControlAttributeConfigur } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -987,9 +968,6 @@ func awsAwsjson11_deserializeOpErrorCreatePermissionSet(response *smithyhttp.Res errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -997,7 +975,7 @@ func awsAwsjson11_deserializeOpErrorCreatePermissionSet(response *smithyhttp.Res body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1009,13 +987,12 @@ func awsAwsjson11_deserializeOpErrorCreatePermissionSet(response *smithyhttp.Res } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1116,9 +1093,6 @@ func awsAwsjson11_deserializeOpErrorCreateTrustedTokenIssuer(response *smithyhtt errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1126,7 +1100,7 @@ func awsAwsjson11_deserializeOpErrorCreateTrustedTokenIssuer(response *smithyhtt body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1138,13 +1112,12 @@ func awsAwsjson11_deserializeOpErrorCreateTrustedTokenIssuer(response *smithyhtt } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1242,9 +1215,6 @@ func awsAwsjson11_deserializeOpErrorDeleteAccountAssignment(response *smithyhttp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1252,7 +1222,7 @@ func awsAwsjson11_deserializeOpErrorDeleteAccountAssignment(response *smithyhttp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1264,13 +1234,12 @@ func awsAwsjson11_deserializeOpErrorDeleteAccountAssignment(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1368,9 +1337,6 @@ func awsAwsjson11_deserializeOpErrorDeleteApplication(response *smithyhttp.Respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1378,7 +1344,7 @@ func awsAwsjson11_deserializeOpErrorDeleteApplication(response *smithyhttp.Respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1390,13 +1356,12 @@ func awsAwsjson11_deserializeOpErrorDeleteApplication(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1472,9 +1437,6 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationAccessScope(response *smith errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1482,7 +1444,7 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationAccessScope(response *smith body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1494,13 +1456,12 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationAccessScope(response *smith } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1598,9 +1559,6 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationAssignment(response *smithy errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1608,7 +1566,7 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationAssignment(response *smithy body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1620,13 +1578,12 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationAssignment(response *smithy } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1702,9 +1659,6 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationAuthenticationMethod(respon errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1712,7 +1666,7 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationAuthenticationMethod(respon body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1724,13 +1678,12 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationAuthenticationMethod(respon } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1806,9 +1759,6 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationGrant(response *smithyhttp. errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1816,7 +1766,7 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationGrant(response *smithyhttp. body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1828,13 +1778,12 @@ func awsAwsjson11_deserializeOpErrorDeleteApplicationGrant(response *smithyhttp. } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -1932,9 +1881,6 @@ func awsAwsjson11_deserializeOpErrorDeleteInlinePolicyFromPermissionSet(response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1942,7 +1888,7 @@ func awsAwsjson11_deserializeOpErrorDeleteInlinePolicyFromPermissionSet(response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1954,13 +1900,12 @@ func awsAwsjson11_deserializeOpErrorDeleteInlinePolicyFromPermissionSet(response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2058,9 +2003,6 @@ func awsAwsjson11_deserializeOpErrorDeleteInstance(response *smithyhttp.Response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2068,7 +2010,7 @@ func awsAwsjson11_deserializeOpErrorDeleteInstance(response *smithyhttp.Response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2080,13 +2022,12 @@ func awsAwsjson11_deserializeOpErrorDeleteInstance(response *smithyhttp.Response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2181,9 +2122,6 @@ func awsAwsjson11_deserializeOpErrorDeleteInstanceAccessControlAttributeConfigur errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2191,7 +2129,7 @@ func awsAwsjson11_deserializeOpErrorDeleteInstanceAccessControlAttributeConfigur body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2203,13 +2141,12 @@ func awsAwsjson11_deserializeOpErrorDeleteInstanceAccessControlAttributeConfigur } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2307,9 +2244,6 @@ func awsAwsjson11_deserializeOpErrorDeletePermissionsBoundaryFromPermissionSet(r errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2317,7 +2251,7 @@ func awsAwsjson11_deserializeOpErrorDeletePermissionsBoundaryFromPermissionSet(r body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2329,13 +2263,12 @@ func awsAwsjson11_deserializeOpErrorDeletePermissionsBoundaryFromPermissionSet(r } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2433,9 +2366,6 @@ func awsAwsjson11_deserializeOpErrorDeletePermissionSet(response *smithyhttp.Res errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2443,7 +2373,7 @@ func awsAwsjson11_deserializeOpErrorDeletePermissionSet(response *smithyhttp.Res body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2455,13 +2385,12 @@ func awsAwsjson11_deserializeOpErrorDeletePermissionSet(response *smithyhttp.Res } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2559,9 +2488,6 @@ func awsAwsjson11_deserializeOpErrorDeleteTrustedTokenIssuer(response *smithyhtt errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2569,7 +2495,7 @@ func awsAwsjson11_deserializeOpErrorDeleteTrustedTokenIssuer(response *smithyhtt body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2581,13 +2507,12 @@ func awsAwsjson11_deserializeOpErrorDeleteTrustedTokenIssuer(response *smithyhtt } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2685,9 +2610,6 @@ func awsAwsjson11_deserializeOpErrorDescribeAccountAssignmentCreationStatus(resp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2695,7 +2617,7 @@ func awsAwsjson11_deserializeOpErrorDescribeAccountAssignmentCreationStatus(resp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2707,13 +2629,12 @@ func awsAwsjson11_deserializeOpErrorDescribeAccountAssignmentCreationStatus(resp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2808,9 +2729,6 @@ func awsAwsjson11_deserializeOpErrorDescribeAccountAssignmentDeletionStatus(resp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2818,7 +2736,7 @@ func awsAwsjson11_deserializeOpErrorDescribeAccountAssignmentDeletionStatus(resp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2830,13 +2748,12 @@ func awsAwsjson11_deserializeOpErrorDescribeAccountAssignmentDeletionStatus(resp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -2931,9 +2848,6 @@ func awsAwsjson11_deserializeOpErrorDescribeApplication(response *smithyhttp.Res errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2941,7 +2855,7 @@ func awsAwsjson11_deserializeOpErrorDescribeApplication(response *smithyhttp.Res body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2953,13 +2867,12 @@ func awsAwsjson11_deserializeOpErrorDescribeApplication(response *smithyhttp.Res } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -3054,9 +2967,6 @@ func awsAwsjson11_deserializeOpErrorDescribeApplicationAssignment(response *smit errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3064,7 +2974,7 @@ func awsAwsjson11_deserializeOpErrorDescribeApplicationAssignment(response *smit body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3076,13 +2986,12 @@ func awsAwsjson11_deserializeOpErrorDescribeApplicationAssignment(response *smit } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -3177,9 +3086,6 @@ func awsAwsjson11_deserializeOpErrorDescribeApplicationProvider(response *smithy errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3187,7 +3093,7 @@ func awsAwsjson11_deserializeOpErrorDescribeApplicationProvider(response *smithy body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3199,13 +3105,12 @@ func awsAwsjson11_deserializeOpErrorDescribeApplicationProvider(response *smithy } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -3300,9 +3205,6 @@ func awsAwsjson11_deserializeOpErrorDescribeInstance(response *smithyhttp.Respon errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3310,7 +3212,7 @@ func awsAwsjson11_deserializeOpErrorDescribeInstance(response *smithyhttp.Respon body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3322,13 +3224,12 @@ func awsAwsjson11_deserializeOpErrorDescribeInstance(response *smithyhttp.Respon } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -3420,9 +3321,6 @@ func awsAwsjson11_deserializeOpErrorDescribeInstanceAccessControlAttributeConfig errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3430,7 +3328,7 @@ func awsAwsjson11_deserializeOpErrorDescribeInstanceAccessControlAttributeConfig body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3442,13 +3340,12 @@ func awsAwsjson11_deserializeOpErrorDescribeInstanceAccessControlAttributeConfig } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -3543,9 +3440,6 @@ func awsAwsjson11_deserializeOpErrorDescribePermissionSet(response *smithyhttp.R errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3553,7 +3447,7 @@ func awsAwsjson11_deserializeOpErrorDescribePermissionSet(response *smithyhttp.R body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3565,13 +3459,12 @@ func awsAwsjson11_deserializeOpErrorDescribePermissionSet(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -3666,9 +3559,6 @@ func awsAwsjson11_deserializeOpErrorDescribePermissionSetProvisioningStatus(resp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3676,7 +3566,7 @@ func awsAwsjson11_deserializeOpErrorDescribePermissionSetProvisioningStatus(resp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3688,13 +3578,12 @@ func awsAwsjson11_deserializeOpErrorDescribePermissionSetProvisioningStatus(resp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -3789,9 +3678,6 @@ func awsAwsjson11_deserializeOpErrorDescribeTrustedTokenIssuer(response *smithyh errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3799,7 +3685,7 @@ func awsAwsjson11_deserializeOpErrorDescribeTrustedTokenIssuer(response *smithyh body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3811,13 +3697,12 @@ func awsAwsjson11_deserializeOpErrorDescribeTrustedTokenIssuer(response *smithyh } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -3912,9 +3797,6 @@ func awsAwsjson11_deserializeOpErrorDetachCustomerManagedPolicyReferenceFromPerm errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -3922,7 +3804,7 @@ func awsAwsjson11_deserializeOpErrorDetachCustomerManagedPolicyReferenceFromPerm body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3934,13 +3816,12 @@ func awsAwsjson11_deserializeOpErrorDetachCustomerManagedPolicyReferenceFromPerm } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -4038,9 +3919,6 @@ func awsAwsjson11_deserializeOpErrorDetachManagedPolicyFromPermissionSet(respons errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4048,7 +3926,7 @@ func awsAwsjson11_deserializeOpErrorDetachManagedPolicyFromPermissionSet(respons body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4060,13 +3938,12 @@ func awsAwsjson11_deserializeOpErrorDetachManagedPolicyFromPermissionSet(respons } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -4164,9 +4041,6 @@ func awsAwsjson11_deserializeOpErrorGetApplicationAccessScope(response *smithyht errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4174,7 +4048,7 @@ func awsAwsjson11_deserializeOpErrorGetApplicationAccessScope(response *smithyht body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4186,13 +4060,12 @@ func awsAwsjson11_deserializeOpErrorGetApplicationAccessScope(response *smithyht } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -4287,9 +4160,6 @@ func awsAwsjson11_deserializeOpErrorGetApplicationAssignmentConfiguration(respon errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4297,7 +4167,7 @@ func awsAwsjson11_deserializeOpErrorGetApplicationAssignmentConfiguration(respon body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4309,13 +4179,12 @@ func awsAwsjson11_deserializeOpErrorGetApplicationAssignmentConfiguration(respon } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -4410,9 +4279,6 @@ func awsAwsjson11_deserializeOpErrorGetApplicationAuthenticationMethod(response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4420,7 +4286,7 @@ func awsAwsjson11_deserializeOpErrorGetApplicationAuthenticationMethod(response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4432,13 +4298,12 @@ func awsAwsjson11_deserializeOpErrorGetApplicationAuthenticationMethod(response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -4533,9 +4398,6 @@ func awsAwsjson11_deserializeOpErrorGetApplicationGrant(response *smithyhttp.Res errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4543,7 +4405,7 @@ func awsAwsjson11_deserializeOpErrorGetApplicationGrant(response *smithyhttp.Res body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4555,13 +4417,12 @@ func awsAwsjson11_deserializeOpErrorGetApplicationGrant(response *smithyhttp.Res } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -4656,9 +4517,6 @@ func awsAwsjson11_deserializeOpErrorGetInlinePolicyForPermissionSet(response *sm errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4666,7 +4524,7 @@ func awsAwsjson11_deserializeOpErrorGetInlinePolicyForPermissionSet(response *sm body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4678,13 +4536,12 @@ func awsAwsjson11_deserializeOpErrorGetInlinePolicyForPermissionSet(response *sm } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -4779,9 +4636,6 @@ func awsAwsjson11_deserializeOpErrorGetPermissionsBoundaryForPermissionSet(respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4789,7 +4643,7 @@ func awsAwsjson11_deserializeOpErrorGetPermissionsBoundaryForPermissionSet(respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4801,13 +4655,12 @@ func awsAwsjson11_deserializeOpErrorGetPermissionsBoundaryForPermissionSet(respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -4902,9 +4755,6 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignmentCreationStatus(response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4912,7 +4762,7 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignmentCreationStatus(response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4924,13 +4774,12 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignmentCreationStatus(response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -5025,9 +4874,6 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignmentDeletionStatus(response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5035,7 +4881,7 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignmentDeletionStatus(response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5047,13 +4893,12 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignmentDeletionStatus(response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -5148,9 +4993,6 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignments(response *smithyhttp. errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5158,7 +5000,7 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignments(response *smithyhttp. body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5170,13 +5012,12 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignments(response *smithyhttp. } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -5271,9 +5112,6 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignmentsForPrincipal(response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5281,7 +5119,7 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignmentsForPrincipal(response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5293,13 +5131,12 @@ func awsAwsjson11_deserializeOpErrorListAccountAssignmentsForPrincipal(response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -5394,9 +5231,6 @@ func awsAwsjson11_deserializeOpErrorListAccountsForProvisionedPermissionSet(resp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5404,7 +5238,7 @@ func awsAwsjson11_deserializeOpErrorListAccountsForProvisionedPermissionSet(resp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5416,13 +5250,12 @@ func awsAwsjson11_deserializeOpErrorListAccountsForProvisionedPermissionSet(resp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -5517,9 +5350,6 @@ func awsAwsjson11_deserializeOpErrorListApplicationAccessScopes(response *smithy errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5527,7 +5357,7 @@ func awsAwsjson11_deserializeOpErrorListApplicationAccessScopes(response *smithy body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5539,13 +5369,12 @@ func awsAwsjson11_deserializeOpErrorListApplicationAccessScopes(response *smithy } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -5640,9 +5469,6 @@ func awsAwsjson11_deserializeOpErrorListApplicationAssignments(response *smithyh errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5650,7 +5476,7 @@ func awsAwsjson11_deserializeOpErrorListApplicationAssignments(response *smithyh body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5662,13 +5488,12 @@ func awsAwsjson11_deserializeOpErrorListApplicationAssignments(response *smithyh } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -5763,9 +5588,6 @@ func awsAwsjson11_deserializeOpErrorListApplicationAssignmentsForPrincipal(respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5773,7 +5595,7 @@ func awsAwsjson11_deserializeOpErrorListApplicationAssignmentsForPrincipal(respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5785,13 +5607,12 @@ func awsAwsjson11_deserializeOpErrorListApplicationAssignmentsForPrincipal(respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -5886,9 +5707,6 @@ func awsAwsjson11_deserializeOpErrorListApplicationAuthenticationMethods(respons errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5896,7 +5714,7 @@ func awsAwsjson11_deserializeOpErrorListApplicationAuthenticationMethods(respons body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5908,13 +5726,12 @@ func awsAwsjson11_deserializeOpErrorListApplicationAuthenticationMethods(respons } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -6009,9 +5826,6 @@ func awsAwsjson11_deserializeOpErrorListApplicationGrants(response *smithyhttp.R errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6019,7 +5833,7 @@ func awsAwsjson11_deserializeOpErrorListApplicationGrants(response *smithyhttp.R body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6031,13 +5845,12 @@ func awsAwsjson11_deserializeOpErrorListApplicationGrants(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -6132,9 +5945,6 @@ func awsAwsjson11_deserializeOpErrorListApplicationProviders(response *smithyhtt errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6142,7 +5952,7 @@ func awsAwsjson11_deserializeOpErrorListApplicationProviders(response *smithyhtt body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6154,13 +5964,12 @@ func awsAwsjson11_deserializeOpErrorListApplicationProviders(response *smithyhtt } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -6252,9 +6061,6 @@ func awsAwsjson11_deserializeOpErrorListApplications(response *smithyhttp.Respon errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6262,7 +6068,7 @@ func awsAwsjson11_deserializeOpErrorListApplications(response *smithyhttp.Respon body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6274,13 +6080,12 @@ func awsAwsjson11_deserializeOpErrorListApplications(response *smithyhttp.Respon } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -6372,9 +6177,6 @@ func awsAwsjson11_deserializeOpErrorListCustomerManagedPolicyReferencesInPermiss errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6382,7 +6184,7 @@ func awsAwsjson11_deserializeOpErrorListCustomerManagedPolicyReferencesInPermiss body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6394,13 +6196,12 @@ func awsAwsjson11_deserializeOpErrorListCustomerManagedPolicyReferencesInPermiss } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -6495,9 +6296,6 @@ func awsAwsjson11_deserializeOpErrorListInstances(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6505,7 +6303,7 @@ func awsAwsjson11_deserializeOpErrorListInstances(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6517,13 +6315,12 @@ func awsAwsjson11_deserializeOpErrorListInstances(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -6615,9 +6412,6 @@ func awsAwsjson11_deserializeOpErrorListManagedPoliciesInPermissionSet(response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6625,7 +6419,7 @@ func awsAwsjson11_deserializeOpErrorListManagedPoliciesInPermissionSet(response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6637,13 +6431,12 @@ func awsAwsjson11_deserializeOpErrorListManagedPoliciesInPermissionSet(response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -6738,9 +6531,6 @@ func awsAwsjson11_deserializeOpErrorListPermissionSetProvisioningStatus(response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6748,7 +6538,7 @@ func awsAwsjson11_deserializeOpErrorListPermissionSetProvisioningStatus(response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6760,13 +6550,12 @@ func awsAwsjson11_deserializeOpErrorListPermissionSetProvisioningStatus(response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -6861,9 +6650,6 @@ func awsAwsjson11_deserializeOpErrorListPermissionSets(response *smithyhttp.Resp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6871,7 +6657,7 @@ func awsAwsjson11_deserializeOpErrorListPermissionSets(response *smithyhttp.Resp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6883,13 +6669,12 @@ func awsAwsjson11_deserializeOpErrorListPermissionSets(response *smithyhttp.Resp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -6984,9 +6769,6 @@ func awsAwsjson11_deserializeOpErrorListPermissionSetsProvisionedToAccount(respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6994,7 +6776,7 @@ func awsAwsjson11_deserializeOpErrorListPermissionSetsProvisionedToAccount(respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7006,13 +6788,12 @@ func awsAwsjson11_deserializeOpErrorListPermissionSetsProvisionedToAccount(respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -7107,9 +6888,6 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7117,7 +6895,7 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7129,13 +6907,12 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -7230,9 +7007,6 @@ func awsAwsjson11_deserializeOpErrorListTrustedTokenIssuers(response *smithyhttp errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7240,7 +7014,7 @@ func awsAwsjson11_deserializeOpErrorListTrustedTokenIssuers(response *smithyhttp body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7252,13 +7026,12 @@ func awsAwsjson11_deserializeOpErrorListTrustedTokenIssuers(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -7350,9 +7123,6 @@ func awsAwsjson11_deserializeOpErrorProvisionPermissionSet(response *smithyhttp. errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7360,7 +7130,7 @@ func awsAwsjson11_deserializeOpErrorProvisionPermissionSet(response *smithyhttp. body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7372,13 +7142,12 @@ func awsAwsjson11_deserializeOpErrorProvisionPermissionSet(response *smithyhttp. } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -7454,9 +7223,6 @@ func awsAwsjson11_deserializeOpErrorPutApplicationAccessScope(response *smithyht errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7464,7 +7230,7 @@ func awsAwsjson11_deserializeOpErrorPutApplicationAccessScope(response *smithyht body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7476,13 +7242,12 @@ func awsAwsjson11_deserializeOpErrorPutApplicationAccessScope(response *smithyht } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -7580,9 +7345,6 @@ func awsAwsjson11_deserializeOpErrorPutApplicationAssignmentConfiguration(respon errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7590,7 +7352,7 @@ func awsAwsjson11_deserializeOpErrorPutApplicationAssignmentConfiguration(respon body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7602,13 +7364,12 @@ func awsAwsjson11_deserializeOpErrorPutApplicationAssignmentConfiguration(respon } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -7684,9 +7445,6 @@ func awsAwsjson11_deserializeOpErrorPutApplicationAuthenticationMethod(response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7694,7 +7452,7 @@ func awsAwsjson11_deserializeOpErrorPutApplicationAuthenticationMethod(response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7706,13 +7464,12 @@ func awsAwsjson11_deserializeOpErrorPutApplicationAuthenticationMethod(response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -7788,9 +7545,6 @@ func awsAwsjson11_deserializeOpErrorPutApplicationGrant(response *smithyhttp.Res errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7798,7 +7552,7 @@ func awsAwsjson11_deserializeOpErrorPutApplicationGrant(response *smithyhttp.Res body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7810,13 +7564,12 @@ func awsAwsjson11_deserializeOpErrorPutApplicationGrant(response *smithyhttp.Res } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -7914,9 +7667,6 @@ func awsAwsjson11_deserializeOpErrorPutInlinePolicyToPermissionSet(response *smi errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7924,7 +7674,7 @@ func awsAwsjson11_deserializeOpErrorPutInlinePolicyToPermissionSet(response *smi body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7936,13 +7686,12 @@ func awsAwsjson11_deserializeOpErrorPutInlinePolicyToPermissionSet(response *smi } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -8043,9 +7792,6 @@ func awsAwsjson11_deserializeOpErrorPutPermissionsBoundaryToPermissionSet(respon errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8053,7 +7799,7 @@ func awsAwsjson11_deserializeOpErrorPutPermissionsBoundaryToPermissionSet(respon body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8065,13 +7811,12 @@ func awsAwsjson11_deserializeOpErrorPutPermissionsBoundaryToPermissionSet(respon } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -8169,9 +7914,6 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8179,7 +7921,7 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8191,13 +7933,12 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -8298,9 +8039,6 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8308,7 +8046,7 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8320,13 +8058,12 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -8424,9 +8161,6 @@ func awsAwsjson11_deserializeOpErrorUpdateApplication(response *smithyhttp.Respo errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8434,7 +8168,7 @@ func awsAwsjson11_deserializeOpErrorUpdateApplication(response *smithyhttp.Respo body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8446,13 +8180,12 @@ func awsAwsjson11_deserializeOpErrorUpdateApplication(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -8550,9 +8283,6 @@ func awsAwsjson11_deserializeOpErrorUpdateInstance(response *smithyhttp.Response errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8560,7 +8290,7 @@ func awsAwsjson11_deserializeOpErrorUpdateInstance(response *smithyhttp.Response body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8572,13 +8302,12 @@ func awsAwsjson11_deserializeOpErrorUpdateInstance(response *smithyhttp.Response } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -8673,9 +8402,6 @@ func awsAwsjson11_deserializeOpErrorUpdateInstanceAccessControlAttributeConfigur errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8683,7 +8409,7 @@ func awsAwsjson11_deserializeOpErrorUpdateInstanceAccessControlAttributeConfigur body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8695,13 +8421,12 @@ func awsAwsjson11_deserializeOpErrorUpdateInstanceAccessControlAttributeConfigur } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -8799,9 +8524,6 @@ func awsAwsjson11_deserializeOpErrorUpdatePermissionSet(response *smithyhttp.Res errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8809,7 +8531,7 @@ func awsAwsjson11_deserializeOpErrorUpdatePermissionSet(response *smithyhttp.Res body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8821,13 +8543,12 @@ func awsAwsjson11_deserializeOpErrorUpdatePermissionSet(response *smithyhttp.Res } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -8925,9 +8646,6 @@ func awsAwsjson11_deserializeOpErrorUpdateTrustedTokenIssuer(response *smithyhtt errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8935,7 +8653,7 @@ func awsAwsjson11_deserializeOpErrorUpdateTrustedTokenIssuer(response *smithyhtt body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8947,13 +8665,12 @@ func awsAwsjson11_deserializeOpErrorUpdateTrustedTokenIssuer(response *smithyhtt } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) } - if len(message) != 0 { - errorMessage = message + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message } - switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) @@ -15224,3 +14941,32 @@ func awsAwsjson11_deserializeOpDocumentUpdateTrustedTokenIssuerOutput(v **Update *v = sv return nil } + +type protocolErrorInfo struct { + Type string `json:"__type"` + Message string + Code any // nonstandard for awsjson but some services do present the type here +} + +func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) { + var errInfo protocolErrorInfo + if err := decoder.Decode(&errInfo); err != nil { + if err == io.EOF { + return errInfo, nil + } + return errInfo, err + } + + return errInfo, nil +} + +func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) { + if len(headerType) != 0 { + return headerType, true + } else if len(bodyInfo.Type) != 0 { + return bodyInfo.Type, true + } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 { + return code, true + } + return "", false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/doc.go index 84afe08f..c978c7a8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/doc.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/doc.go @@ -7,19 +7,26 @@ // connect, your workforce identities and manage their access centrally across // Amazon Web Services accounts and applications. IAM Identity Center is the // recommended approach for workforce authentication and authorization in Amazon -// Web Services, for organizations of any size and type. IAM Identity Center uses -// the sso and identitystore API namespaces. This reference guide provides -// information on single sign-on operations which could be used for access -// management of Amazon Web Services accounts. For information about IAM Identity -// Center features, see the IAM Identity Center User Guide (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) -// . Many operations in the IAM Identity Center APIs rely on identifiers for users +// Web Services, for organizations of any size and type. +// +// IAM Identity Center uses the sso and identitystore API namespaces. +// +// This reference guide provides information on single sign-on operations which +// could be used for access management of Amazon Web Services accounts. For +// information about IAM Identity Center features, see the [IAM Identity Center User Guide]. +// +// Many operations in the IAM Identity Center APIs rely on identifiers for users // and groups, known as principals. For more information about how to work with -// principals and principal IDs in IAM Identity Center, see the Identity Store API -// Reference (https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/welcome.html) -// . Amazon Web Services provides SDKs that consist of libraries and sample code -// for various programming languages and platforms (Java, Ruby, .Net, iOS, Android, -// and more). The SDKs provide a convenient way to create programmatic access to -// IAM Identity Center and other Amazon Web Services services. For more information +// principals and principal IDs in IAM Identity Center, see the [Identity Store API Reference]. +// +// Amazon Web Services provides SDKs that consist of libraries and sample code for +// various programming languages and platforms (Java, Ruby, .Net, iOS, Android, and +// more). The SDKs provide a convenient way to create programmatic access to IAM +// Identity Center and other Amazon Web Services services. For more information // about the Amazon Web Services SDKs, including how to download and install them, -// see Tools for Amazon Web Services (http://aws.amazon.com/tools/) . +// see [Tools for Amazon Web Services]. +// +// [IAM Identity Center User Guide]: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html +// [Tools for Amazon Web Services]: http://aws.amazon.com/tools/ +// [Identity Store API Reference]: https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/welcome.html package ssoadmin diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/endpoints.go index 97ab01ad..d5e217d2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/endpoints.go @@ -216,6 +216,13 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) { } } +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 { @@ -281,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, @@ -458,10 +476,10 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} - params.Region = aws.String(endpoints.MapFIPSRegion(options.Region)) + 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 @@ -488,6 +506,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return next.HandleFinalize(ctx, in) } + if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { + return out, metadata, fmt.Errorf("invalid accountID set: %w", err) + } + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -497,7 +519,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(getOperationInput(ctx), m.options) + params := bindEndpointParams(ctx, 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) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/generated.json index 5d44de93..f82f5400 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/generated.json @@ -3,8 +3,7 @@ "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", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", @@ -98,6 +97,7 @@ "options.go", "protocol_test.go", "serializers.go", + "snapshot_test.go", "types/enums.go", "types/errors.go", "types/types.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/go_module_metadata.go index 07d4b3e4..10f9c8ff 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/go_module_metadata.go @@ -3,4 +3,4 @@ package ssoadmin // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.22.1" +const goModuleVersion = "1.27.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/internal/endpoints/endpoints.go index 0cc54bc2..d7e5e393 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/internal/endpoints/endpoints.go @@ -157,6 +157,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -166,9 +169,15 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, @@ -181,6 +190,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, @@ -193,6 +205,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "il-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/options.go index 05d5b28e..f1847d41 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/options.go @@ -24,6 +24,9 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error + // Indicates how aws account ID is applied in endpoint2.0 routing + AccountIDEndpointMode aws.AccountIDEndpointMode + // The optional application specific identifier appended to the User-Agent header. AppID string @@ -50,8 +53,10 @@ type Options struct { // 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. + // 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 @@ -74,19 +79,20 @@ type Options struct { // 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. 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. 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. + // 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. + // 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 @@ -103,8 +109,9 @@ type Options struct { // 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. + // 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 @@ -149,6 +156,7 @@ func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { // 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) { @@ -217,7 +225,7 @@ func WithSigV4SigningRegion(region string) func(*Options) { } func ignoreAnonymousAuth(options *Options) { - if _, ok := options.Credentials.(aws.AnonymousCredentials); ok { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { options.Credentials = nil } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/types/enums.go index a6477501..e1f90f8e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/types/enums.go @@ -11,8 +11,9 @@ const ( ) // Values returns all known values for ApplicationStatus. 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. +// 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 (ApplicationStatus) Values() []ApplicationStatus { return []ApplicationStatus{ "ENABLED", @@ -29,8 +30,9 @@ const ( ) // Values returns all known values for ApplicationVisibility. 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. +// 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 (ApplicationVisibility) Values() []ApplicationVisibility { return []ApplicationVisibility{ "ENABLED", @@ -47,6 +49,7 @@ const ( // Values returns all known values for AuthenticationMethodType. 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 (AuthenticationMethodType) Values() []AuthenticationMethodType { return []AuthenticationMethodType{ @@ -63,8 +66,9 @@ const ( ) // Values returns all known values for FederationProtocol. 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. +// 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 (FederationProtocol) Values() []FederationProtocol { return []FederationProtocol{ "SAML", @@ -83,8 +87,9 @@ const ( ) // Values returns all known values for GrantType. 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. +// 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 (GrantType) Values() []GrantType { return []GrantType{ "authorization_code", @@ -105,8 +110,9 @@ const ( // Values returns all known values for // InstanceAccessControlAttributeConfigurationStatus. 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. +// 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 (InstanceAccessControlAttributeConfigurationStatus) Values() []InstanceAccessControlAttributeConfigurationStatus { return []InstanceAccessControlAttributeConfigurationStatus{ "ENABLED", @@ -125,8 +131,9 @@ const ( ) // Values returns all known values for InstanceStatus. 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. +// 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 (InstanceStatus) Values() []InstanceStatus { return []InstanceStatus{ "CREATE_IN_PROGRESS", @@ -143,8 +150,9 @@ const ( ) // Values returns all known values for JwksRetrievalOption. 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. +// 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 (JwksRetrievalOption) Values() []JwksRetrievalOption { return []JwksRetrievalOption{ "OPEN_ID_DISCOVERY", @@ -160,8 +168,9 @@ const ( ) // Values returns all known values for PrincipalType. 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. +// 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 (PrincipalType) Values() []PrincipalType { return []PrincipalType{ "USER", @@ -178,8 +187,9 @@ const ( ) // Values returns all known values for ProvisioningStatus. 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. +// 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 (ProvisioningStatus) Values() []ProvisioningStatus { return []ProvisioningStatus{ "LATEST_PERMISSION_SET_PROVISIONED", @@ -196,8 +206,9 @@ const ( ) // Values returns all known values for ProvisionTargetType. 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. +// 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 (ProvisionTargetType) Values() []ProvisionTargetType { return []ProvisionTargetType{ "AWS_ACCOUNT", @@ -214,8 +225,9 @@ const ( ) // Values returns all known values for SignInOrigin. 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. +// 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 (SignInOrigin) Values() []SignInOrigin { return []SignInOrigin{ "IDENTITY_CENTER", @@ -233,8 +245,9 @@ const ( ) // Values returns all known values for StatusValues. 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. +// 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 (StatusValues) Values() []StatusValues { return []StatusValues{ "IN_PROGRESS", @@ -251,8 +264,9 @@ const ( ) // Values returns all known values for TargetType. 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. +// 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 (TargetType) Values() []TargetType { return []TargetType{ "AWS_ACCOUNT", @@ -267,8 +281,9 @@ const ( ) // Values returns all known values for TrustedTokenIssuerType. 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. +// 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 (TrustedTokenIssuerType) Values() []TrustedTokenIssuerType { return []TrustedTokenIssuerType{ "OIDC_JWT", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/types/types.go index b62f438b..dd38d65f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssoadmin/types/types.go @@ -32,8 +32,9 @@ type AccessControlAttribute struct { } // The value used for mapping a specified attribute to an identity source. For -// more information, see Attribute mappings (https://docs.aws.amazon.com/singlesignon/latest/userguide/attributemappingsconcept.html) -// in the IAM Identity Center User Guide. +// more information, see [Attribute mappings]in the IAM Identity Center User Guide. +// +// [Attribute mappings]: https://docs.aws.amazon.com/singlesignon/latest/userguide/attributemappingsconcept.html type AccessControlAttributeValue struct { // The identity source to use when mapping a specified attribute to IAM Identity @@ -46,22 +47,22 @@ type AccessControlAttributeValue struct { } // The assignment that indicates a principal's limited access to a specified -// Amazon Web Services account with a specified permission set. The term principal -// here refers to a user or group that is defined in IAM Identity Center. +// Amazon Web Services account with a specified permission set. +// +// The term principal here refers to a user or group that is defined in IAM +// Identity Center. type AccountAssignment struct { // The identifier of the Amazon Web Services account. AccountId *string - // The ARN of the permission set. For more information about ARNs, see Amazon - // Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon - // Web Services General Reference. + // The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the + // Amazon Web Services General Reference. PermissionSetArn *string // An identifier for an object in IAM Identity Center, such as a user or group. // PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For - // more information about PrincipalIds in IAM Identity Center, see the IAM - // Identity Center Identity Store API Reference . + // more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API Reference. PrincipalId *string // The entity type for which the assignment will be created. @@ -100,15 +101,13 @@ type AccountAssignmentOperationStatus struct { // The message that contains an error or exception in case of an operation failure. FailureReason *string - // The ARN of the permission set. For more information about ARNs, see Amazon - // Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon - // Web Services General Reference. + // The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the + // Amazon Web Services General Reference. PermissionSetArn *string // An identifier for an object in IAM Identity Center, such as a user or group. // PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For - // more information about PrincipalIds in IAM Identity Center, see the IAM - // Identity Center Identity Store API Reference . + // more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API Reference. PrincipalId *string // The entity type for which the assignment will be created. @@ -246,8 +245,7 @@ type ApplicationProvider struct { type AttachedManagedPolicy struct { // The ARN of the Amazon Web Services managed policy. For more information about - // ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service - // Namespaces in the Amazon Web Services General Reference. + // ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services General Reference. Arn *string // The name of the Amazon Web Services managed policy. @@ -325,9 +323,10 @@ type CustomerManagedPolicyReference struct { Name *string // The path to the IAM policy that you have configured in each account where you - // want to deploy your permission set. The default is / . For more information, see - // Friendly names and paths (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names) + // want to deploy your permission set. The default is / . For more information, see [Friendly names and paths] // in the IAM User Guide. + // + // [Friendly names and paths]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names Path *string noSmithyDocumentSerde @@ -451,9 +450,8 @@ type InstanceMetadata struct { IdentityStoreId *string // The ARN of the Identity Center instance under which the operation will be - // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces in the Amazon Web Services General - // Reference. + // executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services + // General Reference. InstanceArn *string // The name of the Identity Center instance. @@ -585,13 +583,14 @@ type OperationStatusFilter struct { // CustomerManagedPolicyReference to use the name and path of a customer managed // policy, or ManagedPolicyArn to use the ARN of an Amazon Web Services managed // policy. A permissions boundary represents the maximum permissions that any -// policy can grant your role. For more information, see Permissions boundaries -// for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) -// in the IAM User Guide. Policies used as permissions boundaries don't provide -// permissions. You must also attach an IAM 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. +// policy can grant your role. For more information, see [Permissions boundaries for IAM entities]in the IAM User Guide. +// +// Policies used as permissions boundaries don't provide permissions. You must +// also attach an IAM policy to the role. To learn how the effective permissions +// for a role are evaluated, see [IAM JSON policy evaluation logic]in the IAM User Guide. +// +// [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html +// [IAM JSON policy evaluation logic]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html type PermissionsBoundary struct { // Specifies the name and path of a customer managed policy. You must have an IAM @@ -612,15 +611,14 @@ type PermissionSet struct { // The date that the permission set was created. CreatedDate *time.Time - // The description of the PermissionSet . + // The description of the PermissionSet. Description *string // The name of the permission set. Name *string - // The ARN of the permission set. For more information about ARNs, see Amazon - // Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon - // Web Services General Reference. + // The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the + // Amazon Web Services General Reference. PermissionSetArn *string // Used to redirect users within the application during the federation @@ -649,8 +647,7 @@ type PermissionSetProvisioningStatus struct { FailureReason *string // The ARN of the permission set that is being provisioned. For more information - // about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service - // Namespaces in the Amazon Web Services General Reference. + // about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespacesin the Amazon Web Services General Reference. PermissionSetArn *string // The identifier for tracking the request operation that is generated by the @@ -741,8 +738,10 @@ type SignInOptions struct { // This determines how IAM Identity Center navigates the user to the target // application. It can be one of the following values: + // // - APPLICATION : IAM Identity Center redirects the customer to the configured // ApplicationUrl . + // // - IDENTITY_CENTER : IAM Identity Center uses SAML identity-provider initiated // authentication to sign the customer directly into a SAML-based application. // diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md index 053f180b..a77a0a03 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md @@ -1,3 +1,70 @@ +# v1.26.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.4 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.3 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.2 (2024-07-03) + +* No change notes available for this release. + +# v1.26.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.25.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.6 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.5 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.4 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.3 (2024-05-23) + +* No change notes available for this release. + +# v1.24.2 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.1 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.0 (2024-05-10) + +* **Feature**: Updated request parameters for PKCE support. + +# v1.23.5 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + # v1.23.4 (2024-03-29) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go index 8dc643bb..25cd1c04 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go @@ -14,13 +14,16 @@ import ( 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" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" 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" + "sync/atomic" "time" ) @@ -30,6 +33,9 @@ const ServiceAPIVersion = "2019-06-10" // Client provides the API client to make operations call for AWS SSO OIDC. type Client struct { options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 } // New returns an initialized Client based on the functional options. Provide @@ -68,6 +74,8 @@ func New(options Options, optFns ...func(*Options)) *Client { options: options, } + initializeTimeOffsetResolver(client) + return client } @@ -229,15 +237,16 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AccountIDEndpointMode: cfg.AccountIDEndpointMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -441,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -484,6 +517,63 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { + switch mode { + case aws.AccountIDEndpointModeUnset: + case aws.AccountIDEndpointModePreferred: + case aws.AccountIDEndpointModeDisabled: + case aws.AccountIDEndpointModeRequired: + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { + return fmt.Errorf("accountID is required but not set") + } else if ca.Credentials.AccountID == "" { + return fmt.Errorf("accountID is required but not set") + } + // default check in case invalid mode is configured through request config + default: + return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) + } + + return nil +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go index 63f1eeb1..8b829188 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go @@ -32,34 +32,43 @@ func (c *Client) CreateToken(ctx context.Context, params *CreateTokenInput, optF type CreateTokenInput struct { // The unique identifier string for the client or application. This value comes - // from the result of the RegisterClient API. + // from the result of the RegisterClientAPI. // // This member is required. ClientId *string // A secret string generated for the client. This value should come from the - // persisted result of the RegisterClient API. + // persisted result of the RegisterClientAPI. // // This member is required. ClientSecret *string // Supports the following OAuth grant types: Device Code and Refresh Token. // Specify either of the following values, depending on the grant type that you - // want: * Device Code - urn:ietf:params:oauth:grant-type:device_code * Refresh - // Token - refresh_token For information about how to obtain the device code, see - // the StartDeviceAuthorization topic. + // want: + // + // * Device Code - urn:ietf:params:oauth:grant-type:device_code + // + // * Refresh Token - refresh_token + // + // For information about how to obtain the device code, see the StartDeviceAuthorization topic. // // This member is required. GrantType *string // Used only when calling this API for the Authorization Code grant type. The // short-term code is used to identify this authorization request. This grant type - // is currently unsupported for the CreateToken API. + // is currently unsupported for the CreateTokenAPI. Code *string + // Used only when calling this API for the Authorization Code grant type. This + // value is generated by the client and presented to validate the original code + // challenge value the client passed at authorization time. + CodeVerifier *string + // Used only when calling this API for the Device Code grant type. This short-term // code is used to identify this authorization request. This comes from the result - // of the StartDeviceAuthorization API. + // of the StartDeviceAuthorizationAPI. DeviceCode *string // Used only when calling this API for the Authorization Code grant type. This @@ -69,16 +78,18 @@ type CreateTokenInput struct { // Used only when calling this API for the Refresh Token grant type. This token is // used to refresh short-term tokens, such as the access token, that might expire. + // // For more information about the features and limitations of the current IAM // Identity Center OIDC implementation, see Considerations for Using this Guide in - // the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html) - // . + // the [IAM Identity Center OIDC API Reference]. + // + // [IAM Identity Center OIDC API Reference]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html RefreshToken *string // The list of scopes for which authorization is requested. The access token that // is issued is limited to the scopes that are granted. If this value is not // specified, IAM Identity Center authorizes all scopes that are configured for the - // client during the call to RegisterClient . + // client during the call to RegisterClient. Scope []string noSmithyDocumentSerde @@ -86,7 +97,8 @@ type CreateTokenInput struct { type CreateTokenOutput struct { - // A bearer token to access AWS accounts and applications assigned to a user. + // A bearer token to access Amazon Web Services accounts and applications assigned + // to a user. AccessToken *string // Indicates the time in seconds when an access token will expire. @@ -94,18 +106,22 @@ type CreateTokenOutput struct { // The idToken is not implemented or supported. For more information about the // features and limitations of the current IAM Identity Center OIDC implementation, - // see Considerations for Using this Guide in the IAM Identity Center OIDC API - // Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html) - // . A JSON Web Token (JWT) that identifies who is associated with the issued - // access token. + // see Considerations for Using this Guide in the [IAM Identity Center OIDC API Reference]. + // + // A JSON Web Token (JWT) that identifies who is associated with the issued access + // token. + // + // [IAM Identity Center OIDC API Reference]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html IdToken *string // A token that, if present, can be used to refresh a previously issued access - // token that might have expired. For more information about the features and - // limitations of the current IAM Identity Center OIDC implementation, see - // Considerations for Using this Guide in the IAM Identity Center OIDC API - // Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html) - // . + // token that might have expired. + // + // For more information about the features and limitations of the current IAM + // Identity Center OIDC implementation, see Considerations for Using this Guide in + // the [IAM Identity Center OIDC API Reference]. + // + // [IAM Identity Center OIDC API Reference]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html RefreshToken *string // Used to notify the client that the returned token is an access token. The @@ -170,6 +186,12 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTokenValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go index 63409538..af04c251 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go @@ -12,8 +12,8 @@ import ( // Creates and returns access and refresh tokens for clients and applications that // are authenticated using IAM entities. The access token can be used to fetch -// short-term credentials for the assigned AWS accounts or to access application -// APIs using bearer authentication. +// short-term credentials for the assigned Amazon Web Services accounts or to +// access application APIs using bearer authentication. func (c *Client) CreateTokenWithIAM(ctx context.Context, params *CreateTokenWithIAMInput, optFns ...func(*Options)) (*CreateTokenWithIAMOutput, error) { if params == nil { params = &CreateTokenWithIAMInput{} @@ -39,10 +39,15 @@ type CreateTokenWithIAMInput struct { // Supports the following OAuth grant types: Authorization Code, Refresh Token, // JWT Bearer, and Token Exchange. Specify one of the following values, depending - // on the grant type that you want: * Authorization Code - authorization_code * - // Refresh Token - refresh_token * JWT Bearer - - // urn:ietf:params:oauth:grant-type:jwt-bearer * Token Exchange - - // urn:ietf:params:oauth:grant-type:token-exchange + // on the grant type that you want: + // + // * Authorization Code - authorization_code + // + // * Refresh Token - refresh_token + // + // * JWT Bearer - urn:ietf:params:oauth:grant-type:jwt-bearer + // + // * Token Exchange - urn:ietf:params:oauth:grant-type:token-exchange // // This member is required. GrantType *string @@ -59,6 +64,11 @@ type CreateTokenWithIAMInput struct { // in the Authorization Code GrantOptions for the application. Code *string + // Used only when calling this API for the Authorization Code grant type. This + // value is generated by the client and presented to validate the original code + // challenge value the client passed at authorization time. + CodeVerifier *string + // Used only when calling this API for the Authorization Code grant type. This // value specifies the location of the client or application that has registered to // receive the authorization code. @@ -66,16 +76,21 @@ type CreateTokenWithIAMInput struct { // Used only when calling this API for the Refresh Token grant type. This token is // used to refresh short-term tokens, such as the access token, that might expire. + // // For more information about the features and limitations of the current IAM // Identity Center OIDC implementation, see Considerations for Using this Guide in - // the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html) - // . + // the [IAM Identity Center OIDC API Reference]. + // + // [IAM Identity Center OIDC API Reference]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html RefreshToken *string // Used only when calling this API for the Token Exchange grant type. This value // specifies the type of token that the requester can receive. The following values - // are supported: * Access Token - urn:ietf:params:oauth:token-type:access_token * - // Refresh Token - urn:ietf:params:oauth:token-type:refresh_token + // are supported: + // + // * Access Token - urn:ietf:params:oauth:token-type:access_token + // + // * Refresh Token - urn:ietf:params:oauth:token-type:refresh_token RequestedTokenType *string // The list of scopes for which authorization is requested. The access token that @@ -94,8 +109,9 @@ type CreateTokenWithIAMInput struct { // Used only when calling this API for the Token Exchange grant type. This value // specifies the type of token that is passed as the subject of the exchange. The - // following value is supported: * Access Token - - // urn:ietf:params:oauth:token-type:access_token + // following value is supported: + // + // * Access Token - urn:ietf:params:oauth:token-type:access_token SubjectTokenType *string noSmithyDocumentSerde @@ -103,7 +119,8 @@ type CreateTokenWithIAMInput struct { type CreateTokenWithIAMOutput struct { - // A bearer token to access AWS accounts and applications assigned to a user. + // A bearer token to access Amazon Web Services accounts and applications assigned + // to a user. AccessToken *string // Indicates the time in seconds when an access token will expire. @@ -114,17 +131,21 @@ type CreateTokenWithIAMOutput struct { IdToken *string // Indicates the type of tokens that are issued by IAM Identity Center. The - // following values are supported: * Access Token - - // urn:ietf:params:oauth:token-type:access_token * Refresh Token - - // urn:ietf:params:oauth:token-type:refresh_token + // following values are supported: + // + // * Access Token - urn:ietf:params:oauth:token-type:access_token + // + // * Refresh Token - urn:ietf:params:oauth:token-type:refresh_token IssuedTokenType *string // A token that, if present, can be used to refresh a previously issued access - // token that might have expired. For more information about the features and - // limitations of the current IAM Identity Center OIDC implementation, see - // Considerations for Using this Guide in the IAM Identity Center OIDC API - // Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html) - // . + // token that might have expired. + // + // For more information about the features and limitations of the current IAM + // Identity Center OIDC implementation, see Considerations for Using this Guide in + // the [IAM Identity Center OIDC API Reference]. + // + // [IAM Identity Center OIDC API Reference]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html RefreshToken *string // The list of scopes for which authorization is granted. The access token that is @@ -196,6 +217,12 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTokenWithIAMValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go index 09f016ec..d8c766c9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go @@ -41,6 +41,25 @@ type RegisterClientInput struct { // This member is required. ClientType *string + // This IAM Identity Center application ARN is used to define + // administrator-managed configuration for public client access to resources. At + // authorization, the scopes, grants, and redirect URI available to this client + // will be restricted by this application resource. + EntitledApplicationArn *string + + // The list of OAuth 2.0 grant types that are defined by the client. This list is + // used to restrict the token granting flows available to the client. + GrantTypes []string + + // The IAM Identity Center Issuer URL associated with an instance of IAM Identity + // Center. This value is needed for user access to resources through the client. + IssuerUrl *string + + // The list of redirect URI that are defined by the client. At completion of + // authorization, this list is used to restrict what locations the user agent can + // be redirected back to. + RedirectUris []string + // The list of scopes that are defined by the client. Upon authorization, this // list is used to restrict permissions when granting an access token. Scopes []string @@ -128,6 +147,12 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterClientValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go index c568805b..7c2b38ba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go @@ -30,22 +30,23 @@ func (c *Client) StartDeviceAuthorization(ctx context.Context, params *StartDevi type StartDeviceAuthorizationInput struct { // The unique identifier string for the client that is registered with IAM - // Identity Center. This value should come from the persisted result of the - // RegisterClient API operation. + // Identity Center. This value should come from the persisted result of the RegisterClientAPI + // operation. // // This member is required. ClientId *string // A secret string that is generated for the client. This value should come from - // the persisted result of the RegisterClient API operation. + // the persisted result of the RegisterClientAPI operation. // // This member is required. ClientSecret *string - // The URL for the Amazon Web Services access portal. For more information, see - // Using the Amazon Web Services access portal (https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html) + // The URL for the Amazon Web Services access portal. For more information, see [Using the Amazon Web Services access portal] // in the IAM Identity Center User Guide. // + // [Using the Amazon Web Services access portal]: https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html + // // This member is required. StartUrl *string @@ -136,6 +137,12 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDeviceAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go index 40b3becb..e6058da8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { params.Region = options.Region } @@ -90,12 +90,12 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(params, input, options) + bindAuthParamsRegion(ctx, params, input, options) return params } @@ -163,7 +163,7 @@ func (*resolveAuthSchemeMiddleware) ID() string { 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) + params := bindAuthResolverParams(ctx, 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) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go index 76a1160e..05e8c6b7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go @@ -13,11 +13,21 @@ import ( 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" "strings" + "time" ) +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + type awsRestjson1_deserializeOpCreateToken struct { } @@ -581,12 +591,18 @@ func awsRestjson1_deserializeOpErrorRegisterClient(response *smithyhttp.Response case strings.EqualFold("InvalidClientMetadataException", errorCode): return awsRestjson1_deserializeErrorInvalidClientMetadataException(response, errorBody) + case strings.EqualFold("InvalidRedirectUriException", errorCode): + return awsRestjson1_deserializeErrorInvalidRedirectUriException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidScopeException", errorCode): return awsRestjson1_deserializeErrorInvalidScopeException(response, errorBody) + case strings.EqualFold("UnsupportedGrantTypeException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedGrantTypeException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1158,6 +1174,42 @@ func awsRestjson1_deserializeErrorInvalidGrantException(response *smithyhttp.Res return output } +func awsRestjson1_deserializeErrorInvalidRedirectUriException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRedirectUriException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + 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 err + } + + err := awsRestjson1_deserializeDocumentInvalidRedirectUriException(&output, shape) + + 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 err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidRequestException{} var buff [1024]byte @@ -1717,6 +1769,55 @@ func awsRestjson1_deserializeDocumentInvalidGrantException(v **types.InvalidGran return nil } +func awsRestjson1_deserializeDocumentInvalidRedirectUriException(v **types.InvalidRedirectUriException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidRedirectUriException + if *v == nil { + sv = &types.InvalidRedirectUriException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Error to be of type string, got %T instead", value) + } + sv.Error_ = ptr.String(jtv) + } + + case "error_description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) + } + sv.Error_description = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go index 53cd4f55..1d258e56 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go @@ -6,33 +6,41 @@ // IAM Identity Center OpenID Connect (OIDC) is a web service that enables a // client (such as CLI or a native application) to register with IAM Identity // Center. The service also enables the client to fetch the user’s access token -// upon successful authentication and authorization with IAM Identity Center. IAM -// Identity Center uses the sso and identitystore API namespaces. Considerations -// for Using This Guide Before you begin using this guide, we recommend that you -// first review the following important information about how the IAM Identity -// Center OIDC service works. +// upon successful authentication and authorization with IAM Identity Center. +// +// IAM Identity Center uses the sso and identitystore API namespaces. +// +// # Considerations for Using This Guide +// +// Before you begin using this guide, we recommend that you first review the +// following important information about how the IAM Identity Center OIDC service +// works. +// // - The IAM Identity Center OIDC service currently implements only the portions -// of the OAuth 2.0 Device Authorization Grant standard ( -// https://tools.ietf.org/html/rfc8628 (https://tools.ietf.org/html/rfc8628) ) -// that are necessary to enable single sign-on authentication with the CLI. +// of the OAuth 2.0 Device Authorization Grant standard ([https://tools.ietf.org/html/rfc8628] ) that are necessary to +// enable single sign-on authentication with the CLI. +// // - With older versions of the CLI, the service only emits OIDC access tokens, // so to obtain a new token, users must explicitly re-authenticate. To access the // OIDC flow that supports token refresh and doesn’t require re-authentication, // update to the latest CLI version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with // support for OIDC token refresh and configurable IAM Identity Center session -// durations. For more information, see Configure Amazon Web Services access -// portal session duration (https://docs.aws.amazon.com/singlesignon/latest/userguide/configure-user-session.html) -// . +// durations. For more information, see [Configure Amazon Web Services access portal session duration]. +// // - The access tokens provided by this service grant access to all Amazon Web // Services account entitlements assigned to an IAM Identity Center user, not just // a particular application. +// // - The documentation in this guide does not describe the mechanism to convert // the access token into Amazon Web Services Auth (“sigv4”) credentials for use // with IAM-protected Amazon Web Services service endpoints. For more information, -// see GetRoleCredentials (https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html) -// in the IAM Identity Center Portal API Reference Guide. +// see [GetRoleCredentials]in the IAM Identity Center Portal API Reference Guide. +// +// For general information about IAM Identity Center, see [What is IAM Identity Center?] in the IAM Identity +// Center User Guide. // -// For general information about IAM Identity Center, see What is IAM Identity -// Center? (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) -// in the IAM Identity Center User Guide. +// [Configure Amazon Web Services access portal session duration]: https://docs.aws.amazon.com/singlesignon/latest/userguide/configure-user-session.html +// [GetRoleCredentials]: https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html +// [https://tools.ietf.org/html/rfc8628]: https://tools.ietf.org/html/rfc8628 +// [What is IAM Identity Center?]: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html package ssooidc diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go index 94e835e7..d7099721 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, @@ -465,7 +476,7 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} params.Region = bindRegion(options.Region) @@ -495,6 +506,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return next.HandleFinalize(ctx, in) } + if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { + return out, metadata, fmt.Errorf("invalid accountID set: %w", err) + } + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -504,7 +519,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(getOperationInput(ctx), m.options) + params := bindEndpointParams(ctx, 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) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go index cbc7e841..b4d573eb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go @@ -3,4 +3,4 @@ package ssooidc // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.23.4" +const goModuleVersion = "1.26.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go index 843edb07..4a29eaa2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go @@ -235,6 +235,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "ca-central-1", }, }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{ + Hostname: "oidc.ca-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-west-1", + }, + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go index b964e7e1..a012e4cb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go @@ -24,6 +24,9 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error + // Indicates how aws account ID is applied in endpoint2.0 routing + AccountIDEndpointMode aws.AccountIDEndpointMode + // The optional application specific identifier appended to the User-Agent header. AppID string @@ -50,8 +53,10 @@ type Options struct { // 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. + // 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 @@ -70,17 +75,20 @@ type Options struct { // 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. + // 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. + // 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 @@ -97,8 +105,9 @@ type Options struct { // 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. + // 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 @@ -143,6 +152,7 @@ func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { // 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) { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go index 754218b7..04411bd6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go @@ -95,6 +95,11 @@ func awsRestjson1_serializeOpDocumentCreateTokenInput(v *CreateTokenInput, value ok.String(*v.Code) } + if v.CodeVerifier != nil { + ok := object.Key("codeVerifier") + ok.String(*v.CodeVerifier) + } + if v.DeviceCode != nil { ok := object.Key("deviceCode") ok.String(*v.DeviceCode) @@ -207,6 +212,11 @@ func awsRestjson1_serializeOpDocumentCreateTokenWithIAMInput(v *CreateTokenWithI ok.String(*v.Code) } + if v.CodeVerifier != nil { + ok := object.Key("codeVerifier") + ok.String(*v.CodeVerifier) + } + if v.GrantType != nil { ok := object.Key("grantType") ok.String(*v.GrantType) @@ -324,6 +334,30 @@ func awsRestjson1_serializeOpDocumentRegisterClientInput(v *RegisterClientInput, ok.String(*v.ClientType) } + if v.EntitledApplicationArn != nil { + ok := object.Key("entitledApplicationArn") + ok.String(*v.EntitledApplicationArn) + } + + if v.GrantTypes != nil { + ok := object.Key("grantTypes") + if err := awsRestjson1_serializeDocumentGrantTypes(v.GrantTypes, ok); err != nil { + return err + } + } + + if v.IssuerUrl != nil { + ok := object.Key("issuerUrl") + ok.String(*v.IssuerUrl) + } + + if v.RedirectUris != nil { + ok := object.Key("redirectUris") + if err := awsRestjson1_serializeDocumentRedirectUris(v.RedirectUris, ok); err != nil { + return err + } + } + if v.Scopes != nil { ok := object.Key("scopes") if err := awsRestjson1_serializeDocumentScopes(v.Scopes, ok); err != nil { @@ -419,6 +453,28 @@ func awsRestjson1_serializeOpDocumentStartDeviceAuthorizationInput(v *StartDevic return nil } +func awsRestjson1_serializeDocumentGrantTypes(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentRedirectUris(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentScopes(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go index 86b62049..2cfe7b48 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go @@ -188,7 +188,7 @@ func (e *InvalidClientMetadataException) ErrorCode() string { func (e *InvalidClientMetadataException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Indicates that a request contains an invalid grant. This can occur if a client -// makes a CreateToken request with an invalid grant type. +// makes a CreateTokenrequest with an invalid grant type. type InvalidGrantException struct { Message *string @@ -217,6 +217,36 @@ func (e *InvalidGrantException) ErrorCode() string { } func (e *InvalidGrantException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// Indicates that one or more redirect URI in the request is not supported for +// this operation. +type InvalidRedirectUriException struct { + Message *string + + ErrorCodeOverride *string + + Error_ *string + Error_description *string + + noSmithyDocumentSerde +} + +func (e *InvalidRedirectUriException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidRedirectUriException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidRedirectUriException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidRedirectUriException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidRedirectUriException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Indicates that something is wrong with the input to the request. For example, a // required parameter might be missing or out of range. type InvalidRequestException struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index 2fd5d5a6..845847de 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,66 @@ +# v1.30.5 (2024-08-22) + +* No change notes available for this release. + +# v1.30.4 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.29.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.13 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.12 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.11 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.10 (2024-05-23) + +* No change notes available for this release. + +# v1.28.9 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.8 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.7 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + # v1.28.6 (2024-03-29) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go index 4d18dc86..acd2b8e7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go @@ -15,15 +15,18 @@ import ( 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" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding" presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url" smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" 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" + "sync/atomic" "time" ) @@ -34,6 +37,9 @@ const ServiceAPIVersion = "2011-06-15" // Service. type Client struct { options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 } // New returns an initialized Client based on the functional options. Provide @@ -72,6 +78,8 @@ func New(options Options, optFns ...func(*Options)) *Client { options: options, } + initializeTimeOffsetResolver(client) + return client } @@ -233,15 +241,16 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AccountIDEndpointMode: cfg.AccountIDEndpointMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -445,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -488,6 +521,63 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { + switch mode { + case aws.AccountIDEndpointModeUnset: + case aws.AccountIDEndpointModePreferred: + case aws.AccountIDEndpointModeDisabled: + case aws.AccountIDEndpointModeRequired: + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { + return fmt.Errorf("accountID is required but not set") + } else if ca.Credentials.AccountID == "" { + return fmt.Errorf("accountID is required but not set") + } + // default check in case invalid mode is configured through request config + default: + return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) + } + + return nil +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go index e0e2c9c2..e74fc8ba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go @@ -16,69 +16,99 @@ import ( // Amazon Web Services resources. These temporary credentials consist of an access // key ID, a secret access key, and a security token. Typically, you use AssumeRole // within your account or for cross-account access. For a comparison of AssumeRole -// with other API operations that produce temporary credentials, see Requesting -// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) -// in the IAM User Guide. Permissions The temporary security credentials created by -// AssumeRole can be used to make API calls to any Amazon Web Services service -// with the following exception: You cannot call the Amazon Web Services STS -// GetFederationToken or GetSessionToken API operations. (Optional) You can pass -// inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policy Amazon -// Resource Names (ARNs) to use as managed session policies. The plaintext that you -// use for both inline and managed session policies can't exceed 2,048 characters. -// Passing policies to this operation returns new temporary credentials. The -// resulting session's permissions are the intersection of the role's -// identity-based policy and the session policies. You can use the role's temporary -// credentials in subsequent Amazon Web Services API calls to access resources in -// the account that owns the role. You cannot use session policies to grant more -// permissions than those allowed by the identity-based policy of the role that is -// being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// in the IAM User Guide. When you create a role, you create two policies: a role -// trust policy that specifies who can assume the role, and a permissions policy -// that specifies what can be done with the role. You specify the trusted principal -// that is allowed to assume the role in the role trust policy. To assume a role -// from a different account, your Amazon Web Services account must be trusted by -// the role. The trust relationship is defined in the role's trust policy when the -// role is created. That trust policy states which accounts are allowed to delegate -// that access to users in the account. A user who wants to access a role in a -// different account must also have permissions that are delegated from the account -// administrator. The administrator must attach a policy that allows the user to -// call AssumeRole for the ARN of the role in the other account. To allow a user -// to assume a role in the same account, you can do either of the following: +// with other API operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the +// IAM User Guide. +// +// # Permissions +// +// The temporary security credentials created by AssumeRole can be used to make +// API calls to any Amazon Web Services service with the following exception: You +// cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken +// API operations. +// +// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a +// single JSON policy document to use as an inline session policy. You can also +// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed +// session policies. The plaintext that you use for both inline and managed session +// policies can't exceed 2,048 characters. Passing policies to this operation +// returns new temporary credentials. The resulting session's permissions are the +// intersection of the role's identity-based policy and the session policies. You +// can use the role's temporary credentials in subsequent Amazon Web Services API +// calls to access resources in the account that owns the role. You cannot use +// session policies to grant more permissions than those allowed by the +// identity-based policy of the role that is being assumed. For more information, +// see [Session Policies]in the IAM User Guide. +// +// When you create a role, you create two policies: a role trust policy that +// specifies who can assume the role, and a permissions policy that specifies what +// can be done with the role. You specify the trusted principal that is allowed to +// assume the role in the role trust policy. +// +// To assume a role from a different account, your Amazon Web Services account +// must be trusted by the role. The trust relationship is defined in the role's +// trust policy when the role is created. That trust policy states which accounts +// are allowed to delegate that access to users in the account. +// +// A user who wants to access a role in a different account must also have +// permissions that are delegated from the account administrator. The administrator +// must attach a policy that allows the user to call AssumeRole for the ARN of the +// role in the other account. +// +// To allow a user to assume a role in the same account, you can do either of the +// following: +// // - Attach a policy to the user that allows the user to call AssumeRole (as long // as the role's trust policy trusts the account). +// // - Add the user as a principal directly in the role's trust policy. // // You can do either because the role’s trust policy acts as an IAM resource-based // policy. When a resource-based policy grants access to a principal in the same // account, no additional identity-based policy is required. For more information -// about trust policies and resource-based policies, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) -// in the IAM User Guide. Tags (Optional) You can pass tag key-value pairs to your -// session. These tags are called session tags. For more information about session -// tags, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) -// in the IAM User Guide. An administrator must grant you the permissions necessary -// to pass session tags. The administrator can also create granular permissions to -// allow you to pass only specific session tags. For more information, see -// Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) -// in the IAM User Guide. You can set the session tags as transitive. Transitive -// tags persist during role chaining. For more information, see Chaining Roles -// with Session Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) -// in the IAM User Guide. Using MFA with AssumeRole (Optional) You can include -// multi-factor authentication (MFA) information when you call AssumeRole . This is -// useful for cross-account scenarios to ensure that the user that assumes the role -// has been authenticated with an Amazon Web Services MFA device. In that scenario, -// the trust policy of the role being assumed includes a condition that tests for -// MFA authentication. If the caller does not include valid MFA information, the -// request to assume the role is denied. The condition in a trust policy that tests -// for MFA authentication might look like the following example. "Condition": -// {"Bool": {"aws:MultiFactorAuthPresent": true}} For more information, see -// Configuring MFA-Protected API Access (https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html) -// in the IAM User Guide guide. To use MFA with AssumeRole , you pass values for -// the SerialNumber and TokenCode parameters. The SerialNumber value identifies -// the user's hardware or virtual MFA device. The TokenCode is the time-based -// one-time password (TOTP) that the MFA device produces. +// about trust policies and resource-based policies, see [IAM Policies]in the IAM User Guide. +// +// # Tags +// +// (Optional) You can pass tag key-value pairs to your session. These tags are +// called session tags. For more information about session tags, see [Passing Session Tags in STS]in the IAM +// User Guide. +// +// An administrator must grant you the permissions necessary to pass session tags. +// The administrator can also create granular permissions to allow you to pass only +// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide. +// +// You can set the session tags as transitive. Transitive tags persist during role +// chaining. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide. +// +// # Using MFA with AssumeRole +// +// (Optional) You can include multi-factor authentication (MFA) information when +// you call AssumeRole . This is useful for cross-account scenarios to ensure that +// the user that assumes the role has been authenticated with an Amazon Web +// Services MFA device. In that scenario, the trust policy of the role being +// assumed includes a condition that tests for MFA authentication. If the caller +// does not include valid MFA information, the request to assume the role is +// denied. The condition in a trust policy that tests for MFA authentication might +// look like the following example. +// +// "Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}} +// +// For more information, see [Configuring MFA-Protected API Access] in the IAM User Guide guide. +// +// To use MFA with AssumeRole , you pass values for the SerialNumber and TokenCode +// parameters. The SerialNumber value identifies the user's hardware or virtual +// MFA device. The TokenCode is the time-based one-time password (TOTP) that the +// MFA device produces. +// +// [Configuring MFA-Protected API Access]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html +// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session +// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html +// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining +// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison +// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session +// [IAM Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html +// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html func (c *Client) AssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*Options)) (*AssumeRoleOutput, error) { if params == nil { params = &AssumeRoleInput{} @@ -101,17 +131,19 @@ type AssumeRoleInput struct { // This member is required. RoleArn *string - // An identifier for the assumed role session. Use the role session name to - // uniquely identify a session when the same role is assumed by different - // principals or for different reasons. In cross-account scenarios, the role - // session name is visible to, and can be logged by the account that owns the role. - // The role session name is also used in the ARN of the assumed role principal. - // This means that subsequent cross-account API requests that use the temporary - // security credentials will expose the role session name to the external account - // in their CloudTrail logs. The regex used to validate this parameter is a string - // of characters consisting of upper- and lower-case alphanumeric characters with - // no spaces. You can also include underscores or any of the following characters: - // =,.@- + // An identifier for the assumed role session. + // + // Use the role session name to uniquely identify a session when the same role is + // assumed by different principals or for different reasons. In cross-account + // scenarios, the role session name is visible to, and can be logged by the account + // that owns the role. The role session name is also used in the ARN of the assumed + // role principal. This means that subsequent cross-account API requests that use + // the temporary security credentials will expose the role session name to the + // external account in their CloudTrail logs. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@- // // This member is required. RoleSessionName *string @@ -122,23 +154,27 @@ type AssumeRoleInput struct { // hours. If you specify a value higher than this setting or the administrator // setting (whichever is lower), the operation fails. For example, if you specify a // session duration of 12 hours, but your administrator set the maximum session - // duration to 6 hours, your operation fails. Role chaining limits your Amazon Web - // Services CLI or Amazon Web Services API role session to a maximum of one hour. - // When you use the AssumeRole API operation to assume a role, you can specify the - // duration of your role session with the DurationSeconds parameter. You can - // specify a parameter value of up to 43200 seconds (12 hours), depending on the - // maximum session duration setting for your role. However, if you assume a role - // using role chaining and provide a DurationSeconds parameter value greater than - // one hour, the operation fails. To learn how to view the maximum value for your - // role, see View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) - // in the IAM User Guide. By default, the value is set to 3600 seconds. The - // DurationSeconds parameter is separate from the duration of a console session - // that you might request using the returned credentials. The request to the - // federation endpoint for a console sign-in token takes a SessionDuration + // duration to 6 hours, your operation fails. + // + // Role chaining limits your Amazon Web Services CLI or Amazon Web Services API + // role session to a maximum of one hour. When you use the AssumeRole API + // operation to assume a role, you can specify the duration of your role session + // with the DurationSeconds parameter. You can specify a parameter value of up to + // 43200 seconds (12 hours), depending on the maximum session duration setting for + // your role. However, if you assume a role using role chaining and provide a + // DurationSeconds parameter value greater than one hour, the operation fails. To + // learn how to view the maximum value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. + // + // By default, the value is set to 3600 seconds. + // + // The DurationSeconds parameter is separate from the duration of a console + // session that you might request using the returned credentials. The request to + // the federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more - // information, see Creating a URL that Enables Federated Users to Access the - // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) - // in the IAM User Guide. + // information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide. + // + // [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session + // [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html DurationSeconds *int32 // A unique identifier that might be required when you assume a role in another @@ -149,63 +185,79 @@ type AssumeRoleInput struct { // the administrator of the trusting account might send an external ID to the // administrator of the trusted account. That way, only someone with the ID can // assume the role, rather than everyone in the account. For more information about - // the external ID, see How to Use an External ID When Granting Access to Your - // Amazon Web Services Resources to a Third Party (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) - // in the IAM User Guide. The regex used to validate this parameter is a string of - // characters consisting of upper- and lower-case alphanumeric characters with no - // spaces. You can also include underscores or any of the following characters: - // =,.@:/- + // the external ID, see [How to Use an External ID When Granting Access to Your Amazon Web Services Resources to a Third Party]in the IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@:/- + // + // [How to Use an External ID When Granting Access to Your Amazon Web Services Resources to a Third Party]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html ExternalId *string // An IAM policy in JSON format that you want to use as an inline session policy. + // // This parameter is optional. Passing policies to this operation returns new // temporary credentials. The resulting session's permissions are the intersection // of the role's identity-based policy and the session policies. You can use the // role's temporary credentials in subsequent Amazon Web Services API calls to // access resources in the account that owns the role. You cannot use session // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // in the IAM User Guide. The plaintext that you use for both inline and managed - // session policies can't exceed 2,048 characters. The JSON policy characters can - // be any ASCII character from the space character to the end of the valid - // character list (\u0020 through \u00FF). It can also include the tab (\u0009), - // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed inline session policy, managed policy - // ARNs, and session tags into a packed binary format that has a separate limit. - // Your request can fail for this limit even if your plaintext meets the other - // requirements. The PackedPolicySize response element indicates by percentage how - // close the policies and tags for your request are to the upper size limit. + // policy of the role that is being assumed. For more information, see [Session Policies]in the IAM + // User Guide. + // + // The plaintext that you use for both inline and managed session policies can't + // exceed 2,048 characters. The JSON policy characters can be any ASCII character + // from the space character to the end of the valid character list (\u0020 through + // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage + // return (\u000D) characters. + // + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates + // by percentage how close the policies and tags for your request are to the upper + // size limit. + // + // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to // use as managed session policies. The policies must exist in the same account as - // the role. This parameter is optional. You can provide up to 10 managed policy - // ARNs. However, the plaintext that you use for both inline and managed session - // policies can't exceed 2,048 characters. For more information about ARNs, see - // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed inline session policy, managed policy ARNs, and session - // tags into a packed binary format that has a separate limit. Your request can - // fail for this limit even if your plaintext meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. Passing policies to this - // operation returns new temporary credentials. The resulting session's permissions - // are the intersection of the role's identity-based policy and the session - // policies. You can use the role's temporary credentials in subsequent Amazon Web - // Services API calls to access resources in the account that owns the role. You - // cannot use session policies to grant more permissions than those allowed by the - // identity-based policy of the role that is being assumed. For more information, - // see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // in the IAM User Guide. + // the role. + // + // This parameter is optional. You can provide up to 10 managed policy ARNs. + // However, the plaintext that you use for both inline and managed session policies + // can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the + // Amazon Web Services General Reference. + // + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates + // by percentage how close the policies and tags for your request are to the upper + // size limit. + // + // Passing policies to this operation returns new temporary credentials. The + // resulting session's permissions are the intersection of the role's + // identity-based policy and the session policies. You can use the role's temporary + // credentials in subsequent Amazon Web Services API calls to access resources in + // the account that owns the role. You cannot use session policies to grant more + // permissions than those allowed by the identity-based policy of the role that is + // being assumed. For more information, see [Session Policies]in the IAM User Guide. + // + // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html PolicyArns []types.PolicyDescriptorType // A list of previously acquired trusted context assertions in the format of a // JSON array. The trusted context assertion is signed and encrypted by Amazon Web - // Services STS. The following is an example of a ProvidedContext value that - // includes a single trusted context assertion and the ARN of the context provider - // from which the trusted context assertion was generated. - // [{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}] + // Services STS. + // + // The following is an example of a ProvidedContext value that includes a single + // trusted context assertion and the ARN of the context provider from which the + // trusted context assertion was generated. + // + // [{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}] ProvidedContexts []types.ProvidedContext // The identification number of the MFA device that is associated with the user @@ -213,79 +265,97 @@ type AssumeRoleInput struct { // the role being assumed includes a condition that requires MFA authentication. // The value is either the serial number for a hardware device (such as // GAHT12345678 ) or an Amazon Resource Name (ARN) for a virtual device (such as - // arn:aws:iam::123456789012:mfa/user ). The regex used to validate this parameter - // is a string of characters consisting of upper- and lower-case alphanumeric - // characters with no spaces. You can also include underscores or any of the - // following characters: =,.@- + // arn:aws:iam::123456789012:mfa/user ). + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@- SerialNumber *string // The source identity specified by the principal that is calling the AssumeRole - // operation. You can require users to specify a source identity when they assume a - // role. You do this by using the sts:SourceIdentity condition key in a role trust - // policy. You can use source identity information in CloudTrail logs to determine - // who took actions with a role. You can use the aws:SourceIdentity condition key - // to further control access to Amazon Web Services resources based on the value of - // source identity. For more information about using source identity, see Monitor - // and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) - // in the IAM User Guide. The regex used to validate this parameter is a string of - // characters consisting of upper- and lower-case alphanumeric characters with no - // spaces. You can also include underscores or any of the following characters: - // =,.@-. You cannot use a value that begins with the text aws: . This prefix is - // reserved for Amazon Web Services internal use. + // operation. + // + // You can require users to specify a source identity when they assume a role. You + // do this by using the sts:SourceIdentity condition key in a role trust policy. + // You can use source identity information in CloudTrail logs to determine who took + // actions with a role. You can use the aws:SourceIdentity condition key to + // further control access to Amazon Web Services resources based on the value of + // source identity. For more information about using source identity, see [Monitor and control actions taken with assumed roles]in the + // IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@-. You cannot use a + // value that begins with the text aws: . This prefix is reserved for Amazon Web + // Services internal use. + // + // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html SourceIdentity *string // A list of session tags that you want to pass. Each session tag consists of a - // key name and an associated value. For more information about session tags, see - // Tagging Amazon Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) - // in the IAM User Guide. This parameter is optional. You can pass up to 50 session - // tags. The plaintext session tag keys can’t exceed 128 characters, and the values - // can’t exceed 256 characters. For these and additional limits, see IAM and STS - // Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) - // in the IAM User Guide. An Amazon Web Services conversion compresses the passed - // inline session policy, managed policy ARNs, and session tags into a packed - // binary format that has a separate limit. Your request can fail for this limit - // even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. You can pass a session tag with the - // same key as a tag that is already attached to the role. When you do, session - // tags override a role tag with the same key. Tag key–value pairs are not case - // sensitive, but case is preserved. This means that you cannot have separate - // Department and department tag keys. Assume that the role has the Department = - // Marketing tag and you pass the department = engineering session tag. Department - // and department are not saved as separate tags, and the session tag passed in - // the request takes precedence over the role tag. Additionally, if you used - // temporary credentials to perform this operation, the new session inherits any - // transitive session tags from the calling session. If you pass a session tag with - // the same key as an inherited tag, the operation fails. To view the inherited - // tags for a session, see the CloudTrail logs. For more information, see Viewing - // Session Tags in CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs) + // key name and an associated value. For more information about session tags, see [Tagging Amazon Web Services STS Sessions] // in the IAM User Guide. + // + // This parameter is optional. You can pass up to 50 session tags. The plaintext + // session tag keys can’t exceed 128 characters, and the values can’t exceed 256 + // characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User Guide. + // + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates + // by percentage how close the policies and tags for your request are to the upper + // size limit. + // + // You can pass a session tag with the same key as a tag that is already attached + // to the role. When you do, session tags override a role tag with the same key. + // + // Tag key–value pairs are not case sensitive, but case is preserved. This means + // that you cannot have separate Department and department tag keys. Assume that + // the role has the Department = Marketing tag and you pass the department = + // engineering session tag. Department and department are not saved as separate + // tags, and the session tag passed in the request takes precedence over the role + // tag. + // + // Additionally, if you used temporary credentials to perform this operation, the + // new session inherits any transitive session tags from the calling session. If + // you pass a session tag with the same key as an inherited tag, the operation + // fails. To view the inherited tags for a session, see the CloudTrail logs. For + // more information, see [Viewing Session Tags in CloudTrail]in the IAM User Guide. + // + // [Tagging Amazon Web Services STS Sessions]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html + // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length + // [Viewing Session Tags in CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs Tags []types.Tag // The value provided by the MFA device, if the trust policy of the role being // assumed requires MFA. (In other words, if the policy includes a condition that // tests for MFA). If the role being assumed requires MFA and if the TokenCode // value is missing or expired, the AssumeRole call returns an "access denied" - // error. The format for this parameter, as described by its regex pattern, is a - // sequence of six numeric digits. + // error. + // + // The format for this parameter, as described by its regex pattern, is a sequence + // of six numeric digits. TokenCode *string // A list of keys for session tags that you want to set as transitive. If you set // a tag key as transitive, the corresponding key and value passes to subsequent - // sessions in a role chain. For more information, see Chaining Roles with Session - // Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) - // in the IAM User Guide. This parameter is optional. When you set session tags as - // transitive, the session policy and session tags packed binary limit is not - // affected. If you choose not to specify a transitive tag key, then no tags are - // passed from this session to any subsequent sessions. + // sessions in a role chain. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide. + // + // This parameter is optional. When you set session tags as transitive, the + // session policy and session tags packed binary limit is not affected. + // + // If you choose not to specify a transitive tag key, then no tags are passed from + // this session to any subsequent sessions. + // + // [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining TransitiveTagKeys []string noSmithyDocumentSerde } -// Contains the response to a successful AssumeRole request, including temporary -// Amazon Web Services credentials that can be used to make Amazon Web Services -// requests. +// Contains the response to a successful AssumeRole request, including temporary Amazon Web +// Services credentials that can be used to make Amazon Web Services requests. type AssumeRoleOutput struct { // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers @@ -296,9 +366,10 @@ type AssumeRoleOutput struct { AssumedRoleUser *types.AssumedRoleUser // The temporary security credentials, which include an access key ID, a secret - // access key, and a security (or session) token. The size of the security token - // that STS API operations return is not fixed. We strongly recommend that you make - // no assumptions about the maximum size. + // access key, and a security (or session) token. + // + // The size of the security token that STS API operations return is not fixed. We + // strongly recommend that you make no assumptions about the maximum size. Credentials *types.Credentials // A percentage value that indicates the packed size of the session policies and @@ -308,17 +379,21 @@ type AssumeRoleOutput struct { PackedPolicySize *int32 // The source identity specified by the principal that is calling the AssumeRole - // operation. You can require users to specify a source identity when they assume a - // role. You do this by using the sts:SourceIdentity condition key in a role trust - // policy. You can use source identity information in CloudTrail logs to determine - // who took actions with a role. You can use the aws:SourceIdentity condition key - // to further control access to Amazon Web Services resources based on the value of - // source identity. For more information about using source identity, see Monitor - // and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) - // in the IAM User Guide. The regex used to validate this parameter is a string of - // characters consisting of upper- and lower-case alphanumeric characters with no - // spaces. You can also include underscores or any of the following characters: - // =,.@- + // operation. + // + // You can require users to specify a source identity when they assume a role. You + // do this by using the sts:SourceIdentity condition key in a role trust policy. + // You can use source identity information in CloudTrail logs to determine who took + // actions with a role. You can use the aws:SourceIdentity condition key to + // further control access to Amazon Web Services resources based on the value of + // source identity. For more information about using source identity, see [Monitor and control actions taken with assumed roles]in the + // IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@- + // + // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html SourceIdentity *string // Metadata pertaining to the operation's result. @@ -382,6 +457,12 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssumeRoleValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go index 2a57b72a..4c685abd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go @@ -16,92 +16,132 @@ import ( // mechanism for tying an enterprise identity store or directory to role-based // Amazon Web Services access without user-specific credentials or configuration. // For a comparison of AssumeRoleWithSAML with the other API operations that -// produce temporary credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) -// in the IAM User Guide. The temporary security credentials returned by this -// operation consist of an access key ID, a secret access key, and a security -// token. Applications can use these temporary security credentials to sign calls -// to Amazon Web Services services. Session Duration By default, the temporary -// security credentials created by AssumeRoleWithSAML last for one hour. However, -// you can use the optional DurationSeconds parameter to specify the duration of -// your session. Your role session lasts for the duration that you specify, or -// until the time specified in the SAML authentication response's -// SessionNotOnOrAfter value, whichever is shorter. You can provide a -// DurationSeconds value from 900 seconds (15 minutes) up to the maximum session -// duration setting for the role. This setting can have a value from 1 hour to 12 -// hours. To learn how to view the maximum value for your role, see View the -// Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) -// in the IAM User Guide. The maximum session duration limit applies when you use -// the AssumeRole* API operations or the assume-role* CLI commands. However the -// limit 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. Role chaining (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining) -// limits your CLI or Amazon Web Services API role session to a maximum of one +// produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// +// The temporary security credentials returned by this operation consist of an +// access key ID, a secret access key, and a security token. Applications can use +// these temporary security credentials to sign calls to Amazon Web Services +// services. +// +// # Session Duration +// +// By default, the temporary security credentials created by AssumeRoleWithSAML +// last for one hour. However, you can use the optional DurationSeconds parameter +// to specify the duration of your session. Your role session lasts for the +// duration that you specify, or until the time specified in the SAML +// authentication response's SessionNotOnOrAfter value, whichever is shorter. You +// can provide a DurationSeconds value from 900 seconds (15 minutes) up to the +// maximum session duration setting for the role. This setting can have a value +// from 1 hour to 12 hours. To learn how to view the maximum value for your role, +// see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. The maximum session duration limit applies when you +// use the AssumeRole* API operations or the assume-role* CLI commands. However +// the limit does not apply when you use those operations to create a console URL. +// For more information, see [Using IAM Roles]in the IAM User Guide. +// +// [Role chaining]limits your CLI or Amazon Web Services API role session to a maximum of one // hour. When you use the AssumeRole API operation to assume a role, you can // specify the duration of your role session with the DurationSeconds parameter. // You can specify a parameter value of up to 43200 seconds (12 hours), depending // on the maximum session duration setting for your role. However, if you assume a // role using role chaining and provide a DurationSeconds parameter value greater -// than one hour, the operation fails. Permissions The temporary security -// credentials created by AssumeRoleWithSAML can be used to make API calls to any -// Amazon Web Services service with the following exception: you cannot call the -// STS GetFederationToken or GetSessionToken API operations. (Optional) You can -// pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policy Amazon -// Resource Names (ARNs) to use as managed session policies. The plaintext that you -// use for both inline and managed session policies can't exceed 2,048 characters. -// Passing policies to this operation returns new temporary credentials. The -// resulting session's permissions are the intersection of the role's -// identity-based policy and the session policies. You can use the role's temporary -// credentials in subsequent Amazon Web Services API calls to access resources in -// the account that owns the role. You cannot use session policies to grant more -// permissions than those allowed by the identity-based policy of the role that is -// being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// in the IAM User Guide. Calling AssumeRoleWithSAML does not require the use of -// Amazon Web Services security credentials. The identity of the caller is -// validated by using keys in the metadata document that is uploaded for the SAML -// provider entity for your identity provider. Calling AssumeRoleWithSAML can -// result in an entry in your CloudTrail logs. The entry includes the value in the -// NameID element of the SAML assertion. We recommend that you use a NameIDType -// that is not associated with any personally identifiable information (PII). For -// example, you could instead use the persistent identifier ( -// urn:oasis:names:tc:SAML:2.0:nameid-format:persistent ). Tags (Optional) You can -// configure your IdP to pass attributes into your SAML assertion as session tags. -// Each session tag consists of a key name and an associated value. For more -// information about session tags, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) -// in the IAM User Guide. You can pass up to 50 session tags. The plaintext session -// tag keys can’t exceed 128 characters and the values can’t exceed 256 characters. -// For these and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) -// in the IAM User Guide. An Amazon Web Services conversion compresses the passed -// inline session policy, managed policy ARNs, and session tags into a packed -// binary format that has a separate limit. Your request can fail for this limit -// even if your plaintext meets the other requirements. The PackedPolicySize -// response element indicates by percentage how close the policies and tags for -// your request are to the upper size limit. You can pass a session tag with the -// same key as a tag that is attached to the role. When you do, session tags -// override the role's tags with the same key. An administrator must grant you the -// permissions necessary to pass session tags. The administrator can also create -// granular permissions to allow you to pass only specific session tags. For more -// information, see Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) -// in the IAM User Guide. You can set the session tags as transitive. Transitive -// tags persist during role chaining. For more information, see Chaining Roles -// with Session Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) -// in the IAM User Guide. SAML Configuration Before your application can call -// AssumeRoleWithSAML , you must configure your SAML identity provider (IdP) to -// issue the claims required by Amazon Web Services. Additionally, you must use -// Identity and Access Management (IAM) to create a SAML provider entity in your -// Amazon Web Services account that represents your identity provider. You must -// also create an IAM role that specifies this SAML provider in its trust policy. +// than one hour, the operation fails. +// +// # Permissions +// +// The temporary security credentials created by AssumeRoleWithSAML can be used to +// make API calls to any Amazon Web Services service with the following exception: +// you cannot call the STS GetFederationToken or GetSessionToken API operations. +// +// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a +// single JSON policy document to use as an inline session policy. You can also +// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed +// session policies. The plaintext that you use for both inline and managed session +// policies can't exceed 2,048 characters. Passing policies to this operation +// returns new temporary credentials. The resulting session's permissions are the +// intersection of the role's identity-based policy and the session policies. You +// can use the role's temporary credentials in subsequent Amazon Web Services API +// calls to access resources in the account that owns the role. You cannot use +// session policies to grant more permissions than those allowed by the +// identity-based policy of the role that is being assumed. For more information, +// see [Session Policies]in the IAM User Guide. +// +// Calling AssumeRoleWithSAML does not require the use of Amazon Web Services +// security credentials. The identity of the caller is validated by using keys in +// the metadata document that is uploaded for the SAML provider entity for your +// identity provider. +// +// Calling AssumeRoleWithSAML can result in an entry in your CloudTrail logs. The +// entry includes the value in the NameID element of the SAML assertion. We +// recommend that you use a NameIDType that is not associated with any personally +// identifiable information (PII). For example, you could instead use the +// persistent identifier ( urn:oasis:names:tc:SAML:2.0:nameid-format:persistent ). +// +// # Tags +// +// (Optional) You can configure your IdP to pass attributes into your SAML +// assertion as session tags. Each session tag consists of a key name and an +// associated value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User +// Guide. +// +// You can pass up to 50 session tags. The plaintext session tag keys can’t exceed +// 128 characters and the values can’t exceed 256 characters. For these and +// additional limits, see [IAM and STS Character Limits]in the IAM User Guide. +// +// An Amazon Web Services conversion compresses the passed inline session policy, +// managed policy ARNs, and session tags into a packed binary format that has a +// separate limit. Your request can fail for this limit even if your plaintext +// meets the other requirements. The PackedPolicySize response element indicates +// by percentage how close the policies and tags for your request are to the upper +// size limit. +// +// You can pass a session tag with the same key as a tag that is attached to the +// role. When you do, session tags override the role's tags with the same key. +// +// An administrator must grant you the permissions necessary to pass session tags. +// The administrator can also create granular permissions to allow you to pass only +// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide. +// +// You can set the session tags as transitive. Transitive tags persist during role +// chaining. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide. +// +// # SAML Configuration +// +// Before your application can call AssumeRoleWithSAML , you must configure your +// SAML identity provider (IdP) to issue the claims required by Amazon Web +// Services. Additionally, you must use Identity and Access Management (IAM) to +// create a SAML provider entity in your Amazon Web Services account that +// represents your identity provider. You must also create an IAM role that +// specifies this SAML provider in its trust policy. +// // For more information, see the following resources: -// - About SAML 2.0-based Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) -// in the IAM User Guide. -// - Creating SAML Identity Providers (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html) -// in the IAM User Guide. -// - Configuring a Relying Party and Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html) -// in the IAM User Guide. -// - Creating a Role for SAML 2.0 Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html) -// in the IAM User Guide. +// +// [About SAML 2.0-based Federation] +// - in the IAM User Guide. +// +// [Creating SAML Identity Providers] +// - in the IAM User Guide. +// +// [Configuring a Relying Party and Claims] +// - in the IAM User Guide. +// +// [Creating a Role for SAML 2.0 Federation] +// - in the IAM User Guide. +// +// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session +// [Creating a Role for SAML 2.0 Federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html +// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length +// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison +// [Creating SAML Identity Providers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html +// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session +// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html +// [Configuring a Relying Party and Claims]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html +// [Role chaining]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining +// [Using IAM Roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html +// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session +// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html +// [About SAML 2.0-based Federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html +// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining func (c *Client) AssumeRoleWithSAML(ctx context.Context, params *AssumeRoleWithSAMLInput, optFns ...func(*Options)) (*AssumeRoleWithSAMLOutput, error) { if params == nil { params = &AssumeRoleWithSAMLInput{} @@ -130,9 +170,11 @@ type AssumeRoleWithSAMLInput struct { // This member is required. RoleArn *string - // The base64 encoded SAML authentication response provided by the IdP. For more - // information, see Configuring a Relying Party and Adding Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html) - // in the IAM User Guide. + // The base64 encoded SAML authentication response provided by the IdP. + // + // For more information, see [Configuring a Relying Party and Adding Claims] in the IAM User Guide. + // + // [Configuring a Relying Party and Adding Claims]: https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html // // This member is required. SAMLAssertion *string @@ -146,92 +188,114 @@ type AssumeRoleWithSAMLInput struct { // than this setting, the operation fails. For example, if you specify a session // duration of 12 hours, but your administrator set the maximum session duration to // 6 hours, your operation fails. To learn how to view the maximum value for your - // role, see View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) - // in the IAM User Guide. By default, the value is set to 3600 seconds. The - // DurationSeconds parameter is separate from the duration of a console session - // that you might request using the returned credentials. The request to the - // federation endpoint for a console sign-in token takes a SessionDuration + // role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. + // + // By default, the value is set to 3600 seconds. + // + // The DurationSeconds parameter is separate from the duration of a console + // session that you might request using the returned credentials. The request to + // the federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more - // information, see Creating a URL that Enables Federated Users to Access the - // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) - // in the IAM User Guide. + // information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide. + // + // [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session + // [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html DurationSeconds *int32 // An IAM policy in JSON format that you want to use as an inline session policy. + // // This parameter is optional. Passing policies to this operation returns new // temporary credentials. The resulting session's permissions are the intersection // of the role's identity-based policy and the session policies. You can use the // role's temporary credentials in subsequent Amazon Web Services API calls to // access resources in the account that owns the role. You cannot use session // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // in the IAM User Guide. The plaintext that you use for both inline and managed - // session policies can't exceed 2,048 characters. The JSON policy characters can - // be any ASCII character from the space character to the end of the valid - // character list (\u0020 through \u00FF). It can also include the tab (\u0009), - // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed inline session policy, managed policy - // ARNs, and session tags into a packed binary format that has a separate limit. - // Your request can fail for this limit even if your plaintext meets the other - // requirements. The PackedPolicySize response element indicates by percentage how - // close the policies and tags for your request are to the upper size limit. + // policy of the role that is being assumed. For more information, see [Session Policies]in the IAM + // User Guide. + // + // The plaintext that you use for both inline and managed session policies can't + // exceed 2,048 characters. The JSON policy characters can be any ASCII character + // from the space character to the end of the valid character list (\u0020 through + // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage + // return (\u000D) characters. + // + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates + // by percentage how close the policies and tags for your request are to the upper + // size limit. + // + // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to // use as managed session policies. The policies must exist in the same account as - // the role. This parameter is optional. You can provide up to 10 managed policy - // ARNs. However, the plaintext that you use for both inline and managed session - // policies can't exceed 2,048 characters. For more information about ARNs, see - // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed inline session policy, managed policy ARNs, and session - // tags into a packed binary format that has a separate limit. Your request can - // fail for this limit even if your plaintext meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. Passing policies to this - // operation returns new temporary credentials. The resulting session's permissions - // are the intersection of the role's identity-based policy and the session - // policies. You can use the role's temporary credentials in subsequent Amazon Web - // Services API calls to access resources in the account that owns the role. You - // cannot use session policies to grant more permissions than those allowed by the - // identity-based policy of the role that is being assumed. For more information, - // see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // in the IAM User Guide. + // the role. + // + // This parameter is optional. You can provide up to 10 managed policy ARNs. + // However, the plaintext that you use for both inline and managed session policies + // can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the + // Amazon Web Services General Reference. + // + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates + // by percentage how close the policies and tags for your request are to the upper + // size limit. + // + // Passing policies to this operation returns new temporary credentials. The + // resulting session's permissions are the intersection of the role's + // identity-based policy and the session policies. You can use the role's temporary + // credentials in subsequent Amazon Web Services API calls to access resources in + // the account that owns the role. You cannot use session policies to grant more + // permissions than those allowed by the identity-based policy of the role that is + // being assumed. For more information, see [Session Policies]in the IAM User Guide. + // + // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html PolicyArns []types.PolicyDescriptorType noSmithyDocumentSerde } -// Contains the response to a successful AssumeRoleWithSAML request, including -// temporary Amazon Web Services credentials that can be used to make Amazon Web -// Services requests. +// Contains the response to a successful AssumeRoleWithSAML request, including temporary Amazon Web +// Services credentials that can be used to make Amazon Web Services requests. type AssumeRoleWithSAMLOutput struct { // The identifiers for the temporary security credentials that the operation // returns. AssumedRoleUser *types.AssumedRoleUser - // The value of the Recipient attribute of the SubjectConfirmationData element of + // The value of the Recipient attribute of the SubjectConfirmationData element of // the SAML assertion. Audience *string // The temporary security credentials, which include an access key ID, a secret - // access key, and a security (or session) token. The size of the security token - // that STS API operations return is not fixed. We strongly recommend that you make - // no assumptions about the maximum size. + // access key, and a security (or session) token. + // + // The size of the security token that STS API operations return is not fixed. We + // strongly recommend that you make no assumptions about the maximum size. Credentials *types.Credentials // The value of the Issuer element of the SAML assertion. Issuer *string // A hash value based on the concatenation of the following: + // // - The Issuer response value. + // // - The Amazon Web Services account ID. + // // - The friendly name (the last part of the ARN) of the SAML provider in IAM. + // // The combination of NameQualifier and Subject can be used to uniquely identify a - // user. The following pseudocode shows how the hash value is calculated: BASE64 ( - // SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) ) + // user. + // + // The following pseudocode shows how the hash value is calculated: + // + // BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) ) NameQualifier *string // A percentage value that indicates the packed size of the session policies and @@ -240,31 +304,36 @@ type AssumeRoleWithSAMLOutput struct { // allowed space. PackedPolicySize *int32 - // The value in the SourceIdentity attribute in the SAML assertion. You can - // require users to set a source identity value when they assume a role. You do - // this by using the sts:SourceIdentity condition key in a role trust policy. That - // way, actions that are taken with the role are associated with that user. After - // the source identity is set, the value cannot be changed. It is present in the - // request for all actions that are taken by the role and persists across chained - // role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining) - // sessions. You can configure your SAML identity provider to use an attribute - // associated with your users, like user name or email, as the source identity when - // calling AssumeRoleWithSAML . You do this by adding an attribute to the SAML - // assertion. For more information about using source identity, see Monitor and - // control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) - // in the IAM User Guide. The regex used to validate this parameter is a string of - // characters consisting of upper- and lower-case alphanumeric characters with no - // spaces. You can also include underscores or any of the following characters: - // =,.@- + // The value in the SourceIdentity attribute in the SAML assertion. + // + // You can require users to set a source identity value when they assume a role. + // You do this by using the sts:SourceIdentity condition key in a role trust + // policy. That way, actions that are taken with the role are associated with that + // user. After the source identity is set, the value cannot be changed. It is + // present in the request for all actions that are taken by the role and persists + // across [chained role]sessions. You can configure your SAML identity provider to use an + // attribute associated with your users, like user name or email, as the source + // identity when calling AssumeRoleWithSAML . You do this by adding an attribute to + // the SAML assertion. For more information about using source identity, see [Monitor and control actions taken with assumed roles]in + // the IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@- + // + // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining + // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html SourceIdentity *string // The value of the NameID element in the Subject element of the SAML assertion. Subject *string - // The format of the name ID, as defined by the Format attribute in the NameID + // The format of the name ID, as defined by the Format attribute in the NameID // element of the SAML assertion. Typical examples of the format are transient or - // persistent . If the format includes the prefix - // urn:oasis:names:tc:SAML:2.0:nameid-format , that prefix is removed. For example, + // persistent . + // + // If the format includes the prefix urn:oasis:names:tc:SAML:2.0:nameid-format , + // that prefix is removed. For example, // urn:oasis:names:tc:SAML:2.0:nameid-format:transient is returned as transient . // If the format includes any other prefix, the format is returned with no // modifications. @@ -328,6 +397,12 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssumeRoleWithSAMLValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go index 98108ce6..0b5e5a37 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -14,105 +14,143 @@ import ( // Returns a set of temporary security credentials for users who have been // authenticated in a mobile or web application with a web identity provider. // Example providers include the OAuth 2.0 providers Login with Amazon and -// Facebook, or any OpenID Connect-compatible identity provider such as Google or -// Amazon Cognito federated identities (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html) -// . For mobile applications, we recommend that you use Amazon Cognito. You can use -// Amazon Cognito with the Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/) -// and the Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/) -// to uniquely identify a user. You can also supply the user with a consistent -// identity throughout the lifetime of an application. To learn more about Amazon -// Cognito, see Amazon Cognito identity pools (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html) -// in Amazon Cognito Developer Guide. Calling AssumeRoleWithWebIdentity does not -// require the use of Amazon Web Services security credentials. Therefore, you can -// distribute an application (for example, on mobile devices) that requests -// temporary security credentials without including long-term Amazon Web Services -// credentials in the application. You also don't need to deploy server-based proxy -// services that use long-term Amazon Web Services credentials. Instead, the -// identity of the caller is validated by using a token from the web identity -// provider. For a comparison of AssumeRoleWithWebIdentity with the other API -// operations that produce temporary credentials, see Requesting Temporary -// Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) -// in the IAM User Guide. The temporary security credentials returned by this API -// consist of an access key ID, a secret access key, and a security token. -// Applications can use these temporary security credentials to sign calls to -// Amazon Web Services service API operations. Session Duration By default, the -// temporary security credentials created by AssumeRoleWithWebIdentity last for -// one hour. However, you can use the optional DurationSeconds parameter to -// specify the duration of your session. You can provide a value from 900 seconds -// (15 minutes) up to the maximum session duration setting for the role. This -// setting can have a value from 1 hour to 12 hours. To learn how to view the -// maximum value for your role, see View the Maximum Session Duration Setting for -// a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) -// in the IAM User Guide. The maximum session duration limit applies when you use -// the AssumeRole* API operations or the assume-role* CLI commands. However the -// limit 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. Permissions The temporary security credentials created by -// AssumeRoleWithWebIdentity can be used to make API calls to any Amazon Web -// Services service with the following exception: you cannot call the STS -// GetFederationToken or GetSessionToken API operations. (Optional) You can pass -// inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policy Amazon -// Resource Names (ARNs) to use as managed session policies. The plaintext that you -// use for both inline and managed session policies can't exceed 2,048 characters. -// Passing policies to this operation returns new temporary credentials. The -// resulting session's permissions are the intersection of the role's -// identity-based policy and the session policies. You can use the role's temporary -// credentials in subsequent Amazon Web Services API calls to access resources in -// the account that owns the role. You cannot use session policies to grant more -// permissions than those allowed by the identity-based policy of the role that is -// being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// in the IAM User Guide. Tags (Optional) You can configure your IdP to pass -// attributes into your web identity token as session tags. Each session tag -// consists of a key name and an associated value. For more information about -// session tags, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) -// in the IAM User Guide. You can pass up to 50 session tags. The plaintext session -// tag keys can’t exceed 128 characters and the values can’t exceed 256 characters. -// For these and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) -// in the IAM User Guide. An Amazon Web Services conversion compresses the passed -// inline session policy, managed policy ARNs, and session tags into a packed -// binary format that has a separate limit. Your request can fail for this limit -// even if your plaintext meets the other requirements. The PackedPolicySize -// response element indicates by percentage how close the policies and tags for -// your request are to the upper size limit. You can pass a session tag with the -// same key as a tag that is attached to the role. When you do, the session tag -// overrides the role tag with the same key. An administrator must grant you the -// permissions necessary to pass session tags. The administrator can also create -// granular permissions to allow you to pass only specific session tags. For more -// information, see Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) -// in the IAM User Guide. You can set the session tags as transitive. Transitive -// tags persist during role chaining. For more information, see Chaining Roles -// with Session Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) -// in the IAM User Guide. Identities Before your application can call -// AssumeRoleWithWebIdentity , you must have an identity token from a supported -// identity provider and create a role that the application can assume. The role -// that your application assumes must trust the identity provider that is -// associated with the identity token. In other words, the identity provider must -// be specified in the role's trust policy. Calling AssumeRoleWithWebIdentity can -// result in an entry in your CloudTrail logs. The entry includes the Subject (http://openid.net/specs/openid-connect-core-1_0.html#Claims) -// of the provided web identity token. We recommend that you avoid using any -// personally identifiable information (PII) in this field. For example, you could -// instead use a GUID or a pairwise identifier, as suggested in the OIDC -// specification (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes) -// . For more information about how to use web identity federation and the +// Facebook, or any OpenID Connect-compatible identity provider such as Google or [Amazon Cognito federated identities]. +// +// For mobile applications, we recommend that you use Amazon Cognito. You can use +// Amazon Cognito with the [Amazon Web Services SDK for iOS Developer Guide]and the [Amazon Web Services SDK for Android Developer Guide] to uniquely identify a user. You can also +// supply the user with a consistent identity throughout the lifetime of an +// application. +// +// To learn more about Amazon Cognito, see [Amazon Cognito identity pools] in Amazon Cognito Developer Guide. +// +// Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web +// Services security credentials. Therefore, you can distribute an application (for +// example, on mobile devices) that requests temporary security credentials without +// including long-term Amazon Web Services credentials in the application. You also +// don't need to deploy server-based proxy services that use long-term Amazon Web +// Services credentials. Instead, the identity of the caller is validated by using +// a token from the web identity provider. For a comparison of +// AssumeRoleWithWebIdentity with the other API operations that produce temporary +// credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// +// The temporary security credentials returned by this API consist of an access +// key ID, a secret access key, and a security token. Applications can use these +// temporary security credentials to sign calls to Amazon Web Services service API +// operations. +// +// # Session Duration +// +// By default, the temporary security credentials created by +// AssumeRoleWithWebIdentity last for one hour. However, you can use the optional +// DurationSeconds parameter to specify the duration of your session. You can +// provide a value from 900 seconds (15 minutes) up to the maximum session duration +// setting for the role. This setting can have a value from 1 hour to 12 hours. To +// learn how to view the maximum value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. +// The maximum session duration limit applies when you use the AssumeRole* API +// operations or the assume-role* CLI commands. However the limit does not apply +// when you use those operations to create a console URL. For more information, see +// [Using IAM Roles]in the IAM User Guide. +// +// # Permissions +// +// The temporary security credentials created by AssumeRoleWithWebIdentity can be +// used to make API calls to any Amazon Web Services service with the following +// exception: you cannot call the STS GetFederationToken or GetSessionToken API +// operations. +// +// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a +// single JSON policy document to use as an inline session policy. You can also +// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed +// session policies. The plaintext that you use for both inline and managed session +// policies can't exceed 2,048 characters. Passing policies to this operation +// returns new temporary credentials. The resulting session's permissions are the +// intersection of the role's identity-based policy and the session policies. You +// can use the role's temporary credentials in subsequent Amazon Web Services API +// calls to access resources in the account that owns the role. You cannot use +// session policies to grant more permissions than those allowed by the +// identity-based policy of the role that is being assumed. For more information, +// see [Session Policies]in the IAM User Guide. +// +// # Tags +// +// (Optional) You can configure your IdP to pass attributes into your web identity +// token as session tags. Each session tag consists of a key name and an associated +// value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User Guide. +// +// You can pass up to 50 session tags. The plaintext session tag keys can’t exceed +// 128 characters and the values can’t exceed 256 characters. For these and +// additional limits, see [IAM and STS Character Limits]in the IAM User Guide. +// +// An Amazon Web Services conversion compresses the passed inline session policy, +// managed policy ARNs, and session tags into a packed binary format that has a +// separate limit. Your request can fail for this limit even if your plaintext +// meets the other requirements. The PackedPolicySize response element indicates +// by percentage how close the policies and tags for your request are to the upper +// size limit. +// +// You can pass a session tag with the same key as a tag that is attached to the +// role. When you do, the session tag overrides the role tag with the same key. +// +// An administrator must grant you the permissions necessary to pass session tags. +// The administrator can also create granular permissions to allow you to pass only +// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide. +// +// You can set the session tags as transitive. Transitive tags persist during role +// chaining. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide. +// +// # Identities +// +// Before your application can call AssumeRoleWithWebIdentity , you must have an +// identity token from a supported identity provider and create a role that the +// application can assume. The role that your application assumes must trust the +// identity provider that is associated with the identity token. In other words, +// the identity provider must be specified in the role's trust policy. +// +// Calling AssumeRoleWithWebIdentity can result in an entry in your CloudTrail +// logs. The entry includes the [Subject]of the provided web identity token. We recommend +// that you avoid using any personally identifiable information (PII) in this +// field. For example, you could instead use a GUID or a pairwise identifier, as [suggested in the OIDC specification]. +// +// For more information about how to use web identity federation and the // AssumeRoleWithWebIdentity API, see the following resources: -// - Using Web Identity Federation API Operations for Mobile Apps (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html) -// and Federation Through a Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity) -// . -// - Web Identity Federation Playground (https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/) -// . Walk through the process of authenticating through Login with Amazon, +// +// [Using Web Identity Federation API Operations for Mobile Apps] +// - and [Federation Through a Web-based Identity Provider]. +// +// [Web Identity Federation Playground] +// - . Walk through the process of authenticating through Login with Amazon, // Facebook, or Google, getting temporary security credentials, and then using // those credentials to make a request to Amazon Web Services. -// - Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/) -// and Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/) -// . These toolkits contain sample apps that show how to invoke the identity -// providers. The toolkits then show how to use the information from these +// +// [Amazon Web Services SDK for iOS Developer Guide] +// - and [Amazon Web Services SDK for Android Developer Guide]. These toolkits contain sample apps that show how to invoke the +// identity providers. The toolkits then show how to use the information from these // providers to get and use temporary security credentials. -// - Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications) -// . This article discusses web identity federation and shows an example of how to -// use web identity federation to get access to content in Amazon S3. +// +// [Web Identity Federation with Mobile Applications] +// - . This article discusses web identity federation and shows an example of +// how to use web identity federation to get access to content in Amazon S3. +// +// [Amazon Web Services SDK for iOS Developer Guide]: http://aws.amazon.com/sdkforios/ +// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session +// [Web Identity Federation Playground]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/ +// [Amazon Web Services SDK for Android Developer Guide]: http://aws.amazon.com/sdkforandroid/ +// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length +// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison +// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session +// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Subject]: http://openid.net/specs/openid-connect-core-1_0.html#Claims +// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html +// [Amazon Cognito identity pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html +// [Federation Through a Web-based Identity Provider]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity +// [Using IAM Roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html +// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session +// [Amazon Cognito federated identities]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html +// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html +// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining +// [Web Identity Federation with Mobile Applications]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications +// [Using Web Identity Federation API Operations for Mobile Apps]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html +// [suggested in the OIDC specification]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes func (c *Client) AssumeRoleWithWebIdentity(ctx context.Context, params *AssumeRoleWithWebIdentityInput, optFns ...func(*Options)) (*AssumeRoleWithWebIdentityOutput, error) { if params == nil { params = &AssumeRoleWithWebIdentityInput{} @@ -139,10 +177,11 @@ type AssumeRoleWithWebIdentityInput struct { // identifier that is associated with the user who is using your application. That // way, the temporary security credentials that your application will use are // associated with that user. This session name is included as part of the ARN and - // assumed role ID in the AssumedRoleUser response element. The regex used to - // validate this parameter is a string of characters consisting of upper- and - // lower-case alphanumeric characters with no spaces. You can also include - // underscores or any of the following characters: =,.@- + // assumed role ID in the AssumedRoleUser response element. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@- // // This member is required. RoleSessionName *string @@ -162,73 +201,90 @@ type AssumeRoleWithWebIdentityInput struct { // higher than this setting, the operation fails. For example, if you specify a // session duration of 12 hours, but your administrator set the maximum session // duration to 6 hours, your operation fails. To learn how to view the maximum - // value for your role, see View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) - // in the IAM User Guide. By default, the value is set to 3600 seconds. The - // DurationSeconds parameter is separate from the duration of a console session - // that you might request using the returned credentials. The request to the - // federation endpoint for a console sign-in token takes a SessionDuration + // value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. + // + // By default, the value is set to 3600 seconds. + // + // The DurationSeconds parameter is separate from the duration of a console + // session that you might request using the returned credentials. The request to + // the federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more - // information, see Creating a URL that Enables Federated Users to Access the - // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) - // in the IAM User Guide. + // information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide. + // + // [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session + // [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html DurationSeconds *int32 // An IAM policy in JSON format that you want to use as an inline session policy. + // // This parameter is optional. Passing policies to this operation returns new // temporary credentials. The resulting session's permissions are the intersection // of the role's identity-based policy and the session policies. You can use the // role's temporary credentials in subsequent Amazon Web Services API calls to // access resources in the account that owns the role. You cannot use session // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // in the IAM User Guide. The plaintext that you use for both inline and managed - // session policies can't exceed 2,048 characters. The JSON policy characters can - // be any ASCII character from the space character to the end of the valid - // character list (\u0020 through \u00FF). It can also include the tab (\u0009), - // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed inline session policy, managed policy - // ARNs, and session tags into a packed binary format that has a separate limit. - // Your request can fail for this limit even if your plaintext meets the other - // requirements. The PackedPolicySize response element indicates by percentage how - // close the policies and tags for your request are to the upper size limit. + // policy of the role that is being assumed. For more information, see [Session Policies]in the IAM + // User Guide. + // + // The plaintext that you use for both inline and managed session policies can't + // exceed 2,048 characters. The JSON policy characters can be any ASCII character + // from the space character to the end of the valid character list (\u0020 through + // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage + // return (\u000D) characters. + // + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates + // by percentage how close the policies and tags for your request are to the upper + // size limit. + // + // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to // use as managed session policies. The policies must exist in the same account as - // the role. This parameter is optional. You can provide up to 10 managed policy - // ARNs. However, the plaintext that you use for both inline and managed session - // policies can't exceed 2,048 characters. For more information about ARNs, see - // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed inline session policy, managed policy ARNs, and session - // tags into a packed binary format that has a separate limit. Your request can - // fail for this limit even if your plaintext meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. Passing policies to this - // operation returns new temporary credentials. The resulting session's permissions - // are the intersection of the role's identity-based policy and the session - // policies. You can use the role's temporary credentials in subsequent Amazon Web - // Services API calls to access resources in the account that owns the role. You - // cannot use session policies to grant more permissions than those allowed by the - // identity-based policy of the role that is being assumed. For more information, - // see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // in the IAM User Guide. + // the role. + // + // This parameter is optional. You can provide up to 10 managed policy ARNs. + // However, the plaintext that you use for both inline and managed session policies + // can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the + // Amazon Web Services General Reference. + // + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates + // by percentage how close the policies and tags for your request are to the upper + // size limit. + // + // Passing policies to this operation returns new temporary credentials. The + // resulting session's permissions are the intersection of the role's + // identity-based policy and the session policies. You can use the role's temporary + // credentials in subsequent Amazon Web Services API calls to access resources in + // the account that owns the role. You cannot use session policies to grant more + // permissions than those allowed by the identity-based policy of the role that is + // being assumed. For more information, see [Session Policies]in the IAM User Guide. + // + // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html PolicyArns []types.PolicyDescriptorType // The fully qualified host component of the domain name of the OAuth 2.0 identity // provider. Do not specify this value for an OpenID Connect identity provider. + // // Currently www.amazon.com and graph.facebook.com are the only supported identity // providers for OAuth 2.0 access tokens. Do not include URL schemes and port - // numbers. Do not specify this value for OpenID Connect ID tokens. + // numbers. + // + // Do not specify this value for OpenID Connect ID tokens. ProviderId *string noSmithyDocumentSerde } -// Contains the response to a successful AssumeRoleWithWebIdentity request, -// including temporary Amazon Web Services credentials that can be used to make -// Amazon Web Services requests. +// Contains the response to a successful AssumeRoleWithWebIdentity request, including temporary Amazon Web +// Services credentials that can be used to make Amazon Web Services requests. type AssumeRoleWithWebIdentityOutput struct { // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers @@ -244,9 +300,10 @@ type AssumeRoleWithWebIdentityOutput struct { Audience *string // The temporary security credentials, which include an access key ID, a secret - // access key, and a security token. The size of the security token that STS API - // operations return is not fixed. We strongly recommend that you make no - // assumptions about the maximum size. + // access key, and a security token. + // + // The size of the security token that STS API operations return is not fixed. We + // strongly recommend that you make no assumptions about the maximum size. Credentials *types.Credentials // A percentage value that indicates the packed size of the session policies and @@ -255,30 +312,34 @@ type AssumeRoleWithWebIdentityOutput struct { // allowed space. PackedPolicySize *int32 - // The issuing authority of the web identity token presented. For OpenID Connect + // The issuing authority of the web identity token presented. For OpenID Connect // ID tokens, this contains the value of the iss field. For OAuth 2.0 access // tokens, this contains the value of the ProviderId parameter that was passed in // the AssumeRoleWithWebIdentity request. Provider *string // The value of the source identity that is returned in the JSON web token (JWT) - // from the identity provider. You can require users to set a source identity value - // when they assume a role. You do this by using the sts:SourceIdentity condition - // key in a role trust policy. That way, actions that are taken with the role are - // associated with that user. After the source identity is set, the value cannot be - // changed. It is present in the request for all actions that are taken by the role - // and persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining) - // sessions. You can configure your identity provider to use an attribute + // from the identity provider. + // + // You can require users to set a source identity value when they assume a role. + // You do this by using the sts:SourceIdentity condition key in a role trust + // policy. That way, actions that are taken with the role are associated with that + // user. After the source identity is set, the value cannot be changed. It is + // present in the request for all actions that are taken by the role and persists + // across [chained role]sessions. You can configure your identity provider to use an attribute // associated with your users, like user name or email, as the source identity when // calling AssumeRoleWithWebIdentity . You do this by adding a claim to the JSON - // web token. To learn more about OIDC tokens and claims, see Using Tokens with - // User Pools (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html) - // in the Amazon Cognito Developer Guide. For more information about using source - // identity, see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) - // in the IAM User Guide. The regex used to validate this parameter is a string of - // characters consisting of upper- and lower-case alphanumeric characters with no - // spaces. You can also include underscores or any of the following characters: - // =,.@- + // web token. To learn more about OIDC tokens and claims, see [Using Tokens with User Pools]in the Amazon + // Cognito Developer Guide. For more information about using source identity, see [Monitor and control actions taken with assumed roles] + // in the IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@- + // + // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining + // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html + // [Using Tokens with User Pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html SourceIdentity *string // The unique user identifier that is returned by the identity provider. This @@ -347,6 +408,12 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssumeRoleWithWebIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go index b4ad54ab..b1f14d28 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go @@ -11,28 +11,39 @@ import ( ) // Decodes additional information about the authorization status of a request from -// an encoded message returned in response to an Amazon Web Services request. For -// example, if a user is not authorized to perform an operation that he or she has -// requested, the request returns a Client.UnauthorizedOperation response (an HTTP -// 403 response). Some Amazon Web Services operations additionally return an -// encoded message that can provide details about this authorization failure. Only -// certain Amazon Web Services operations return an encoded authorization message. -// The documentation for an individual operation indicates whether that operation -// returns an encoded message in addition to returning an HTTP code. The message is -// encoded because the details of the authorization status can contain privileged -// information that the user who requested the operation should not see. To decode -// an authorization status message, a user must be granted permissions through an -// IAM policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) -// to request the DecodeAuthorizationMessage ( sts:DecodeAuthorizationMessage ) -// action. The decoded message includes the following type of information: +// an encoded message returned in response to an Amazon Web Services request. +// +// For example, if a user is not authorized to perform an operation that he or she +// has requested, the request returns a Client.UnauthorizedOperation response (an +// HTTP 403 response). Some Amazon Web Services operations additionally return an +// encoded message that can provide details about this authorization failure. +// +// Only certain Amazon Web Services operations return an encoded authorization +// message. The documentation for an individual operation indicates whether that +// operation returns an encoded message in addition to returning an HTTP code. +// +// The message is encoded because the details of the authorization status can +// contain privileged information that the user who requested the operation should +// not see. To decode an authorization status message, a user must be granted +// permissions through an IAM [policy]to request the DecodeAuthorizationMessage ( +// sts:DecodeAuthorizationMessage ) action. +// +// The decoded message includes the following type of information: +// // - Whether the request was denied due to an explicit deny or due to the -// absence of an explicit allow. For more information, see Determining Whether a -// Request is Allowed or Denied (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow) -// in the IAM User Guide. +// absence of an explicit allow. For more information, see [Determining Whether a Request is Allowed or Denied]in the IAM User +// Guide. +// // - The principal who made the request. +// // - The requested action. +// // - The requested resource. +// // - The values of condition keys in the context of the user's request. +// +// [Determining Whether a Request is Allowed or Denied]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow +// [policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html func (c *Client) DecodeAuthorizationMessage(ctx context.Context, params *DecodeAuthorizationMessageInput, optFns ...func(*Options)) (*DecodeAuthorizationMessageOutput, error) { if params == nil { params = &DecodeAuthorizationMessageInput{} @@ -127,6 +138,12 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDecodeAuthorizationMessageValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go index 1f7cbcc2..3ba00873 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go @@ -10,23 +10,31 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns the account identifier for the specified access key ID. Access keys -// consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE ) and -// a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY ). -// For more information about access keys, see Managing Access Keys for IAM Users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) -// in the IAM User Guide. When you pass an access key ID to this operation, it -// returns the ID of the Amazon Web Services account to which the keys belong. -// Access key IDs beginning with AKIA are long-term credentials for an IAM user or -// the Amazon Web Services account root user. Access key IDs beginning with ASIA -// are temporary credentials that are created using STS operations. If the account -// in the response belongs to you, you can sign in as the root user and review your -// root user access keys. Then, you can pull a credentials report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html) -// to learn which IAM user owns the keys. To learn who requested the temporary -// credentials for an ASIA access key, view the STS events in your CloudTrail logs (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) -// in the IAM User Guide. This operation does not indicate the state of the access -// key. The key might be active, inactive, or deleted. Active keys might not have -// permissions to perform an operation. Providing a deleted access key might return -// an error that the key doesn't exist. +// Returns the account identifier for the specified access key ID. +// +// Access keys consist of two parts: an access key ID (for example, +// AKIAIOSFODNN7EXAMPLE ) and a secret access key (for example, +// wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY ). For more information about access +// keys, see [Managing Access Keys for IAM Users]in the IAM User Guide. +// +// When you pass an access key ID to this operation, it returns the ID of the +// Amazon Web Services account to which the keys belong. Access key IDs beginning +// with AKIA are long-term credentials for an IAM user or the Amazon Web Services +// account root user. Access key IDs beginning with ASIA are temporary credentials +// that are created using STS operations. If the account in the response belongs to +// you, you can sign in as the root user and review your root user access keys. +// Then, you can pull a [credentials report]to learn which IAM user owns the keys. To learn who +// requested the temporary credentials for an ASIA access key, view the STS events +// in your [CloudTrail logs]in the IAM User Guide. +// +// This operation does not indicate the state of the access key. The key might be +// active, inactive, or deleted. Active keys might not have permissions to perform +// an operation. Providing a deleted access key might return an error that the key +// doesn't exist. +// +// [credentials report]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html +// [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html +// [Managing Access Keys for IAM Users]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html func (c *Client) GetAccessKeyInfo(ctx context.Context, params *GetAccessKeyInfoInput, optFns ...func(*Options)) (*GetAccessKeyInfoOutput, error) { if params == nil { params = &GetAccessKeyInfoInput{} @@ -44,9 +52,10 @@ func (c *Client) GetAccessKeyInfo(ctx context.Context, params *GetAccessKeyInfoI type GetAccessKeyInfoInput struct { - // The identifier of an access key. This parameter allows (through its regex - // pattern) a string of characters that can consist of any upper- or lowercase - // letter or digit. + // The identifier of an access key. + // + // This parameter allows (through its regex pattern) a string of characters that + // can consist of any upper- or lowercase letter or digit. // // This member is required. AccessKeyId *string @@ -120,6 +129,12 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccessKeyInfoValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go index acb7ede4..abac49ad 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go @@ -12,13 +12,15 @@ import ( ) // Returns details about the IAM user or role whose credentials are used to call -// the operation. No permissions are required to perform this operation. If an -// administrator attaches a policy to your identity that explicitly denies access -// to the sts:GetCallerIdentity action, you can still perform this operation. -// Permissions are not required because the same information is returned when -// access is denied. To view an example response, see I Am Not Authorized to -// Perform: iam:DeleteVirtualMFADevice (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa) -// in the IAM User Guide. +// the operation. +// +// No permissions are required to perform this operation. If an administrator +// attaches a policy to your identity that explicitly denies access to the +// sts:GetCallerIdentity action, you can still perform this operation. Permissions +// are not required because the same information is returned when access is denied. +// To view an example response, see [I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice]in the IAM User Guide. +// +// [I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa func (c *Client) GetCallerIdentity(ctx context.Context, params *GetCallerIdentityInput, optFns ...func(*Options)) (*GetCallerIdentityOutput, error) { if params == nil { params = &GetCallerIdentityInput{} @@ -38,8 +40,8 @@ type GetCallerIdentityInput struct { noSmithyDocumentSerde } -// Contains the response to a successful GetCallerIdentity request, including -// information about the entity making the request. +// Contains the response to a successful GetCallerIdentity request, including information about the +// entity making the request. type GetCallerIdentityOutput struct { // The Amazon Web Services account ID number of the account that owns or contains @@ -51,8 +53,10 @@ type GetCallerIdentityOutput struct { // The unique identifier of the calling entity. The exact value depends on the // type of entity that is making the call. The values returned are those listed in - // the aws:userid column in the Principal table (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable) - // found on the Policy Variables reference page in the IAM User Guide. + // the aws:userid column in the [Principal table]found on the Policy Variables reference page in + // the IAM User Guide. + // + // [Principal table]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable UserId *string // Metadata pertaining to the operation's result. @@ -116,6 +120,12 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCallerIdentity(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go index 3679618c..2bae6742 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go @@ -14,74 +14,100 @@ import ( // Returns a set of temporary security credentials (consisting of an access key // ID, a secret access key, and a security token) for a user. A typical use is in a // proxy application that gets temporary security credentials on behalf of -// distributed applications inside a corporate network. You must call the -// GetFederationToken operation using the long-term security credentials of an IAM -// user. As a result, this call is appropriate in contexts where those credentials -// can be safeguarded, usually in a server-based application. For a comparison of -// GetFederationToken with the other API operations that produce temporary -// credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) -// in the IAM User Guide. Although it is possible to call GetFederationToken using -// the security credentials of an Amazon Web Services account root user rather than -// an IAM user that you create for the purpose of a proxy application, we do not -// recommend it. For more information, see Safeguard your root user credentials -// and don't use them for everyday tasks (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials) -// in the IAM User Guide. You can create a mobile-based or browser-based app that -// can authenticate users using a web identity provider like Login with Amazon, -// Facebook, Google, or an OpenID Connect-compatible identity provider. In this -// case, we recommend that you use Amazon Cognito (http://aws.amazon.com/cognito/) -// or AssumeRoleWithWebIdentity . For more information, see Federation Through a -// Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity) -// in the IAM User Guide. Session duration The temporary credentials are valid for -// the specified duration, from 900 seconds (15 minutes) up to a maximum of 129,600 -// seconds (36 hours). The default session duration is 43,200 seconds (12 hours). -// Temporary credentials obtained by using the root user credentials have a maximum -// duration of 3,600 seconds (1 hour). Permissions You can use the temporary -// credentials created by GetFederationToken in any Amazon Web Services service -// with the following exceptions: +// distributed applications inside a corporate network. +// +// You must call the GetFederationToken operation using the long-term security +// credentials of an IAM user. As a result, this call is appropriate in contexts +// where those credentials can be safeguarded, usually in a server-based +// application. For a comparison of GetFederationToken with the other API +// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// +// Although it is possible to call GetFederationToken using the security +// credentials of an Amazon Web Services account root user rather than an IAM user +// that you create for the purpose of a proxy application, we do not recommend it. +// For more information, see [Safeguard your root user credentials and don't use them for everyday tasks]in the IAM User Guide. +// +// You can create a mobile-based or browser-based app that can authenticate users +// using a web identity provider like Login with Amazon, Facebook, Google, or an +// OpenID Connect-compatible identity provider. In this case, we recommend that you +// use [Amazon Cognito]or AssumeRoleWithWebIdentity . For more information, see [Federation Through a Web-based Identity Provider] in the IAM User +// Guide. +// +// # Session duration +// +// The temporary credentials are valid for the specified duration, from 900 +// seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default +// session duration is 43,200 seconds (12 hours). Temporary credentials obtained by +// using the root user credentials have a maximum duration of 3,600 seconds (1 +// hour). +// +// # Permissions +// +// You can use the temporary credentials created by GetFederationToken in any +// Amazon Web Services service with the following exceptions: +// // - You cannot call any IAM operations using the CLI or the Amazon Web Services // API. This limitation does not apply to console sessions. +// // - You cannot call any STS operations except GetCallerIdentity . // -// You can use temporary credentials for single sign-on (SSO) to the console. You -// must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policy Amazon -// Resource Names (ARNs) to use as managed session policies. The plaintext that you -// use for both inline and managed session policies can't exceed 2,048 characters. +// You can use temporary credentials for single sign-on (SSO) to the console. +// +// You must pass an inline or managed [session policy] to this operation. You can pass a single +// JSON policy document to use as an inline session policy. You can also specify up +// to 10 managed policy Amazon Resource Names (ARNs) to use as managed session +// policies. The plaintext that you use for both inline and managed session +// policies can't exceed 2,048 characters. +// // Though the session policy parameters are optional, if you do not pass a policy, // then the resulting federated user session has no permissions. When you pass // session policies, the session permissions are the intersection of the IAM user // policies and the session policies that you pass. This gives you a way to further // restrict the permissions for a federated user. You cannot use session policies // to grant more permissions than those that are defined in the permissions policy -// of the IAM user. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// in the IAM User Guide. For information about using GetFederationToken to create -// temporary security credentials, see GetFederationToken—Federation Through a -// Custom Identity Broker (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken) -// . You can use the credentials to access a resource that has a resource-based +// of the IAM user. For more information, see [Session Policies]in the IAM User Guide. For +// information about using GetFederationToken to create temporary security +// credentials, see [GetFederationToken—Federation Through a Custom Identity Broker]. +// +// You can use the credentials to access a resource that has a resource-based // policy. If that policy specifically references the federated user session in the // Principal element of the policy, the session has the permissions allowed by the // policy. These permissions are granted in addition to the permissions granted by -// the session policies. Tags (Optional) You can pass tag key-value pairs to your -// session. These are called session tags. For more information about session tags, -// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) -// in the IAM User Guide. You can create a mobile-based or browser-based app that -// can authenticate users using a web identity provider like Login with Amazon, -// Facebook, Google, or an OpenID Connect-compatible identity provider. In this -// case, we recommend that you use Amazon Cognito (http://aws.amazon.com/cognito/) -// or AssumeRoleWithWebIdentity . For more information, see Federation Through a -// Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity) -// in the IAM User Guide. An administrator must grant you the permissions necessary -// to pass session tags. The administrator can also create granular permissions to -// allow you to pass only specific session tags. For more information, see -// Tutorial: Using Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) -// in the IAM User Guide. Tag key–value pairs are not case sensitive, but case is -// preserved. This means that you cannot have separate Department and department -// tag keys. Assume that the user that you are federating has the Department = -// Marketing tag and you pass the department = engineering session tag. Department -// and department are not saved as separate tags, and the session tag passed in -// the request takes precedence over the user tag. +// the session policies. +// +// # Tags +// +// (Optional) You can pass tag key-value pairs to your session. These are called +// session tags. For more information about session tags, see [Passing Session Tags in STS]in the IAM User +// Guide. +// +// You can create a mobile-based or browser-based app that can authenticate users +// using a web identity provider like Login with Amazon, Facebook, Google, or an +// OpenID Connect-compatible identity provider. In this case, we recommend that you +// use [Amazon Cognito]or AssumeRoleWithWebIdentity . For more information, see [Federation Through a Web-based Identity Provider] in the IAM User +// Guide. +// +// An administrator must grant you the permissions necessary to pass session tags. +// The administrator can also create granular permissions to allow you to pass only +// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide. +// +// Tag key–value pairs are not case sensitive, but case is preserved. This means +// that you cannot have separate Department and department tag keys. Assume that +// the user that you are federating has the Department = Marketing tag and you +// pass the department = engineering session tag. Department and department are +// not saved as separate tags, and the session tag passed in the request takes +// precedence over the user tag. +// +// [Federation Through a Web-based Identity Provider]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity +// [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session +// [Amazon Cognito]: http://aws.amazon.com/cognito/ +// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session +// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html +// [GetFederationToken—Federation Through a Custom Identity Broker]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken +// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison +// [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials +// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html func (c *Client) GetFederationToken(ctx context.Context, params *GetFederationTokenInput, optFns ...func(*Options)) (*GetFederationTokenOutput, error) { if params == nil { params = &GetFederationTokenInput{} @@ -102,10 +128,11 @@ type GetFederationTokenInput struct { // The name of the federated user. The name is used as an identifier for the // temporary security credentials (such as Bob ). For example, you can reference // the federated user name in a resource-based policy, such as in an Amazon S3 - // bucket policy. The regex used to validate this parameter is a string of - // characters consisting of upper- and lower-case alphanumeric characters with no - // spaces. You can also include underscores or any of the following characters: - // =,.@- + // bucket policy. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@- // // This member is required. Name *string @@ -119,99 +146,127 @@ type GetFederationTokenInput struct { DurationSeconds *int32 // An IAM policy in JSON format that you want to use as an inline session policy. - // You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // to this operation. You can pass a single JSON policy document to use as an - // inline session policy. You can also specify up to 10 managed policy Amazon - // Resource Names (ARNs) to use as managed session policies. This parameter is - // optional. However, if you do not pass any session policies, then the resulting - // federated user session has no permissions. When you pass session policies, the - // session permissions are the intersection of the IAM user policies and the - // session policies that you pass. This gives you a way to further restrict the - // permissions for a federated user. You cannot use session policies to grant more - // permissions than those that are defined in the permissions policy of the IAM - // user. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // in the IAM User Guide. The resulting credentials can be used to access a - // resource that has a resource-based policy. If that policy specifically - // references the federated user session in the Principal element of the policy, - // the session has the permissions allowed by the policy. These permissions are - // granted in addition to the permissions that are granted by the session policies. + // + // You must pass an inline or managed [session policy] to this operation. You can pass a single + // JSON policy document to use as an inline session policy. You can also specify up + // to 10 managed policy Amazon Resource Names (ARNs) to use as managed session + // policies. + // + // This parameter is optional. However, if you do not pass any session policies, + // then the resulting federated user session has no permissions. + // + // When you pass session policies, the session permissions are the intersection of + // the IAM user policies and the session policies that you pass. This gives you a + // way to further restrict the permissions for a federated user. You cannot use + // session policies to grant more permissions than those that are defined in the + // permissions policy of the IAM user. For more information, see [Session Policies]in the IAM User + // Guide. + // + // The resulting credentials can be used to access a resource that has a + // resource-based policy. If that policy specifically references the federated user + // session in the Principal element of the policy, the session has the permissions + // allowed by the policy. These permissions are granted in addition to the + // permissions that are granted by the session policies. + // // The plaintext that you use for both inline and managed session policies can't // exceed 2,048 characters. The JSON policy characters can be any ASCII character // from the space character to the end of the valid character list (\u0020 through // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage - // return (\u000D) characters. An Amazon Web Services conversion compresses the - // passed inline session policy, managed policy ARNs, and session tags into a - // packed binary format that has a separate limit. Your request can fail for this - // limit even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. + // return (\u000D) characters. + // + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates + // by percentage how close the policies and tags for your request are to the upper + // size limit. + // + // [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to // use as a managed session policy. The policies must exist in the same account as - // the IAM user that is requesting federated access. You must pass an inline or - // managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // to this operation. You can pass a single JSON policy document to use as an - // inline session policy. You can also specify up to 10 managed policy Amazon - // Resource Names (ARNs) to use as managed session policies. The plaintext that you - // use for both inline and managed session policies can't exceed 2,048 characters. - // You can provide up to 10 managed policy ARNs. For more information about ARNs, - // see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. This parameter is optional. - // However, if you do not pass any session policies, then the resulting federated - // user session has no permissions. When you pass session policies, the session - // permissions are the intersection of the IAM user policies and the session - // policies that you pass. This gives you a way to further restrict the permissions - // for a federated user. You cannot use session policies to grant more permissions - // than those that are defined in the permissions policy of the IAM user. For more - // information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // in the IAM User Guide. The resulting credentials can be used to access a - // resource that has a resource-based policy. If that policy specifically - // references the federated user session in the Principal element of the policy, - // the session has the permissions allowed by the policy. These permissions are - // granted in addition to the permissions that are granted by the session policies. + // the IAM user that is requesting federated access. + // + // You must pass an inline or managed [session policy] to this operation. You can pass a single + // JSON policy document to use as an inline session policy. You can also specify up + // to 10 managed policy Amazon Resource Names (ARNs) to use as managed session + // policies. The plaintext that you use for both inline and managed session + // policies can't exceed 2,048 characters. You can provide up to 10 managed policy + // ARNs. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the Amazon Web Services General + // Reference. + // + // This parameter is optional. However, if you do not pass any session policies, + // then the resulting federated user session has no permissions. + // + // When you pass session policies, the session permissions are the intersection of + // the IAM user policies and the session policies that you pass. This gives you a + // way to further restrict the permissions for a federated user. You cannot use + // session policies to grant more permissions than those that are defined in the + // permissions policy of the IAM user. For more information, see [Session Policies]in the IAM User + // Guide. + // + // The resulting credentials can be used to access a resource that has a + // resource-based policy. If that policy specifically references the federated user + // session in the Principal element of the policy, the session has the permissions + // allowed by the policy. These permissions are granted in addition to the + // permissions that are granted by the session policies. + // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has a // separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the upper // size limit. + // + // [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html PolicyArns []types.PolicyDescriptorType // A list of session tags. Each session tag consists of a key name and an - // associated value. For more information about session tags, see Passing Session - // Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) - // in the IAM User Guide. This parameter is optional. You can pass up to 50 session - // tags. The plaintext session tag keys can’t exceed 128 characters and the values - // can’t exceed 256 characters. For these and additional limits, see IAM and STS - // Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) - // in the IAM User Guide. An Amazon Web Services conversion compresses the passed - // inline session policy, managed policy ARNs, and session tags into a packed - // binary format that has a separate limit. Your request can fail for this limit - // even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. You can pass a session tag with the - // same key as a tag that is already attached to the user you are federating. When - // you do, session tags override a user tag with the same key. Tag key–value pairs - // are not case sensitive, but case is preserved. This means that you cannot have - // separate Department and department tag keys. Assume that the role has the - // Department = Marketing tag and you pass the department = engineering session - // tag. Department and department are not saved as separate tags, and the session - // tag passed in the request takes precedence over the role tag. + // associated value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User + // Guide. + // + // This parameter is optional. You can pass up to 50 session tags. The plaintext + // session tag keys can’t exceed 128 characters and the values can’t exceed 256 + // characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User Guide. + // + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates + // by percentage how close the policies and tags for your request are to the upper + // size limit. + // + // You can pass a session tag with the same key as a tag that is already attached + // to the user you are federating. When you do, session tags override a user tag + // with the same key. + // + // Tag key–value pairs are not case sensitive, but case is preserved. This means + // that you cannot have separate Department and department tag keys. Assume that + // the role has the Department = Marketing tag and you pass the department = + // engineering session tag. Department and department are not saved as separate + // tags, and the session tag passed in the request takes precedence over the role + // tag. + // + // [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html + // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length Tags []types.Tag noSmithyDocumentSerde } -// Contains the response to a successful GetFederationToken request, including -// temporary Amazon Web Services credentials that can be used to make Amazon Web -// Services requests. +// Contains the response to a successful GetFederationToken request, including temporary Amazon Web +// Services credentials that can be used to make Amazon Web Services requests. type GetFederationTokenOutput struct { // The temporary security credentials, which include an access key ID, a secret - // access key, and a security (or session) token. The size of the security token - // that STS API operations return is not fixed. We strongly recommend that you make - // no assumptions about the maximum size. + // access key, and a security (or session) token. + // + // The size of the security token that STS API operations return is not fixed. We + // strongly recommend that you make no assumptions about the maximum size. Credentials *types.Credentials // Identifiers for the federated user associated with the credentials (such as @@ -287,6 +342,12 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFederationTokenValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go index 751fb147..c73316a3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go @@ -15,43 +15,58 @@ import ( // IAM user. The credentials consist of an access key ID, a secret access key, and // a security token. Typically, you use GetSessionToken if you want to use MFA to // protect programmatic calls to specific Amazon Web Services API operations like -// Amazon EC2 StopInstances . MFA-enabled IAM users must call GetSessionToken and -// submit an MFA code that is associated with their MFA device. Using the temporary -// security credentials that the call returns, IAM users can then make programmatic -// calls to API operations that require MFA authentication. An incorrect MFA code -// causes the API to return an access denied error. For a comparison of -// GetSessionToken with the other API operations that produce temporary -// credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) -// in the IAM User Guide. No permissions are required for users to perform this -// operation. The purpose of the sts:GetSessionToken operation is to authenticate -// the user using MFA. You cannot use policies to control authentication -// operations. For more information, see Permissions for GetSessionToken (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html) -// in the IAM User Guide. Session Duration The GetSessionToken operation must be -// called by using the long-term Amazon Web Services security credentials of an IAM -// user. Credentials that are created by IAM users are valid for the duration that -// you specify. This duration can range from 900 seconds (15 minutes) up to a -// maximum of 129,600 seconds (36 hours), with a default of 43,200 seconds (12 -// hours). Credentials based on account credentials can range from 900 seconds (15 -// minutes) up to 3,600 seconds (1 hour), with a default of 1 hour. Permissions The -// temporary security credentials created by GetSessionToken can be used to make -// API calls to any Amazon Web Services service with the following exceptions: +// Amazon EC2 StopInstances . +// +// MFA-enabled IAM users must call GetSessionToken and submit an MFA code that is +// associated with their MFA device. Using the temporary security credentials that +// the call returns, IAM users can then make programmatic calls to API operations +// that require MFA authentication. An incorrect MFA code causes the API to return +// an access denied error. For a comparison of GetSessionToken with the other API +// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// +// No permissions are required for users to perform this operation. The purpose of +// the sts:GetSessionToken operation is to authenticate the user using MFA. You +// cannot use policies to control authentication operations. For more information, +// see [Permissions for GetSessionToken]in the IAM User Guide. +// +// # Session Duration +// +// The GetSessionToken operation must be called by using the long-term Amazon Web +// Services security credentials of an IAM user. Credentials that are created by +// IAM users are valid for the duration that you specify. This duration can range +// from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), +// with a default of 43,200 seconds (12 hours). Credentials based on account +// credentials can range from 900 seconds (15 minutes) up to 3,600 seconds (1 +// hour), with a default of 1 hour. +// +// # Permissions +// +// The temporary security credentials created by GetSessionToken can be used to +// make API calls to any Amazon Web Services service with the following exceptions: +// // - You cannot call any IAM API operations unless MFA authentication // information is included in the request. +// // - You cannot call any STS API except AssumeRole or GetCallerIdentity . // // The credentials that GetSessionToken returns are based on permissions // associated with the IAM user whose credentials were used to call the operation. -// The temporary credentials have the same permissions as the IAM user. Although it -// is possible to call GetSessionToken using the security credentials of an Amazon -// Web Services account root user rather than an IAM user, we do not recommend it. -// If GetSessionToken is called using root user credentials, the temporary -// credentials have root user permissions. For more information, see Safeguard -// your root user credentials and don't use them for everyday tasks (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials) -// in the IAM User Guide For more information about using GetSessionToken to -// create temporary credentials, see Temporary Credentials for Users in Untrusted -// Environments (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken) -// in the IAM User Guide. +// The temporary credentials have the same permissions as the IAM user. +// +// Although it is possible to call GetSessionToken using the security credentials +// of an Amazon Web Services account root user rather than an IAM user, we do not +// recommend it. If GetSessionToken is called using root user credentials, the +// temporary credentials have root user permissions. For more information, see [Safeguard your root user credentials and don't use them for everyday tasks]in +// the IAM User Guide +// +// For more information about using GetSessionToken to create temporary +// credentials, see [Temporary Credentials for Users in Untrusted Environments]in the IAM User Guide. +// +// [Permissions for GetSessionToken]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html +// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison +// [Temporary Credentials for Users in Untrusted Environments]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken +// [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials +// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html func (c *Client) GetSessionToken(ctx context.Context, params *GetSessionTokenInput, optFns ...func(*Options)) (*GetSessionTokenOutput, error) { if params == nil { params = &GetSessionTokenInput{} @@ -83,10 +98,11 @@ type GetSessionTokenInput struct { // number for a hardware device (such as GAHT12345678 ) or an Amazon Resource Name // (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user ). You // can find the device for an IAM user by going to the Amazon Web Services - // Management Console and viewing the user's security credentials. The regex used - // to validate this parameter is a string of characters consisting of upper- and - // lower-case alphanumeric characters with no spaces. You can also include - // underscores or any of the following characters: =,.@:/- + // Management Console and viewing the user's security credentials. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@:/- SerialNumber *string // The value provided by the MFA device, if MFA is required. If any policy @@ -94,22 +110,24 @@ type GetSessionTokenInput struct { // authentication is required, the user must provide a code when requesting a set // of temporary security credentials. A user who fails to provide the code receives // an "access denied" response when requesting resources that require MFA - // authentication. The format for this parameter, as described by its regex - // pattern, is a sequence of six numeric digits. + // authentication. + // + // The format for this parameter, as described by its regex pattern, is a sequence + // of six numeric digits. TokenCode *string noSmithyDocumentSerde } -// Contains the response to a successful GetSessionToken request, including -// temporary Amazon Web Services credentials that can be used to make Amazon Web -// Services requests. +// Contains the response to a successful GetSessionToken request, including temporary Amazon Web +// Services credentials that can be used to make Amazon Web Services requests. type GetSessionTokenOutput struct { // The temporary security credentials, which include an access key ID, a secret - // access key, and a security (or session) token. The size of the security token - // that STS API operations return is not fixed. We strongly recommend that you make - // no assumptions about the maximum size. + // access key, and a security (or session) token. + // + // The size of the security token that STS API operations return is not fixed. We + // strongly recommend that you make no assumptions about the maximum size. Credentials *types.Credentials // Metadata pertaining to the operation's result. @@ -173,6 +191,12 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSessionToken(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go index 9db5bfd4..e842a7f7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { params.Region = options.Region } @@ -90,12 +90,12 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(params, input, options) + bindAuthParamsRegion(ctx, params, input, options) return params } @@ -157,7 +157,7 @@ func (*resolveAuthSchemeMiddleware) ID() string { 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) + params := bindAuthResolverParams(ctx, 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) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go index 5d634ce3..7e4346ec 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go @@ -20,8 +20,17 @@ import ( "io" "strconv" "strings" + "time" ) +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + type awsAwsquery_deserializeOpAssumeRole struct { } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go index d963fd8d..cbb19c7f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go @@ -3,9 +3,11 @@ // Package sts provides the API client, operations, and parameter types for AWS // Security Token Service. // -// Security Token Service Security Token Service (STS) enables you to request -// temporary, limited-privilege credentials for users. This guide provides -// descriptions of the STS API. For more information about using this service, see -// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) -// . +// # Security Token Service +// +// Security Token Service (STS) enables you to request temporary, +// limited-privilege credentials for users. This guide provides descriptions of the +// STS API. For more information about using this service, see [Temporary Security Credentials]. +// +// [Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html package sts diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go index 32e2d543..35305d89 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go @@ -306,6 +306,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, @@ -1045,7 +1056,7 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} params.Region = bindRegion(options.Region) @@ -1075,6 +1086,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return next.HandleFinalize(ctx, in) } + if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { + return out, metadata, fmt.Errorf("invalid accountID set: %w", err) + } + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -1084,7 +1099,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(getOperationInput(ctx), m.options) + params := bindEndpointParams(ctx, 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) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index 6e0f31d2..b7089f30 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.28.6" +const goModuleVersion = "1.30.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go index 3dbd993b..b4fd1174 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "aws-global", }: endpoints.Endpoint{ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go index 5c1be79f..a9a35881 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go @@ -24,6 +24,9 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error + // Indicates how aws account ID is applied in endpoint2.0 routing + AccountIDEndpointMode aws.AccountIDEndpointMode + // The optional application specific identifier appended to the User-Agent header. AppID string @@ -50,8 +53,10 @@ type Options struct { // 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. + // 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 @@ -70,17 +75,20 @@ type Options struct { // 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. + // 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. + // 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 @@ -97,8 +105,9 @@ type Options struct { // 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. + // 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 @@ -143,6 +152,7 @@ func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { // 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) { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go index 097875b2..9573a4b6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go @@ -65,9 +65,10 @@ func (e *IDPCommunicationErrorException) ErrorCode() string { func (e *IDPCommunicationErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The identity provider (IdP) reported that authentication failed. This might be -// because the claim is invalid. If this error is returned for the -// AssumeRoleWithWebIdentity operation, it can also mean that the claim has expired -// or has been explicitly revoked. +// because the claim is invalid. +// +// If this error is returned for the AssumeRoleWithWebIdentity operation, it can +// also mean that the claim has expired or has been explicitly revoked. type IDPRejectedClaimException struct { Message *string @@ -183,11 +184,13 @@ func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { retu // compresses the session policy document, session policy ARNs, and session tags // into a packed binary format that has a separate limit. The error message // indicates by percentage how close the policies and tags are to the upper size -// limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) -// in the IAM User Guide. You could receive this error even though you meet other -// defined session policy and session tag limits. For more information, see IAM -// and STS Entity Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) -// in the IAM User Guide. +// limit. For more information, see [Passing Session Tags in STS]in the IAM User Guide. +// +// You could receive this error even though you meet other defined session policy +// and session tag limits. For more information, see [IAM and STS Entity Character Limits]in the IAM User Guide. +// +// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html +// [IAM and STS Entity Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length type PackedPolicyTooLargeException struct { Message *string @@ -215,9 +218,10 @@ func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM -// console to activate STS in that region. For more information, see Activating -// and Deactivating Amazon Web Services 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. +// console to activate STS in that region. For more information, see [Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region]in the IAM +// User Guide. +// +// [Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html type RegionDisabledException struct { Message *string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go index e3701d11..dff7a3c2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go @@ -11,10 +11,11 @@ import ( // returns. type AssumedRoleUser struct { - // The ARN of the temporary security credentials that are returned from the - // AssumeRole action. For more information about ARNs and how to use them in - // policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. + // The ARN of the temporary security credentials that are returned from the AssumeRole + // action. For more information about ARNs and how to use them in policies, see [IAM Identifiers]in + // the IAM User Guide. + // + // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html // // This member is required. Arn *string @@ -61,8 +62,9 @@ type FederatedUser struct { // The ARN that specifies the federated user that is associated with the // credentials. For more information about ARNs and how to use them in policies, - // see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. + // see [IAM Identifiers]in the IAM User Guide. + // + // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html // // This member is required. Arn *string @@ -81,9 +83,10 @@ type FederatedUser struct { type PolicyDescriptorType struct { // The Amazon Resource Name (ARN) of the IAM managed policy to use as a session - // policy for the role. For more information about ARNs, see Amazon Resource Names - // (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // policy for the role. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the Amazon Web + // Services General Reference. + // + // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Arn *string noSmithyDocumentSerde @@ -107,23 +110,30 @@ type ProvidedContext struct { // You can pass custom key-value pair attributes when you assume a role or // federate a user. These are called session tags. You can then use the session -// tags to control access to resources. For more information, see Tagging Amazon -// Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) -// in the IAM User Guide. +// tags to control access to resources. For more information, see [Tagging Amazon Web Services STS Sessions]in the IAM User +// Guide. +// +// [Tagging Amazon Web Services STS Sessions]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html type Tag struct { - // The key for a session tag. You can pass up to 50 session tags. The plain text - // session tag keys can’t exceed 128 characters. For these and additional limits, - // see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) - // in the IAM User Guide. + // The key for a session tag. + // + // You can pass up to 50 session tags. The plain text session tag keys can’t + // exceed 128 characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User + // Guide. + // + // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length // // This member is required. Key *string - // The value for a session tag. You can pass up to 50 session tags. The plain text - // session tag values can’t exceed 256 characters. For these and additional limits, - // see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) - // in the IAM User Guide. + // The value for a session tag. + // + // You can pass up to 50 session tags. The plain text session tag values can’t + // exceed 256 characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User + // Guide. + // + // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length // // This member is required. Value *string diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index 39ffae99..96d57df8 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,15 @@ +# Release (2024-08-14) + +## Module Highlights +* `github.com/aws/smithy-go`: v1.20.4 + * **Dependency Update**: Bump minimum Go version to 1.21. + +# Release (2024-06-27) + +## Module Highlights +* `github.com/aws/smithy-go`: v1.20.3 + * **Bug Fix**: Fix encoding/cbor test overflow on x86. + # Release (2024-03-29) * No change notes available for this release. diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md index c374f692..08df7458 100644 --- a/vendor/github.com/aws/smithy-go/README.md +++ b/vendor/github.com/aws/smithy-go/README.md @@ -1,19 +1,21 @@ -## Smithy Go +# Smithy Go [![Go Build Status](https://github.com/aws/smithy-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/go.yml)[![Codegen Build Status](https://github.com/aws/smithy-go/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/codegen.yml) -[Smithy](https://smithy.io/) code generators for Go. +[Smithy](https://smithy.io/) code generators for Go and the accompanying smithy-go runtime. + +The smithy-go runtime requires a minimum version of Go 1.20. **WARNING: All interfaces are subject to change.** -## Can I use this? +## Can I use the code generators? In order to generate a usable smithy client you must provide a [protocol definition](https://github.com/aws/smithy-go/blob/main/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/ProtocolGenerator.java), such as [AWS restJson1](https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html), in order to generate transport mechanisms and serialization/deserialization code ("serde") accordingly. -The code generator does not currently support any protocols out of the box, +The code generator does not currently support any protocols out of the box other than the new `smithy.protocols#rpcv2Cbor`, therefore the useability of this project on its own is currently limited. Support for all [AWS protocols](https://smithy.io/2.0/aws/protocols/index.html) exists in [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2). We are @@ -21,6 +23,70 @@ tracking the movement of those out of the SDK into smithy-go in [#458](https://github.com/aws/smithy-go/issues/458), but there's currently no timeline for doing so. +## Plugins + +This repository implements the following Smithy build plugins: + +| ID | GAV prefix | Description | +|----|------------|-------------| +| `go-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go client code generation for Smithy models. | +| `go-server-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go server code generation for Smithy models. | + +**NOTE: Build plugins are not currently published to mavenCentral. You must publish to mavenLocal to make the build plugins visible to the Smithy CLI. The artifact version is currently fixed at 0.1.0.** + +## `go-codegen` + +### Configuration + +[`GoSettings`](codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java) +contains all of the settings enabled from `smithy-build.json` and helper +methods and types. The up-to-date list of top-level properties enabled for +`go-client-codegen` can be found in `GoSettings::from()`. + +| Setting | Type | Required | Description | +|-----------------|---------|----------|-----------------------------------------------------------------------------------------------------------------------------| +| `service` | string | yes | The Shape ID of the service for which to generate the client. | +| `module` | string | yes | Name of the module in `generated.json` (and `go.mod` if `generateGoMod` is enabled) and `doc.go`. | +| `generateGoMod` | boolean | | Whether to generate a default `go.mod` file. The default value is `false`. | +| `goDirective` | string | | [Go directive](https://go.dev/ref/mod#go-mod-file-go) of the module. The default value is the minimum supported Go version. | + +### Supported protocols + +| Protocol | Notes | +|----------|-------| +| [`smithy.protocols#rpcv2Cbor`](https://smithy.io/2.0/additional-specs/protocols/smithy-rpc-v2.html) | Event streaming not yet implemented. | + +### Example + +This example applies the `go-codegen` build plugin to the Smithy quickstart +example created from `smithy init`: + +```json +{ + "version": "1.0", + "sources": [ + "models" + ], + "maven": { + "dependencies": [ + "software.amazon.smithy.go:smithy-go-codegen:0.1.0" + ] + }, + "plugins": { + "go-codegen": { + "service": "example.weather#Weather", + "module": "github.com/example/weather", + "generateGoMod": true, + "goDirective": "1.20" + } + } +} +``` + +## `go-server-codegen` + +This plugin is a work-in-progress and is currently undocumented. + ## License This project is licensed under the Apache-2.0 License. diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index a6b22f35..33355b22 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.20.2" +const goModuleVersion = "1.20.4" diff --git a/vendor/github.com/jmespath/go-jmespath/.gitignore b/vendor/github.com/jmespath/go-jmespath/.gitignore deleted file mode 100644 index 5091fb07..00000000 --- a/vendor/github.com/jmespath/go-jmespath/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/jpgo -jmespath-fuzz.zip -cpu.out -go-jmespath.test diff --git a/vendor/github.com/jmespath/go-jmespath/.travis.yml b/vendor/github.com/jmespath/go-jmespath/.travis.yml deleted file mode 100644 index c56f37c0..00000000 --- a/vendor/github.com/jmespath/go-jmespath/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: go - -sudo: false - -go: - - 1.5.x - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x - - 1.10.x - - 1.11.x - - 1.12.x - - 1.13.x - - 1.14.x - - 1.15.x - - tip - -allow_failures: - - go: tip - -script: make build - -matrix: - include: - - language: go - go: 1.15.x - script: make test diff --git a/vendor/github.com/jmespath/go-jmespath/LICENSE b/vendor/github.com/jmespath/go-jmespath/LICENSE deleted file mode 100644 index b03310a9..00000000 --- a/vendor/github.com/jmespath/go-jmespath/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2015 James Saryerwinnie - -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/jmespath/go-jmespath/Makefile b/vendor/github.com/jmespath/go-jmespath/Makefile deleted file mode 100644 index fb38ec27..00000000 --- a/vendor/github.com/jmespath/go-jmespath/Makefile +++ /dev/null @@ -1,51 +0,0 @@ - -CMD = jpgo - -SRC_PKGS=./ ./cmd/... ./fuzz/... - -help: - @echo "Please use \`make ' where is one of" - @echo " test to run all the tests" - @echo " build to build the library and jp executable" - @echo " generate to run codegen" - - -generate: - go generate ${SRC_PKGS} - -build: - rm -f $(CMD) - go build ${SRC_PKGS} - rm -f cmd/$(CMD)/$(CMD) && cd cmd/$(CMD)/ && go build ./... - mv cmd/$(CMD)/$(CMD) . - -test: test-internal-testify - echo "making tests ${SRC_PKGS}" - go test -v ${SRC_PKGS} - -check: - go vet ${SRC_PKGS} - @echo "golint ${SRC_PKGS}" - @lint=`golint ${SRC_PKGS}`; \ - lint=`echo "$$lint" | grep -v "astnodetype_string.go" | grep -v "toktype_string.go"`; \ - echo "$$lint"; \ - if [ "$$lint" != "" ]; then exit 1; fi - -htmlc: - go test -coverprofile="/tmp/jpcov" && go tool cover -html="/tmp/jpcov" && unlink /tmp/jpcov - -buildfuzz: - go-fuzz-build github.com/jmespath/go-jmespath/fuzz - -fuzz: buildfuzz - go-fuzz -bin=./jmespath-fuzz.zip -workdir=fuzz/testdata - -bench: - go test -bench . -cpuprofile cpu.out - -pprof-cpu: - go tool pprof ./go-jmespath.test ./cpu.out - -test-internal-testify: - cd internal/testify && go test ./... - diff --git a/vendor/github.com/jmespath/go-jmespath/README.md b/vendor/github.com/jmespath/go-jmespath/README.md deleted file mode 100644 index 110ad799..00000000 --- a/vendor/github.com/jmespath/go-jmespath/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# go-jmespath - A JMESPath implementation in Go - -[![Build Status](https://img.shields.io/travis/jmespath/go-jmespath.svg)](https://travis-ci.org/jmespath/go-jmespath) - - - -go-jmespath is a GO implementation of JMESPath, -which is a query language for JSON. It will take a JSON -document and transform it into another JSON document -through a JMESPath expression. - -Using go-jmespath is really easy. There's a single function -you use, `jmespath.search`: - - -```go -> import "github.com/jmespath/go-jmespath" -> -> var jsondata = []byte(`{"foo": {"bar": {"baz": [0, 1, 2, 3, 4]}}}`) // your data -> var data interface{} -> err := json.Unmarshal(jsondata, &data) -> result, err := jmespath.Search("foo.bar.baz[2]", data) -result = 2 -``` - -In the example we gave the ``search`` function input data of -`{"foo": {"bar": {"baz": [0, 1, 2, 3, 4]}}}` as well as the JMESPath -expression `foo.bar.baz[2]`, and the `search` function evaluated -the expression against the input data to produce the result ``2``. - -The JMESPath language can do a lot more than select an element -from a list. Here are a few more examples: - -```go -> var jsondata = []byte(`{"foo": {"bar": {"baz": [0, 1, 2, 3, 4]}}}`) // your data -> var data interface{} -> err := json.Unmarshal(jsondata, &data) -> result, err := jmespath.search("foo.bar", data) -result = { "baz": [ 0, 1, 2, 3, 4 ] } - - -> var jsondata = []byte(`{"foo": [{"first": "a", "last": "b"}, - {"first": "c", "last": "d"}]}`) // your data -> var data interface{} -> err := json.Unmarshal(jsondata, &data) -> result, err := jmespath.search({"foo[*].first", data) -result [ 'a', 'c' ] - - -> var jsondata = []byte(`{"foo": [{"age": 20}, {"age": 25}, - {"age": 30}, {"age": 35}, - {"age": 40}]}`) // your data -> var data interface{} -> err := json.Unmarshal(jsondata, &data) -> result, err := jmespath.search("foo[?age > `30`]") -result = [ { age: 35 }, { age: 40 } ] -``` - -You can also pre-compile your query. This is usefull if -you are going to run multiple searches with it: - -```go - > var jsondata = []byte(`{"foo": "bar"}`) - > var data interface{} - > err := json.Unmarshal(jsondata, &data) - > precompiled, err := Compile("foo") - > if err != nil{ - > // ... handle the error - > } - > result, err := precompiled.Search(data) - result = "bar" -``` - -## More Resources - -The example above only show a small amount of what -a JMESPath expression can do. If you want to take a -tour of the language, the *best* place to go is the -[JMESPath Tutorial](http://jmespath.org/tutorial.html). - -One of the best things about JMESPath is that it is -implemented in many different programming languages including -python, ruby, php, lua, etc. To see a complete list of libraries, -check out the [JMESPath libraries page](http://jmespath.org/libraries.html). - -And finally, the full JMESPath specification can be found -on the [JMESPath site](http://jmespath.org/specification.html). diff --git a/vendor/github.com/jmespath/go-jmespath/api.go b/vendor/github.com/jmespath/go-jmespath/api.go deleted file mode 100644 index 010efe9b..00000000 --- a/vendor/github.com/jmespath/go-jmespath/api.go +++ /dev/null @@ -1,49 +0,0 @@ -package jmespath - -import "strconv" - -// JMESPath is the representation of a compiled JMES path query. A JMESPath is -// safe for concurrent use by multiple goroutines. -type JMESPath struct { - ast ASTNode - intr *treeInterpreter -} - -// Compile parses a JMESPath expression and returns, if successful, a JMESPath -// object that can be used to match against data. -func Compile(expression string) (*JMESPath, error) { - parser := NewParser() - ast, err := parser.Parse(expression) - if err != nil { - return nil, err - } - jmespath := &JMESPath{ast: ast, intr: newInterpreter()} - return jmespath, nil -} - -// MustCompile is like Compile but panics if the expression cannot be parsed. -// It simplifies safe initialization of global variables holding compiled -// JMESPaths. -func MustCompile(expression string) *JMESPath { - jmespath, err := Compile(expression) - if err != nil { - panic(`jmespath: Compile(` + strconv.Quote(expression) + `): ` + err.Error()) - } - return jmespath -} - -// Search evaluates a JMESPath expression against input data and returns the result. -func (jp *JMESPath) Search(data interface{}) (interface{}, error) { - return jp.intr.Execute(jp.ast, data) -} - -// Search evaluates a JMESPath expression against input data and returns the result. -func Search(expression string, data interface{}) (interface{}, error) { - intr := newInterpreter() - parser := NewParser() - ast, err := parser.Parse(expression) - if err != nil { - return nil, err - } - return intr.Execute(ast, data) -} diff --git a/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go b/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go deleted file mode 100644 index 1cd2d239..00000000 --- a/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go +++ /dev/null @@ -1,16 +0,0 @@ -// generated by stringer -type astNodeType; DO NOT EDIT - -package jmespath - -import "fmt" - -const _astNodeType_name = "ASTEmptyASTComparatorASTCurrentNodeASTExpRefASTFunctionExpressionASTFieldASTFilterProjectionASTFlattenASTIdentityASTIndexASTIndexExpressionASTKeyValPairASTLiteralASTMultiSelectHashASTMultiSelectListASTOrExpressionASTAndExpressionASTNotExpressionASTPipeASTProjectionASTSubexpressionASTSliceASTValueProjection" - -var _astNodeType_index = [...]uint16{0, 8, 21, 35, 44, 65, 73, 92, 102, 113, 121, 139, 152, 162, 180, 198, 213, 229, 245, 252, 265, 281, 289, 307} - -func (i astNodeType) String() string { - if i < 0 || i >= astNodeType(len(_astNodeType_index)-1) { - return fmt.Sprintf("astNodeType(%d)", i) - } - return _astNodeType_name[_astNodeType_index[i]:_astNodeType_index[i+1]] -} diff --git a/vendor/github.com/jmespath/go-jmespath/functions.go b/vendor/github.com/jmespath/go-jmespath/functions.go deleted file mode 100644 index 9b7cd89b..00000000 --- a/vendor/github.com/jmespath/go-jmespath/functions.go +++ /dev/null @@ -1,842 +0,0 @@ -package jmespath - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "reflect" - "sort" - "strconv" - "strings" - "unicode/utf8" -) - -type jpFunction func(arguments []interface{}) (interface{}, error) - -type jpType string - -const ( - jpUnknown jpType = "unknown" - jpNumber jpType = "number" - jpString jpType = "string" - jpArray jpType = "array" - jpObject jpType = "object" - jpArrayNumber jpType = "array[number]" - jpArrayString jpType = "array[string]" - jpExpref jpType = "expref" - jpAny jpType = "any" -) - -type functionEntry struct { - name string - arguments []argSpec - handler jpFunction - hasExpRef bool -} - -type argSpec struct { - types []jpType - variadic bool -} - -type byExprString struct { - intr *treeInterpreter - node ASTNode - items []interface{} - hasError bool -} - -func (a *byExprString) Len() int { - return len(a.items) -} -func (a *byExprString) Swap(i, j int) { - a.items[i], a.items[j] = a.items[j], a.items[i] -} -func (a *byExprString) Less(i, j int) bool { - first, err := a.intr.Execute(a.node, a.items[i]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - ith, ok := first.(string) - if !ok { - a.hasError = true - return true - } - second, err := a.intr.Execute(a.node, a.items[j]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - jth, ok := second.(string) - if !ok { - a.hasError = true - return true - } - return ith < jth -} - -type byExprFloat struct { - intr *treeInterpreter - node ASTNode - items []interface{} - hasError bool -} - -func (a *byExprFloat) Len() int { - return len(a.items) -} -func (a *byExprFloat) Swap(i, j int) { - a.items[i], a.items[j] = a.items[j], a.items[i] -} -func (a *byExprFloat) Less(i, j int) bool { - first, err := a.intr.Execute(a.node, a.items[i]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - ith, ok := first.(float64) - if !ok { - a.hasError = true - return true - } - second, err := a.intr.Execute(a.node, a.items[j]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - jth, ok := second.(float64) - if !ok { - a.hasError = true - return true - } - return ith < jth -} - -type functionCaller struct { - functionTable map[string]functionEntry -} - -func newFunctionCaller() *functionCaller { - caller := &functionCaller{} - caller.functionTable = map[string]functionEntry{ - "length": { - name: "length", - arguments: []argSpec{ - {types: []jpType{jpString, jpArray, jpObject}}, - }, - handler: jpfLength, - }, - "starts_with": { - name: "starts_with", - arguments: []argSpec{ - {types: []jpType{jpString}}, - {types: []jpType{jpString}}, - }, - handler: jpfStartsWith, - }, - "abs": { - name: "abs", - arguments: []argSpec{ - {types: []jpType{jpNumber}}, - }, - handler: jpfAbs, - }, - "avg": { - name: "avg", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber}}, - }, - handler: jpfAvg, - }, - "ceil": { - name: "ceil", - arguments: []argSpec{ - {types: []jpType{jpNumber}}, - }, - handler: jpfCeil, - }, - "contains": { - name: "contains", - arguments: []argSpec{ - {types: []jpType{jpArray, jpString}}, - {types: []jpType{jpAny}}, - }, - handler: jpfContains, - }, - "ends_with": { - name: "ends_with", - arguments: []argSpec{ - {types: []jpType{jpString}}, - {types: []jpType{jpString}}, - }, - handler: jpfEndsWith, - }, - "floor": { - name: "floor", - arguments: []argSpec{ - {types: []jpType{jpNumber}}, - }, - handler: jpfFloor, - }, - "map": { - name: "amp", - arguments: []argSpec{ - {types: []jpType{jpExpref}}, - {types: []jpType{jpArray}}, - }, - handler: jpfMap, - hasExpRef: true, - }, - "max": { - name: "max", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber, jpArrayString}}, - }, - handler: jpfMax, - }, - "merge": { - name: "merge", - arguments: []argSpec{ - {types: []jpType{jpObject}, variadic: true}, - }, - handler: jpfMerge, - }, - "max_by": { - name: "max_by", - arguments: []argSpec{ - {types: []jpType{jpArray}}, - {types: []jpType{jpExpref}}, - }, - handler: jpfMaxBy, - hasExpRef: true, - }, - "sum": { - name: "sum", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber}}, - }, - handler: jpfSum, - }, - "min": { - name: "min", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber, jpArrayString}}, - }, - handler: jpfMin, - }, - "min_by": { - name: "min_by", - arguments: []argSpec{ - {types: []jpType{jpArray}}, - {types: []jpType{jpExpref}}, - }, - handler: jpfMinBy, - hasExpRef: true, - }, - "type": { - name: "type", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfType, - }, - "keys": { - name: "keys", - arguments: []argSpec{ - {types: []jpType{jpObject}}, - }, - handler: jpfKeys, - }, - "values": { - name: "values", - arguments: []argSpec{ - {types: []jpType{jpObject}}, - }, - handler: jpfValues, - }, - "sort": { - name: "sort", - arguments: []argSpec{ - {types: []jpType{jpArrayString, jpArrayNumber}}, - }, - handler: jpfSort, - }, - "sort_by": { - name: "sort_by", - arguments: []argSpec{ - {types: []jpType{jpArray}}, - {types: []jpType{jpExpref}}, - }, - handler: jpfSortBy, - hasExpRef: true, - }, - "join": { - name: "join", - arguments: []argSpec{ - {types: []jpType{jpString}}, - {types: []jpType{jpArrayString}}, - }, - handler: jpfJoin, - }, - "reverse": { - name: "reverse", - arguments: []argSpec{ - {types: []jpType{jpArray, jpString}}, - }, - handler: jpfReverse, - }, - "to_array": { - name: "to_array", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfToArray, - }, - "to_string": { - name: "to_string", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfToString, - }, - "to_number": { - name: "to_number", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfToNumber, - }, - "not_null": { - name: "not_null", - arguments: []argSpec{ - {types: []jpType{jpAny}, variadic: true}, - }, - handler: jpfNotNull, - }, - } - return caller -} - -func (e *functionEntry) resolveArgs(arguments []interface{}) ([]interface{}, error) { - if len(e.arguments) == 0 { - return arguments, nil - } - if !e.arguments[len(e.arguments)-1].variadic { - if len(e.arguments) != len(arguments) { - return nil, errors.New("incorrect number of args") - } - for i, spec := range e.arguments { - userArg := arguments[i] - err := spec.typeCheck(userArg) - if err != nil { - return nil, err - } - } - return arguments, nil - } - if len(arguments) < len(e.arguments) { - return nil, errors.New("Invalid arity.") - } - return arguments, nil -} - -func (a *argSpec) typeCheck(arg interface{}) error { - for _, t := range a.types { - switch t { - case jpNumber: - if _, ok := arg.(float64); ok { - return nil - } - case jpString: - if _, ok := arg.(string); ok { - return nil - } - case jpArray: - if isSliceType(arg) { - return nil - } - case jpObject: - if _, ok := arg.(map[string]interface{}); ok { - return nil - } - case jpArrayNumber: - if _, ok := toArrayNum(arg); ok { - return nil - } - case jpArrayString: - if _, ok := toArrayStr(arg); ok { - return nil - } - case jpAny: - return nil - case jpExpref: - if _, ok := arg.(expRef); ok { - return nil - } - } - } - return fmt.Errorf("Invalid type for: %v, expected: %#v", arg, a.types) -} - -func (f *functionCaller) CallFunction(name string, arguments []interface{}, intr *treeInterpreter) (interface{}, error) { - entry, ok := f.functionTable[name] - if !ok { - return nil, errors.New("unknown function: " + name) - } - resolvedArgs, err := entry.resolveArgs(arguments) - if err != nil { - return nil, err - } - if entry.hasExpRef { - var extra []interface{} - extra = append(extra, intr) - resolvedArgs = append(extra, resolvedArgs...) - } - return entry.handler(resolvedArgs) -} - -func jpfAbs(arguments []interface{}) (interface{}, error) { - num := arguments[0].(float64) - return math.Abs(num), nil -} - -func jpfLength(arguments []interface{}) (interface{}, error) { - arg := arguments[0] - if c, ok := arg.(string); ok { - return float64(utf8.RuneCountInString(c)), nil - } else if isSliceType(arg) { - v := reflect.ValueOf(arg) - return float64(v.Len()), nil - } else if c, ok := arg.(map[string]interface{}); ok { - return float64(len(c)), nil - } - return nil, errors.New("could not compute length()") -} - -func jpfStartsWith(arguments []interface{}) (interface{}, error) { - search := arguments[0].(string) - prefix := arguments[1].(string) - return strings.HasPrefix(search, prefix), nil -} - -func jpfAvg(arguments []interface{}) (interface{}, error) { - // We've already type checked the value so we can safely use - // type assertions. - args := arguments[0].([]interface{}) - length := float64(len(args)) - numerator := 0.0 - for _, n := range args { - numerator += n.(float64) - } - return numerator / length, nil -} -func jpfCeil(arguments []interface{}) (interface{}, error) { - val := arguments[0].(float64) - return math.Ceil(val), nil -} -func jpfContains(arguments []interface{}) (interface{}, error) { - search := arguments[0] - el := arguments[1] - if searchStr, ok := search.(string); ok { - if elStr, ok := el.(string); ok { - return strings.Index(searchStr, elStr) != -1, nil - } - return false, nil - } - // Otherwise this is a generic contains for []interface{} - general := search.([]interface{}) - for _, item := range general { - if item == el { - return true, nil - } - } - return false, nil -} -func jpfEndsWith(arguments []interface{}) (interface{}, error) { - search := arguments[0].(string) - suffix := arguments[1].(string) - return strings.HasSuffix(search, suffix), nil -} -func jpfFloor(arguments []interface{}) (interface{}, error) { - val := arguments[0].(float64) - return math.Floor(val), nil -} -func jpfMap(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - exp := arguments[1].(expRef) - node := exp.ref - arr := arguments[2].([]interface{}) - mapped := make([]interface{}, 0, len(arr)) - for _, value := range arr { - current, err := intr.Execute(node, value) - if err != nil { - return nil, err - } - mapped = append(mapped, current) - } - return mapped, nil -} -func jpfMax(arguments []interface{}) (interface{}, error) { - if items, ok := toArrayNum(arguments[0]); ok { - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item > best { - best = item - } - } - return best, nil - } - // Otherwise we're dealing with a max() of strings. - items, _ := toArrayStr(arguments[0]) - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item > best { - best = item - } - } - return best, nil -} -func jpfMerge(arguments []interface{}) (interface{}, error) { - final := make(map[string]interface{}) - for _, m := range arguments { - mapped := m.(map[string]interface{}) - for key, value := range mapped { - final[key] = value - } - } - return final, nil -} -func jpfMaxBy(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - arr := arguments[1].([]interface{}) - exp := arguments[2].(expRef) - node := exp.ref - if len(arr) == 0 { - return nil, nil - } else if len(arr) == 1 { - return arr[0], nil - } - start, err := intr.Execute(node, arr[0]) - if err != nil { - return nil, err - } - switch t := start.(type) { - case float64: - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(float64) - if !ok { - return nil, errors.New("invalid type, must be number") - } - if current > bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - case string: - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(string) - if !ok { - return nil, errors.New("invalid type, must be string") - } - if current > bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - default: - return nil, errors.New("invalid type, must be number of string") - } -} -func jpfSum(arguments []interface{}) (interface{}, error) { - items, _ := toArrayNum(arguments[0]) - sum := 0.0 - for _, item := range items { - sum += item - } - return sum, nil -} - -func jpfMin(arguments []interface{}) (interface{}, error) { - if items, ok := toArrayNum(arguments[0]); ok { - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item < best { - best = item - } - } - return best, nil - } - items, _ := toArrayStr(arguments[0]) - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item < best { - best = item - } - } - return best, nil -} - -func jpfMinBy(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - arr := arguments[1].([]interface{}) - exp := arguments[2].(expRef) - node := exp.ref - if len(arr) == 0 { - return nil, nil - } else if len(arr) == 1 { - return arr[0], nil - } - start, err := intr.Execute(node, arr[0]) - if err != nil { - return nil, err - } - if t, ok := start.(float64); ok { - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(float64) - if !ok { - return nil, errors.New("invalid type, must be number") - } - if current < bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - } else if t, ok := start.(string); ok { - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(string) - if !ok { - return nil, errors.New("invalid type, must be string") - } - if current < bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - } else { - return nil, errors.New("invalid type, must be number of string") - } -} -func jpfType(arguments []interface{}) (interface{}, error) { - arg := arguments[0] - if _, ok := arg.(float64); ok { - return "number", nil - } - if _, ok := arg.(string); ok { - return "string", nil - } - if _, ok := arg.([]interface{}); ok { - return "array", nil - } - if _, ok := arg.(map[string]interface{}); ok { - return "object", nil - } - if arg == nil { - return "null", nil - } - if arg == true || arg == false { - return "boolean", nil - } - return nil, errors.New("unknown type") -} -func jpfKeys(arguments []interface{}) (interface{}, error) { - arg := arguments[0].(map[string]interface{}) - collected := make([]interface{}, 0, len(arg)) - for key := range arg { - collected = append(collected, key) - } - return collected, nil -} -func jpfValues(arguments []interface{}) (interface{}, error) { - arg := arguments[0].(map[string]interface{}) - collected := make([]interface{}, 0, len(arg)) - for _, value := range arg { - collected = append(collected, value) - } - return collected, nil -} -func jpfSort(arguments []interface{}) (interface{}, error) { - if items, ok := toArrayNum(arguments[0]); ok { - d := sort.Float64Slice(items) - sort.Stable(d) - final := make([]interface{}, len(d)) - for i, val := range d { - final[i] = val - } - return final, nil - } - // Otherwise we're dealing with sort()'ing strings. - items, _ := toArrayStr(arguments[0]) - d := sort.StringSlice(items) - sort.Stable(d) - final := make([]interface{}, len(d)) - for i, val := range d { - final[i] = val - } - return final, nil -} -func jpfSortBy(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - arr := arguments[1].([]interface{}) - exp := arguments[2].(expRef) - node := exp.ref - if len(arr) == 0 { - return arr, nil - } else if len(arr) == 1 { - return arr, nil - } - start, err := intr.Execute(node, arr[0]) - if err != nil { - return nil, err - } - if _, ok := start.(float64); ok { - sortable := &byExprFloat{intr, node, arr, false} - sort.Stable(sortable) - if sortable.hasError { - return nil, errors.New("error in sort_by comparison") - } - return arr, nil - } else if _, ok := start.(string); ok { - sortable := &byExprString{intr, node, arr, false} - sort.Stable(sortable) - if sortable.hasError { - return nil, errors.New("error in sort_by comparison") - } - return arr, nil - } else { - return nil, errors.New("invalid type, must be number of string") - } -} -func jpfJoin(arguments []interface{}) (interface{}, error) { - sep := arguments[0].(string) - // We can't just do arguments[1].([]string), we have to - // manually convert each item to a string. - arrayStr := []string{} - for _, item := range arguments[1].([]interface{}) { - arrayStr = append(arrayStr, item.(string)) - } - return strings.Join(arrayStr, sep), nil -} -func jpfReverse(arguments []interface{}) (interface{}, error) { - if s, ok := arguments[0].(string); ok { - r := []rune(s) - for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 { - r[i], r[j] = r[j], r[i] - } - return string(r), nil - } - items := arguments[0].([]interface{}) - length := len(items) - reversed := make([]interface{}, length) - for i, item := range items { - reversed[length-(i+1)] = item - } - return reversed, nil -} -func jpfToArray(arguments []interface{}) (interface{}, error) { - if _, ok := arguments[0].([]interface{}); ok { - return arguments[0], nil - } - return arguments[:1:1], nil -} -func jpfToString(arguments []interface{}) (interface{}, error) { - if v, ok := arguments[0].(string); ok { - return v, nil - } - result, err := json.Marshal(arguments[0]) - if err != nil { - return nil, err - } - return string(result), nil -} -func jpfToNumber(arguments []interface{}) (interface{}, error) { - arg := arguments[0] - if v, ok := arg.(float64); ok { - return v, nil - } - if v, ok := arg.(string); ok { - conv, err := strconv.ParseFloat(v, 64) - if err != nil { - return nil, nil - } - return conv, nil - } - if _, ok := arg.([]interface{}); ok { - return nil, nil - } - if _, ok := arg.(map[string]interface{}); ok { - return nil, nil - } - if arg == nil { - return nil, nil - } - if arg == true || arg == false { - return nil, nil - } - return nil, errors.New("unknown type") -} -func jpfNotNull(arguments []interface{}) (interface{}, error) { - for _, arg := range arguments { - if arg != nil { - return arg, nil - } - } - return nil, nil -} diff --git a/vendor/github.com/jmespath/go-jmespath/interpreter.go b/vendor/github.com/jmespath/go-jmespath/interpreter.go deleted file mode 100644 index 13c74604..00000000 --- a/vendor/github.com/jmespath/go-jmespath/interpreter.go +++ /dev/null @@ -1,418 +0,0 @@ -package jmespath - -import ( - "errors" - "reflect" - "unicode" - "unicode/utf8" -) - -/* This is a tree based interpreter. It walks the AST and directly - interprets the AST to search through a JSON document. -*/ - -type treeInterpreter struct { - fCall *functionCaller -} - -func newInterpreter() *treeInterpreter { - interpreter := treeInterpreter{} - interpreter.fCall = newFunctionCaller() - return &interpreter -} - -type expRef struct { - ref ASTNode -} - -// Execute takes an ASTNode and input data and interprets the AST directly. -// It will produce the result of applying the JMESPath expression associated -// with the ASTNode to the input data "value". -func (intr *treeInterpreter) Execute(node ASTNode, value interface{}) (interface{}, error) { - switch node.nodeType { - case ASTComparator: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - right, err := intr.Execute(node.children[1], value) - if err != nil { - return nil, err - } - switch node.value { - case tEQ: - return objsEqual(left, right), nil - case tNE: - return !objsEqual(left, right), nil - } - leftNum, ok := left.(float64) - if !ok { - return nil, nil - } - rightNum, ok := right.(float64) - if !ok { - return nil, nil - } - switch node.value { - case tGT: - return leftNum > rightNum, nil - case tGTE: - return leftNum >= rightNum, nil - case tLT: - return leftNum < rightNum, nil - case tLTE: - return leftNum <= rightNum, nil - } - case ASTExpRef: - return expRef{ref: node.children[0]}, nil - case ASTFunctionExpression: - resolvedArgs := []interface{}{} - for _, arg := range node.children { - current, err := intr.Execute(arg, value) - if err != nil { - return nil, err - } - resolvedArgs = append(resolvedArgs, current) - } - return intr.fCall.CallFunction(node.value.(string), resolvedArgs, intr) - case ASTField: - if m, ok := value.(map[string]interface{}); ok { - key := node.value.(string) - return m[key], nil - } - return intr.fieldFromStruct(node.value.(string), value) - case ASTFilterProjection: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, nil - } - sliceType, ok := left.([]interface{}) - if !ok { - if isSliceType(left) { - return intr.filterProjectionWithReflection(node, left) - } - return nil, nil - } - compareNode := node.children[2] - collected := []interface{}{} - for _, element := range sliceType { - result, err := intr.Execute(compareNode, element) - if err != nil { - return nil, err - } - if !isFalse(result) { - current, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - } - return collected, nil - case ASTFlatten: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, nil - } - sliceType, ok := left.([]interface{}) - if !ok { - // If we can't type convert to []interface{}, there's - // a chance this could still work via reflection if we're - // dealing with user provided types. - if isSliceType(left) { - return intr.flattenWithReflection(left) - } - return nil, nil - } - flattened := []interface{}{} - for _, element := range sliceType { - if elementSlice, ok := element.([]interface{}); ok { - flattened = append(flattened, elementSlice...) - } else if isSliceType(element) { - reflectFlat := []interface{}{} - v := reflect.ValueOf(element) - for i := 0; i < v.Len(); i++ { - reflectFlat = append(reflectFlat, v.Index(i).Interface()) - } - flattened = append(flattened, reflectFlat...) - } else { - flattened = append(flattened, element) - } - } - return flattened, nil - case ASTIdentity, ASTCurrentNode: - return value, nil - case ASTIndex: - if sliceType, ok := value.([]interface{}); ok { - index := node.value.(int) - if index < 0 { - index += len(sliceType) - } - if index < len(sliceType) && index >= 0 { - return sliceType[index], nil - } - return nil, nil - } - // Otherwise try via reflection. - rv := reflect.ValueOf(value) - if rv.Kind() == reflect.Slice { - index := node.value.(int) - if index < 0 { - index += rv.Len() - } - if index < rv.Len() && index >= 0 { - v := rv.Index(index) - return v.Interface(), nil - } - } - return nil, nil - case ASTKeyValPair: - return intr.Execute(node.children[0], value) - case ASTLiteral: - return node.value, nil - case ASTMultiSelectHash: - if value == nil { - return nil, nil - } - collected := make(map[string]interface{}) - for _, child := range node.children { - current, err := intr.Execute(child, value) - if err != nil { - return nil, err - } - key := child.value.(string) - collected[key] = current - } - return collected, nil - case ASTMultiSelectList: - if value == nil { - return nil, nil - } - collected := []interface{}{} - for _, child := range node.children { - current, err := intr.Execute(child, value) - if err != nil { - return nil, err - } - collected = append(collected, current) - } - return collected, nil - case ASTOrExpression: - matched, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - if isFalse(matched) { - matched, err = intr.Execute(node.children[1], value) - if err != nil { - return nil, err - } - } - return matched, nil - case ASTAndExpression: - matched, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - if isFalse(matched) { - return matched, nil - } - return intr.Execute(node.children[1], value) - case ASTNotExpression: - matched, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - if isFalse(matched) { - return true, nil - } - return false, nil - case ASTPipe: - result := value - var err error - for _, child := range node.children { - result, err = intr.Execute(child, result) - if err != nil { - return nil, err - } - } - return result, nil - case ASTProjection: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - sliceType, ok := left.([]interface{}) - if !ok { - if isSliceType(left) { - return intr.projectWithReflection(node, left) - } - return nil, nil - } - collected := []interface{}{} - var current interface{} - for _, element := range sliceType { - current, err = intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - return collected, nil - case ASTSubexpression, ASTIndexExpression: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - return intr.Execute(node.children[1], left) - case ASTSlice: - sliceType, ok := value.([]interface{}) - if !ok { - if isSliceType(value) { - return intr.sliceWithReflection(node, value) - } - return nil, nil - } - parts := node.value.([]*int) - sliceParams := make([]sliceParam, 3) - for i, part := range parts { - if part != nil { - sliceParams[i].Specified = true - sliceParams[i].N = *part - } - } - return slice(sliceType, sliceParams) - case ASTValueProjection: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, nil - } - mapType, ok := left.(map[string]interface{}) - if !ok { - return nil, nil - } - values := make([]interface{}, len(mapType)) - for _, value := range mapType { - values = append(values, value) - } - collected := []interface{}{} - for _, element := range values { - current, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - return collected, nil - } - return nil, errors.New("Unknown AST node: " + node.nodeType.String()) -} - -func (intr *treeInterpreter) fieldFromStruct(key string, value interface{}) (interface{}, error) { - rv := reflect.ValueOf(value) - first, n := utf8.DecodeRuneInString(key) - fieldName := string(unicode.ToUpper(first)) + key[n:] - if rv.Kind() == reflect.Struct { - v := rv.FieldByName(fieldName) - if !v.IsValid() { - return nil, nil - } - return v.Interface(), nil - } else if rv.Kind() == reflect.Ptr { - // Handle multiple levels of indirection? - if rv.IsNil() { - return nil, nil - } - rv = rv.Elem() - v := rv.FieldByName(fieldName) - if !v.IsValid() { - return nil, nil - } - return v.Interface(), nil - } - return nil, nil -} - -func (intr *treeInterpreter) flattenWithReflection(value interface{}) (interface{}, error) { - v := reflect.ValueOf(value) - flattened := []interface{}{} - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - if reflect.TypeOf(element).Kind() == reflect.Slice { - // Then insert the contents of the element - // slice into the flattened slice, - // i.e flattened = append(flattened, mySlice...) - elementV := reflect.ValueOf(element) - for j := 0; j < elementV.Len(); j++ { - flattened = append( - flattened, elementV.Index(j).Interface()) - } - } else { - flattened = append(flattened, element) - } - } - return flattened, nil -} - -func (intr *treeInterpreter) sliceWithReflection(node ASTNode, value interface{}) (interface{}, error) { - v := reflect.ValueOf(value) - parts := node.value.([]*int) - sliceParams := make([]sliceParam, 3) - for i, part := range parts { - if part != nil { - sliceParams[i].Specified = true - sliceParams[i].N = *part - } - } - final := []interface{}{} - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - final = append(final, element) - } - return slice(final, sliceParams) -} - -func (intr *treeInterpreter) filterProjectionWithReflection(node ASTNode, value interface{}) (interface{}, error) { - compareNode := node.children[2] - collected := []interface{}{} - v := reflect.ValueOf(value) - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - result, err := intr.Execute(compareNode, element) - if err != nil { - return nil, err - } - if !isFalse(result) { - current, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - } - return collected, nil -} - -func (intr *treeInterpreter) projectWithReflection(node ASTNode, value interface{}) (interface{}, error) { - collected := []interface{}{} - v := reflect.ValueOf(value) - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - result, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if result != nil { - collected = append(collected, result) - } - } - return collected, nil -} diff --git a/vendor/github.com/jmespath/go-jmespath/lexer.go b/vendor/github.com/jmespath/go-jmespath/lexer.go deleted file mode 100644 index 817900c8..00000000 --- a/vendor/github.com/jmespath/go-jmespath/lexer.go +++ /dev/null @@ -1,420 +0,0 @@ -package jmespath - -import ( - "bytes" - "encoding/json" - "fmt" - "strconv" - "strings" - "unicode/utf8" -) - -type token struct { - tokenType tokType - value string - position int - length int -} - -type tokType int - -const eof = -1 - -// Lexer contains information about the expression being tokenized. -type Lexer struct { - expression string // The expression provided by the user. - currentPos int // The current position in the string. - lastWidth int // The width of the current rune. This - buf bytes.Buffer // Internal buffer used for building up values. -} - -// SyntaxError is the main error used whenever a lexing or parsing error occurs. -type SyntaxError struct { - msg string // Error message displayed to user - Expression string // Expression that generated a SyntaxError - Offset int // The location in the string where the error occurred -} - -func (e SyntaxError) Error() string { - // In the future, it would be good to underline the specific - // location where the error occurred. - return "SyntaxError: " + e.msg -} - -// HighlightLocation will show where the syntax error occurred. -// It will place a "^" character on a line below the expression -// at the point where the syntax error occurred. -func (e SyntaxError) HighlightLocation() string { - return e.Expression + "\n" + strings.Repeat(" ", e.Offset) + "^" -} - -//go:generate stringer -type=tokType -const ( - tUnknown tokType = iota - tStar - tDot - tFilter - tFlatten - tLparen - tRparen - tLbracket - tRbracket - tLbrace - tRbrace - tOr - tPipe - tNumber - tUnquotedIdentifier - tQuotedIdentifier - tComma - tColon - tLT - tLTE - tGT - tGTE - tEQ - tNE - tJSONLiteral - tStringLiteral - tCurrent - tExpref - tAnd - tNot - tEOF -) - -var basicTokens = map[rune]tokType{ - '.': tDot, - '*': tStar, - ',': tComma, - ':': tColon, - '{': tLbrace, - '}': tRbrace, - ']': tRbracket, // tLbracket not included because it could be "[]" - '(': tLparen, - ')': tRparen, - '@': tCurrent, -} - -// Bit mask for [a-zA-Z_] shifted down 64 bits to fit in a single uint64. -// When using this bitmask just be sure to shift the rune down 64 bits -// before checking against identifierStartBits. -const identifierStartBits uint64 = 576460745995190270 - -// Bit mask for [a-zA-Z0-9], 128 bits -> 2 uint64s. -var identifierTrailingBits = [2]uint64{287948901175001088, 576460745995190270} - -var whiteSpace = map[rune]bool{ - ' ': true, '\t': true, '\n': true, '\r': true, -} - -func (t token) String() string { - return fmt.Sprintf("Token{%+v, %s, %d, %d}", - t.tokenType, t.value, t.position, t.length) -} - -// NewLexer creates a new JMESPath lexer. -func NewLexer() *Lexer { - lexer := Lexer{} - return &lexer -} - -func (lexer *Lexer) next() rune { - if lexer.currentPos >= len(lexer.expression) { - lexer.lastWidth = 0 - return eof - } - r, w := utf8.DecodeRuneInString(lexer.expression[lexer.currentPos:]) - lexer.lastWidth = w - lexer.currentPos += w - return r -} - -func (lexer *Lexer) back() { - lexer.currentPos -= lexer.lastWidth -} - -func (lexer *Lexer) peek() rune { - t := lexer.next() - lexer.back() - return t -} - -// tokenize takes an expression and returns corresponding tokens. -func (lexer *Lexer) tokenize(expression string) ([]token, error) { - var tokens []token - lexer.expression = expression - lexer.currentPos = 0 - lexer.lastWidth = 0 -loop: - for { - r := lexer.next() - if identifierStartBits&(1<<(uint64(r)-64)) > 0 { - t := lexer.consumeUnquotedIdentifier() - tokens = append(tokens, t) - } else if val, ok := basicTokens[r]; ok { - // Basic single char token. - t := token{ - tokenType: val, - value: string(r), - position: lexer.currentPos - lexer.lastWidth, - length: 1, - } - tokens = append(tokens, t) - } else if r == '-' || (r >= '0' && r <= '9') { - t := lexer.consumeNumber() - tokens = append(tokens, t) - } else if r == '[' { - t := lexer.consumeLBracket() - tokens = append(tokens, t) - } else if r == '"' { - t, err := lexer.consumeQuotedIdentifier() - if err != nil { - return tokens, err - } - tokens = append(tokens, t) - } else if r == '\'' { - t, err := lexer.consumeRawStringLiteral() - if err != nil { - return tokens, err - } - tokens = append(tokens, t) - } else if r == '`' { - t, err := lexer.consumeLiteral() - if err != nil { - return tokens, err - } - tokens = append(tokens, t) - } else if r == '|' { - t := lexer.matchOrElse(r, '|', tOr, tPipe) - tokens = append(tokens, t) - } else if r == '<' { - t := lexer.matchOrElse(r, '=', tLTE, tLT) - tokens = append(tokens, t) - } else if r == '>' { - t := lexer.matchOrElse(r, '=', tGTE, tGT) - tokens = append(tokens, t) - } else if r == '!' { - t := lexer.matchOrElse(r, '=', tNE, tNot) - tokens = append(tokens, t) - } else if r == '=' { - t := lexer.matchOrElse(r, '=', tEQ, tUnknown) - tokens = append(tokens, t) - } else if r == '&' { - t := lexer.matchOrElse(r, '&', tAnd, tExpref) - tokens = append(tokens, t) - } else if r == eof { - break loop - } else if _, ok := whiteSpace[r]; ok { - // Ignore whitespace - } else { - return tokens, lexer.syntaxError(fmt.Sprintf("Unknown char: %s", strconv.QuoteRuneToASCII(r))) - } - } - tokens = append(tokens, token{tEOF, "", len(lexer.expression), 0}) - return tokens, nil -} - -// Consume characters until the ending rune "r" is reached. -// If the end of the expression is reached before seeing the -// terminating rune "r", then an error is returned. -// If no error occurs then the matching substring is returned. -// The returned string will not include the ending rune. -func (lexer *Lexer) consumeUntil(end rune) (string, error) { - start := lexer.currentPos - current := lexer.next() - for current != end && current != eof { - if current == '\\' && lexer.peek() != eof { - lexer.next() - } - current = lexer.next() - } - if lexer.lastWidth == 0 { - // Then we hit an EOF so we never reached the closing - // delimiter. - return "", SyntaxError{ - msg: "Unclosed delimiter: " + string(end), - Expression: lexer.expression, - Offset: len(lexer.expression), - } - } - return lexer.expression[start : lexer.currentPos-lexer.lastWidth], nil -} - -func (lexer *Lexer) consumeLiteral() (token, error) { - start := lexer.currentPos - value, err := lexer.consumeUntil('`') - if err != nil { - return token{}, err - } - value = strings.Replace(value, "\\`", "`", -1) - return token{ - tokenType: tJSONLiteral, - value: value, - position: start, - length: len(value), - }, nil -} - -func (lexer *Lexer) consumeRawStringLiteral() (token, error) { - start := lexer.currentPos - currentIndex := start - current := lexer.next() - for current != '\'' && lexer.peek() != eof { - if current == '\\' && lexer.peek() == '\'' { - chunk := lexer.expression[currentIndex : lexer.currentPos-1] - lexer.buf.WriteString(chunk) - lexer.buf.WriteString("'") - lexer.next() - currentIndex = lexer.currentPos - } - current = lexer.next() - } - if lexer.lastWidth == 0 { - // Then we hit an EOF so we never reached the closing - // delimiter. - return token{}, SyntaxError{ - msg: "Unclosed delimiter: '", - Expression: lexer.expression, - Offset: len(lexer.expression), - } - } - if currentIndex < lexer.currentPos { - lexer.buf.WriteString(lexer.expression[currentIndex : lexer.currentPos-1]) - } - value := lexer.buf.String() - // Reset the buffer so it can reused again. - lexer.buf.Reset() - return token{ - tokenType: tStringLiteral, - value: value, - position: start, - length: len(value), - }, nil -} - -func (lexer *Lexer) syntaxError(msg string) SyntaxError { - return SyntaxError{ - msg: msg, - Expression: lexer.expression, - Offset: lexer.currentPos - 1, - } -} - -// Checks for a two char token, otherwise matches a single character -// token. This is used whenever a two char token overlaps a single -// char token, e.g. "||" -> tPipe, "|" -> tOr. -func (lexer *Lexer) matchOrElse(first rune, second rune, matchedType tokType, singleCharType tokType) token { - start := lexer.currentPos - lexer.lastWidth - nextRune := lexer.next() - var t token - if nextRune == second { - t = token{ - tokenType: matchedType, - value: string(first) + string(second), - position: start, - length: 2, - } - } else { - lexer.back() - t = token{ - tokenType: singleCharType, - value: string(first), - position: start, - length: 1, - } - } - return t -} - -func (lexer *Lexer) consumeLBracket() token { - // There's three options here: - // 1. A filter expression "[?" - // 2. A flatten operator "[]" - // 3. A bare rbracket "[" - start := lexer.currentPos - lexer.lastWidth - nextRune := lexer.next() - var t token - if nextRune == '?' { - t = token{ - tokenType: tFilter, - value: "[?", - position: start, - length: 2, - } - } else if nextRune == ']' { - t = token{ - tokenType: tFlatten, - value: "[]", - position: start, - length: 2, - } - } else { - t = token{ - tokenType: tLbracket, - value: "[", - position: start, - length: 1, - } - lexer.back() - } - return t -} - -func (lexer *Lexer) consumeQuotedIdentifier() (token, error) { - start := lexer.currentPos - value, err := lexer.consumeUntil('"') - if err != nil { - return token{}, err - } - var decoded string - asJSON := []byte("\"" + value + "\"") - if err := json.Unmarshal([]byte(asJSON), &decoded); err != nil { - return token{}, err - } - return token{ - tokenType: tQuotedIdentifier, - value: decoded, - position: start - 1, - length: len(decoded), - }, nil -} - -func (lexer *Lexer) consumeUnquotedIdentifier() token { - // Consume runes until we reach the end of an unquoted - // identifier. - start := lexer.currentPos - lexer.lastWidth - for { - r := lexer.next() - if r < 0 || r > 128 || identifierTrailingBits[uint64(r)/64]&(1<<(uint64(r)%64)) == 0 { - lexer.back() - break - } - } - value := lexer.expression[start:lexer.currentPos] - return token{ - tokenType: tUnquotedIdentifier, - value: value, - position: start, - length: lexer.currentPos - start, - } -} - -func (lexer *Lexer) consumeNumber() token { - // Consume runes until we reach something that's not a number. - start := lexer.currentPos - lexer.lastWidth - for { - r := lexer.next() - if r < '0' || r > '9' { - lexer.back() - break - } - } - value := lexer.expression[start:lexer.currentPos] - return token{ - tokenType: tNumber, - value: value, - position: start, - length: lexer.currentPos - start, - } -} diff --git a/vendor/github.com/jmespath/go-jmespath/parser.go b/vendor/github.com/jmespath/go-jmespath/parser.go deleted file mode 100644 index 4abc303a..00000000 --- a/vendor/github.com/jmespath/go-jmespath/parser.go +++ /dev/null @@ -1,603 +0,0 @@ -package jmespath - -import ( - "encoding/json" - "fmt" - "strconv" - "strings" -) - -type astNodeType int - -//go:generate stringer -type astNodeType -const ( - ASTEmpty astNodeType = iota - ASTComparator - ASTCurrentNode - ASTExpRef - ASTFunctionExpression - ASTField - ASTFilterProjection - ASTFlatten - ASTIdentity - ASTIndex - ASTIndexExpression - ASTKeyValPair - ASTLiteral - ASTMultiSelectHash - ASTMultiSelectList - ASTOrExpression - ASTAndExpression - ASTNotExpression - ASTPipe - ASTProjection - ASTSubexpression - ASTSlice - ASTValueProjection -) - -// ASTNode represents the abstract syntax tree of a JMESPath expression. -type ASTNode struct { - nodeType astNodeType - value interface{} - children []ASTNode -} - -func (node ASTNode) String() string { - return node.PrettyPrint(0) -} - -// PrettyPrint will pretty print the parsed AST. -// The AST is an implementation detail and this pretty print -// function is provided as a convenience method to help with -// debugging. You should not rely on its output as the internal -// structure of the AST may change at any time. -func (node ASTNode) PrettyPrint(indent int) string { - spaces := strings.Repeat(" ", indent) - output := fmt.Sprintf("%s%s {\n", spaces, node.nodeType) - nextIndent := indent + 2 - if node.value != nil { - if converted, ok := node.value.(fmt.Stringer); ok { - // Account for things like comparator nodes - // that are enums with a String() method. - output += fmt.Sprintf("%svalue: %s\n", strings.Repeat(" ", nextIndent), converted.String()) - } else { - output += fmt.Sprintf("%svalue: %#v\n", strings.Repeat(" ", nextIndent), node.value) - } - } - lastIndex := len(node.children) - if lastIndex > 0 { - output += fmt.Sprintf("%schildren: {\n", strings.Repeat(" ", nextIndent)) - childIndent := nextIndent + 2 - for _, elem := range node.children { - output += elem.PrettyPrint(childIndent) - } - } - output += fmt.Sprintf("%s}\n", spaces) - return output -} - -var bindingPowers = map[tokType]int{ - tEOF: 0, - tUnquotedIdentifier: 0, - tQuotedIdentifier: 0, - tRbracket: 0, - tRparen: 0, - tComma: 0, - tRbrace: 0, - tNumber: 0, - tCurrent: 0, - tExpref: 0, - tColon: 0, - tPipe: 1, - tOr: 2, - tAnd: 3, - tEQ: 5, - tLT: 5, - tLTE: 5, - tGT: 5, - tGTE: 5, - tNE: 5, - tFlatten: 9, - tStar: 20, - tFilter: 21, - tDot: 40, - tNot: 45, - tLbrace: 50, - tLbracket: 55, - tLparen: 60, -} - -// Parser holds state about the current expression being parsed. -type Parser struct { - expression string - tokens []token - index int -} - -// NewParser creates a new JMESPath parser. -func NewParser() *Parser { - p := Parser{} - return &p -} - -// Parse will compile a JMESPath expression. -func (p *Parser) Parse(expression string) (ASTNode, error) { - lexer := NewLexer() - p.expression = expression - p.index = 0 - tokens, err := lexer.tokenize(expression) - if err != nil { - return ASTNode{}, err - } - p.tokens = tokens - parsed, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if p.current() != tEOF { - return ASTNode{}, p.syntaxError(fmt.Sprintf( - "Unexpected token at the end of the expression: %s", p.current())) - } - return parsed, nil -} - -func (p *Parser) parseExpression(bindingPower int) (ASTNode, error) { - var err error - leftToken := p.lookaheadToken(0) - p.advance() - leftNode, err := p.nud(leftToken) - if err != nil { - return ASTNode{}, err - } - currentToken := p.current() - for bindingPower < bindingPowers[currentToken] { - p.advance() - leftNode, err = p.led(currentToken, leftNode) - if err != nil { - return ASTNode{}, err - } - currentToken = p.current() - } - return leftNode, nil -} - -func (p *Parser) parseIndexExpression() (ASTNode, error) { - if p.lookahead(0) == tColon || p.lookahead(1) == tColon { - return p.parseSliceExpression() - } - indexStr := p.lookaheadToken(0).value - parsedInt, err := strconv.Atoi(indexStr) - if err != nil { - return ASTNode{}, err - } - indexNode := ASTNode{nodeType: ASTIndex, value: parsedInt} - p.advance() - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - return indexNode, nil -} - -func (p *Parser) parseSliceExpression() (ASTNode, error) { - parts := []*int{nil, nil, nil} - index := 0 - current := p.current() - for current != tRbracket && index < 3 { - if current == tColon { - index++ - p.advance() - } else if current == tNumber { - parsedInt, err := strconv.Atoi(p.lookaheadToken(0).value) - if err != nil { - return ASTNode{}, err - } - parts[index] = &parsedInt - p.advance() - } else { - return ASTNode{}, p.syntaxError( - "Expected tColon or tNumber" + ", received: " + p.current().String()) - } - current = p.current() - } - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTSlice, - value: parts, - }, nil -} - -func (p *Parser) match(tokenType tokType) error { - if p.current() == tokenType { - p.advance() - return nil - } - return p.syntaxError("Expected " + tokenType.String() + ", received: " + p.current().String()) -} - -func (p *Parser) led(tokenType tokType, node ASTNode) (ASTNode, error) { - switch tokenType { - case tDot: - if p.current() != tStar { - right, err := p.parseDotRHS(bindingPowers[tDot]) - return ASTNode{ - nodeType: ASTSubexpression, - children: []ASTNode{node, right}, - }, err - } - p.advance() - right, err := p.parseProjectionRHS(bindingPowers[tDot]) - return ASTNode{ - nodeType: ASTValueProjection, - children: []ASTNode{node, right}, - }, err - case tPipe: - right, err := p.parseExpression(bindingPowers[tPipe]) - return ASTNode{nodeType: ASTPipe, children: []ASTNode{node, right}}, err - case tOr: - right, err := p.parseExpression(bindingPowers[tOr]) - return ASTNode{nodeType: ASTOrExpression, children: []ASTNode{node, right}}, err - case tAnd: - right, err := p.parseExpression(bindingPowers[tAnd]) - return ASTNode{nodeType: ASTAndExpression, children: []ASTNode{node, right}}, err - case tLparen: - name := node.value - var args []ASTNode - for p.current() != tRparen { - expression, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if p.current() == tComma { - if err := p.match(tComma); err != nil { - return ASTNode{}, err - } - } - args = append(args, expression) - } - if err := p.match(tRparen); err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTFunctionExpression, - value: name, - children: args, - }, nil - case tFilter: - return p.parseFilter(node) - case tFlatten: - left := ASTNode{nodeType: ASTFlatten, children: []ASTNode{node}} - right, err := p.parseProjectionRHS(bindingPowers[tFlatten]) - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{left, right}, - }, err - case tEQ, tNE, tGT, tGTE, tLT, tLTE: - right, err := p.parseExpression(bindingPowers[tokenType]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTComparator, - value: tokenType, - children: []ASTNode{node, right}, - }, nil - case tLbracket: - tokenType := p.current() - var right ASTNode - var err error - if tokenType == tNumber || tokenType == tColon { - right, err = p.parseIndexExpression() - if err != nil { - return ASTNode{}, err - } - return p.projectIfSlice(node, right) - } - // Otherwise this is a projection. - if err := p.match(tStar); err != nil { - return ASTNode{}, err - } - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - right, err = p.parseProjectionRHS(bindingPowers[tStar]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{node, right}, - }, nil - } - return ASTNode{}, p.syntaxError("Unexpected token: " + tokenType.String()) -} - -func (p *Parser) nud(token token) (ASTNode, error) { - switch token.tokenType { - case tJSONLiteral: - var parsed interface{} - err := json.Unmarshal([]byte(token.value), &parsed) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTLiteral, value: parsed}, nil - case tStringLiteral: - return ASTNode{nodeType: ASTLiteral, value: token.value}, nil - case tUnquotedIdentifier: - return ASTNode{ - nodeType: ASTField, - value: token.value, - }, nil - case tQuotedIdentifier: - node := ASTNode{nodeType: ASTField, value: token.value} - if p.current() == tLparen { - return ASTNode{}, p.syntaxErrorToken("Can't have quoted identifier as function name.", token) - } - return node, nil - case tStar: - left := ASTNode{nodeType: ASTIdentity} - var right ASTNode - var err error - if p.current() == tRbracket { - right = ASTNode{nodeType: ASTIdentity} - } else { - right, err = p.parseProjectionRHS(bindingPowers[tStar]) - } - return ASTNode{nodeType: ASTValueProjection, children: []ASTNode{left, right}}, err - case tFilter: - return p.parseFilter(ASTNode{nodeType: ASTIdentity}) - case tLbrace: - return p.parseMultiSelectHash() - case tFlatten: - left := ASTNode{ - nodeType: ASTFlatten, - children: []ASTNode{{nodeType: ASTIdentity}}, - } - right, err := p.parseProjectionRHS(bindingPowers[tFlatten]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTProjection, children: []ASTNode{left, right}}, nil - case tLbracket: - tokenType := p.current() - //var right ASTNode - if tokenType == tNumber || tokenType == tColon { - right, err := p.parseIndexExpression() - if err != nil { - return ASTNode{}, nil - } - return p.projectIfSlice(ASTNode{nodeType: ASTIdentity}, right) - } else if tokenType == tStar && p.lookahead(1) == tRbracket { - p.advance() - p.advance() - right, err := p.parseProjectionRHS(bindingPowers[tStar]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{{nodeType: ASTIdentity}, right}, - }, nil - } else { - return p.parseMultiSelectList() - } - case tCurrent: - return ASTNode{nodeType: ASTCurrentNode}, nil - case tExpref: - expression, err := p.parseExpression(bindingPowers[tExpref]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTExpRef, children: []ASTNode{expression}}, nil - case tNot: - expression, err := p.parseExpression(bindingPowers[tNot]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTNotExpression, children: []ASTNode{expression}}, nil - case tLparen: - expression, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if err := p.match(tRparen); err != nil { - return ASTNode{}, err - } - return expression, nil - case tEOF: - return ASTNode{}, p.syntaxErrorToken("Incomplete expression", token) - } - - return ASTNode{}, p.syntaxErrorToken("Invalid token: "+token.tokenType.String(), token) -} - -func (p *Parser) parseMultiSelectList() (ASTNode, error) { - var expressions []ASTNode - for { - expression, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - expressions = append(expressions, expression) - if p.current() == tRbracket { - break - } - err = p.match(tComma) - if err != nil { - return ASTNode{}, err - } - } - err := p.match(tRbracket) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTMultiSelectList, - children: expressions, - }, nil -} - -func (p *Parser) parseMultiSelectHash() (ASTNode, error) { - var children []ASTNode - for { - keyToken := p.lookaheadToken(0) - if err := p.match(tUnquotedIdentifier); err != nil { - if err := p.match(tQuotedIdentifier); err != nil { - return ASTNode{}, p.syntaxError("Expected tQuotedIdentifier or tUnquotedIdentifier") - } - } - keyName := keyToken.value - err := p.match(tColon) - if err != nil { - return ASTNode{}, err - } - value, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - node := ASTNode{ - nodeType: ASTKeyValPair, - value: keyName, - children: []ASTNode{value}, - } - children = append(children, node) - if p.current() == tComma { - err := p.match(tComma) - if err != nil { - return ASTNode{}, nil - } - } else if p.current() == tRbrace { - err := p.match(tRbrace) - if err != nil { - return ASTNode{}, nil - } - break - } - } - return ASTNode{ - nodeType: ASTMultiSelectHash, - children: children, - }, nil -} - -func (p *Parser) projectIfSlice(left ASTNode, right ASTNode) (ASTNode, error) { - indexExpr := ASTNode{ - nodeType: ASTIndexExpression, - children: []ASTNode{left, right}, - } - if right.nodeType == ASTSlice { - right, err := p.parseProjectionRHS(bindingPowers[tStar]) - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{indexExpr, right}, - }, err - } - return indexExpr, nil -} -func (p *Parser) parseFilter(node ASTNode) (ASTNode, error) { - var right, condition ASTNode - var err error - condition, err = p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - if p.current() == tFlatten { - right = ASTNode{nodeType: ASTIdentity} - } else { - right, err = p.parseProjectionRHS(bindingPowers[tFilter]) - if err != nil { - return ASTNode{}, err - } - } - - return ASTNode{ - nodeType: ASTFilterProjection, - children: []ASTNode{node, right, condition}, - }, nil -} - -func (p *Parser) parseDotRHS(bindingPower int) (ASTNode, error) { - lookahead := p.current() - if tokensOneOf([]tokType{tQuotedIdentifier, tUnquotedIdentifier, tStar}, lookahead) { - return p.parseExpression(bindingPower) - } else if lookahead == tLbracket { - if err := p.match(tLbracket); err != nil { - return ASTNode{}, err - } - return p.parseMultiSelectList() - } else if lookahead == tLbrace { - if err := p.match(tLbrace); err != nil { - return ASTNode{}, err - } - return p.parseMultiSelectHash() - } - return ASTNode{}, p.syntaxError("Expected identifier, lbracket, or lbrace") -} - -func (p *Parser) parseProjectionRHS(bindingPower int) (ASTNode, error) { - current := p.current() - if bindingPowers[current] < 10 { - return ASTNode{nodeType: ASTIdentity}, nil - } else if current == tLbracket { - return p.parseExpression(bindingPower) - } else if current == tFilter { - return p.parseExpression(bindingPower) - } else if current == tDot { - err := p.match(tDot) - if err != nil { - return ASTNode{}, err - } - return p.parseDotRHS(bindingPower) - } else { - return ASTNode{}, p.syntaxError("Error") - } -} - -func (p *Parser) lookahead(number int) tokType { - return p.lookaheadToken(number).tokenType -} - -func (p *Parser) current() tokType { - return p.lookahead(0) -} - -func (p *Parser) lookaheadToken(number int) token { - return p.tokens[p.index+number] -} - -func (p *Parser) advance() { - p.index++ -} - -func tokensOneOf(elements []tokType, token tokType) bool { - for _, elem := range elements { - if elem == token { - return true - } - } - return false -} - -func (p *Parser) syntaxError(msg string) SyntaxError { - return SyntaxError{ - msg: msg, - Expression: p.expression, - Offset: p.lookaheadToken(0).position, - } -} - -// Create a SyntaxError based on the provided token. -// This differs from syntaxError() which creates a SyntaxError -// based on the current lookahead token. -func (p *Parser) syntaxErrorToken(msg string, t token) SyntaxError { - return SyntaxError{ - msg: msg, - Expression: p.expression, - Offset: t.position, - } -} diff --git a/vendor/github.com/jmespath/go-jmespath/toktype_string.go b/vendor/github.com/jmespath/go-jmespath/toktype_string.go deleted file mode 100644 index dae79cbd..00000000 --- a/vendor/github.com/jmespath/go-jmespath/toktype_string.go +++ /dev/null @@ -1,16 +0,0 @@ -// generated by stringer -type=tokType; DO NOT EDIT - -package jmespath - -import "fmt" - -const _tokType_name = "tUnknowntStartDottFiltertFlattentLparentRparentLbrackettRbrackettLbracetRbracetOrtPipetNumbertUnquotedIdentifiertQuotedIdentifiertCommatColontLTtLTEtGTtGTEtEQtNEtJSONLiteraltStringLiteraltCurrenttExpreftAndtNottEOF" - -var _tokType_index = [...]uint8{0, 8, 13, 17, 24, 32, 39, 46, 55, 64, 71, 78, 81, 86, 93, 112, 129, 135, 141, 144, 148, 151, 155, 158, 161, 173, 187, 195, 202, 206, 210, 214} - -func (i tokType) String() string { - if i < 0 || i >= tokType(len(_tokType_index)-1) { - return fmt.Sprintf("tokType(%d)", i) - } - return _tokType_name[_tokType_index[i]:_tokType_index[i+1]] -} diff --git a/vendor/github.com/jmespath/go-jmespath/util.go b/vendor/github.com/jmespath/go-jmespath/util.go deleted file mode 100644 index ddc1b7d7..00000000 --- a/vendor/github.com/jmespath/go-jmespath/util.go +++ /dev/null @@ -1,185 +0,0 @@ -package jmespath - -import ( - "errors" - "reflect" -) - -// IsFalse determines if an object is false based on the JMESPath spec. -// JMESPath defines false values to be any of: -// - An empty string array, or hash. -// - The boolean value false. -// - nil -func isFalse(value interface{}) bool { - switch v := value.(type) { - case bool: - return !v - case []interface{}: - return len(v) == 0 - case map[string]interface{}: - return len(v) == 0 - case string: - return len(v) == 0 - case nil: - return true - } - // Try the reflection cases before returning false. - rv := reflect.ValueOf(value) - switch rv.Kind() { - case reflect.Struct: - // A struct type will never be false, even if - // all of its values are the zero type. - return false - case reflect.Slice, reflect.Map: - return rv.Len() == 0 - case reflect.Ptr: - if rv.IsNil() { - return true - } - // If it's a pointer type, we'll try to deref the pointer - // and evaluate the pointer value for isFalse. - element := rv.Elem() - return isFalse(element.Interface()) - } - return false -} - -// ObjsEqual is a generic object equality check. -// It will take two arbitrary objects and recursively determine -// if they are equal. -func objsEqual(left interface{}, right interface{}) bool { - return reflect.DeepEqual(left, right) -} - -// SliceParam refers to a single part of a slice. -// A slice consists of a start, a stop, and a step, similar to -// python slices. -type sliceParam struct { - N int - Specified bool -} - -// Slice supports [start:stop:step] style slicing that's supported in JMESPath. -func slice(slice []interface{}, parts []sliceParam) ([]interface{}, error) { - computed, err := computeSliceParams(len(slice), parts) - if err != nil { - return nil, err - } - start, stop, step := computed[0], computed[1], computed[2] - result := []interface{}{} - if step > 0 { - for i := start; i < stop; i += step { - result = append(result, slice[i]) - } - } else { - for i := start; i > stop; i += step { - result = append(result, slice[i]) - } - } - return result, nil -} - -func computeSliceParams(length int, parts []sliceParam) ([]int, error) { - var start, stop, step int - if !parts[2].Specified { - step = 1 - } else if parts[2].N == 0 { - return nil, errors.New("Invalid slice, step cannot be 0") - } else { - step = parts[2].N - } - var stepValueNegative bool - if step < 0 { - stepValueNegative = true - } else { - stepValueNegative = false - } - - if !parts[0].Specified { - if stepValueNegative { - start = length - 1 - } else { - start = 0 - } - } else { - start = capSlice(length, parts[0].N, step) - } - - if !parts[1].Specified { - if stepValueNegative { - stop = -1 - } else { - stop = length - } - } else { - stop = capSlice(length, parts[1].N, step) - } - return []int{start, stop, step}, nil -} - -func capSlice(length int, actual int, step int) int { - if actual < 0 { - actual += length - if actual < 0 { - if step < 0 { - actual = -1 - } else { - actual = 0 - } - } - } else if actual >= length { - if step < 0 { - actual = length - 1 - } else { - actual = length - } - } - return actual -} - -// ToArrayNum converts an empty interface type to a slice of float64. -// If any element in the array cannot be converted, then nil is returned -// along with a second value of false. -func toArrayNum(data interface{}) ([]float64, bool) { - // Is there a better way to do this with reflect? - if d, ok := data.([]interface{}); ok { - result := make([]float64, len(d)) - for i, el := range d { - item, ok := el.(float64) - if !ok { - return nil, false - } - result[i] = item - } - return result, true - } - return nil, false -} - -// ToArrayStr converts an empty interface type to a slice of strings. -// If any element in the array cannot be converted, then nil is returned -// along with a second value of false. If the input data could be entirely -// converted, then the converted data, along with a second value of true, -// will be returned. -func toArrayStr(data interface{}) ([]string, bool) { - // Is there a better way to do this with reflect? - if d, ok := data.([]interface{}); ok { - result := make([]string, len(d)) - for i, el := range d { - item, ok := el.(string) - if !ok { - return nil, false - } - result[i] = item - } - return result, true - } - return nil, false -} - -func isSliceType(v interface{}) bool { - if v == nil { - return false - } - return reflect.TypeOf(v).Kind() == reflect.Slice -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 0abc8675..30743469 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -9,8 +9,8 @@ filippo.io/age/internal/stream ## explicit; go 1.20 filippo.io/edwards25519 filippo.io/edwards25519/field -# github.com/aws/aws-sdk-go-v2 v1.27.0 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2 v1.30.4 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/arn github.com/aws/aws-sdk-go-v2/aws/defaults @@ -30,6 +30,7 @@ github.com/aws/aws-sdk-go-v2/internal/awsutil github.com/aws/aws-sdk-go-v2/internal/context github.com/aws/aws-sdk-go-v2/internal/endpoints github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn +github.com/aws/aws-sdk-go-v2/internal/middleware github.com/aws/aws-sdk-go-v2/internal/rand github.com/aws/aws-sdk-go-v2/internal/sdk github.com/aws/aws-sdk-go-v2/internal/sdkio @@ -41,11 +42,11 @@ github.com/aws/aws-sdk-go-v2/internal/timeconv ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi -# github.com/aws/aws-sdk-go-v2/config v1.27.11 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/config v1.27.31 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/config -# github.com/aws/aws-sdk-go-v2/credentials v1.17.11 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/credentials v1.17.30 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds github.com/aws/aws-sdk-go-v2/credentials/endpointcreds @@ -53,55 +54,55 @@ github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client github.com/aws/aws-sdk-go-v2/credentials/processcreds github.com/aws/aws-sdk-go-v2/credentials/ssocreds github.com/aws/aws-sdk-go-v2/credentials/stscreds -# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.12 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config # github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/feature/s3/manager -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.16 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 -# github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/internal/ini # github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/internal/v4a github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4 -# github.com/aws/aws-sdk-go-v2/service/iam v1.27.3 -## explicit; go 1.19 +# github.com/aws/aws-sdk-go-v2/service/iam v1.35.0 +## explicit; go 1.21 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/identitystore v1.20.3 -## explicit; go 1.19 +# github.com/aws/aws-sdk-go-v2/service/identitystore v1.25.4 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/identitystore github.com/aws/aws-sdk-go-v2/service/identitystore/document github.com/aws/aws-sdk-go-v2/service/identitystore/internal/document github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints github.com/aws/aws-sdk-go-v2/service/identitystore/types -# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding # github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/service/internal/checksum -# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.18 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url # github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/service/internal/s3shared github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config -# github.com/aws/aws-sdk-go-v2/service/organizations v1.22.3 -## explicit; go 1.19 +# github.com/aws/aws-sdk-go-v2/service/organizations v1.31.0 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/organizations github.com/aws/aws-sdk-go-v2/service/organizations/internal/endpoints github.com/aws/aws-sdk-go-v2/service/organizations/types @@ -112,30 +113,30 @@ github.com/aws/aws-sdk-go-v2/service/s3/internal/arn github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints github.com/aws/aws-sdk-go-v2/service/s3/types -# github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/sso v1.22.5 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/sso github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sso/types -# github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.22.1 -## explicit; go 1.19 +# github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.27.5 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/ssoadmin github.com/aws/aws-sdk-go-v2/service/ssoadmin/document github.com/aws/aws-sdk-go-v2/service/ssoadmin/internal/document github.com/aws/aws-sdk-go-v2/service/ssoadmin/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssoadmin/types -# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.5 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/sts v1.30.5 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.20.2 -## explicit; go 1.20 +# github.com/aws/smithy-go v1.20.4 +## explicit; go 1.21 github.com/aws/smithy-go github.com/aws/smithy-go/auth github.com/aws/smithy-go/auth/bearer @@ -272,7 +273,6 @@ github.com/hashicorp/hcl/json/token github.com/inconshreveable/mousetrap # github.com/jmespath/go-jmespath v0.4.0 ## explicit; go 1.14 -github.com/jmespath/go-jmespath # github.com/klauspost/compress v1.17.8 ## explicit; go 1.20 github.com/klauspost/compress