From cbd9807478f6817ffc85372f6a66a513e276003d Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Mon, 18 Dec 2023 19:20:51 +0000 Subject: [PATCH] Regenerated Clients --- .../12629cc2d7504eee9779421b9e4843b6.json | 8 + .../6e67e26167394f7e9d5a0b4bfab007f2.json | 8 + .../9ef4fa71ef184935abba77ce4e289215.json | 8 + .../f665a85613e74a5a8017b8683efab70a.json | 8 + .../internal/endpoints/endpoints.go | 3 + .../api_op_AdminAddUserToGroup.go | 18 +- .../api_op_AdminConfirmSignUp.go | 24 +- .../api_op_AdminCreateUser.go | 18 +- .../api_op_AdminDeleteUser.go | 5 +- .../api_op_AdminDeleteUserAttributes.go | 5 +- .../api_op_AdminDisableUser.go | 5 +- .../api_op_AdminEnableUser.go | 5 +- .../api_op_AdminForgetDevice.go | 5 +- .../api_op_AdminGetDevice.go | 5 +- .../api_op_AdminGetUser.go | 5 +- .../api_op_AdminInitiateAuth.go | 3 +- .../api_op_AdminListDevices.go | 17 +- .../api_op_AdminListGroupsForUser.go | 11 +- .../api_op_AdminListUserAuthEvents.go | 5 +- .../api_op_AdminRemoveUserFromGroup.go | 5 +- .../api_op_AdminResetUserPassword.go | 5 +- .../api_op_AdminRespondToAuthChallenge.go | 79 +- .../api_op_AdminSetUserMFAPreference.go | 5 +- .../api_op_AdminSetUserPassword.go | 5 +- .../api_op_AdminSetUserSettings.go | 5 +- .../api_op_AdminUpdateAuthEventFeedback.go | 5 +- .../api_op_AdminUpdateDeviceStatus.go | 5 +- .../api_op_AdminUpdateUserAttributes.go | 5 +- .../api_op_AdminUserGlobalSignOut.go | 31 +- .../api_op_ConfirmForgotPassword.go | 6 +- .../api_op_ConfirmSignUp.go | 29 +- .../api_op_CreateUserPoolClient.go | 36 +- .../api_op_ForgotPassword.go | 6 +- .../api_op_GlobalSignOut.go | 34 +- .../api_op_InitiateAuth.go | 9 +- .../api_op_ListDevices.go | 12 +- .../api_op_ListUserImportJobs.go | 14 +- .../api_op_ListUsers.go | 20 +- .../api_op_ListUsersInGroup.go | 6 +- .../api_op_ResendConfirmationCode.go | 6 +- .../api_op_RespondToAuthChallenge.go | 79 +- .../cognitoidentityprovider/api_op_SignUp.go | 14 +- .../api_op_UpdateAuthEventFeedback.go | 5 +- .../api_op_UpdateUserAttributes.go | 15 +- .../api_op_UpdateUserPoolClient.go | 33 +- .../cognitoidentityprovider/deserializers.go | 54 + service/cognitoidentityprovider/doc.go | 39 +- .../cognitoidentityprovider/serializers.go | 24 + .../cognitoidentityprovider/types/enums.go | 19 + .../cognitoidentityprovider/types/types.go | 111 +- service/cognitoidentityprovider/validators.go | 23 + service/dlm/internal/endpoints/endpoints.go | 3 + service/eks/api_op_AssociateAccessPolicy.go | 164 + .../eks/api_op_AssociateEncryptionConfig.go | 9 +- .../api_op_AssociateIdentityProviderConfig.go | 19 +- service/eks/api_op_CreateAccessEntry.go | 241 ++ service/eks/api_op_CreateAddon.go | 16 +- service/eks/api_op_CreateCluster.go | 12 +- .../api_op_CreateEksAnywhereSubscription.go | 4 +- service/eks/api_op_CreateFargateProfile.go | 34 +- service/eks/api_op_CreateNodegroup.go | 30 +- .../api_op_CreatePodIdentityAssociation.go | 27 +- service/eks/api_op_DeleteAccessEntry.go | 139 + service/eks/api_op_DeleteAddon.go | 8 +- service/eks/api_op_DeleteCluster.go | 6 +- service/eks/api_op_DeleteFargateProfile.go | 18 +- service/eks/api_op_DeleteNodegroup.go | 4 +- service/eks/api_op_DeregisterCluster.go | 3 + service/eks/api_op_DescribeAccessEntry.go | 142 + service/eks/api_op_DescribeAddon.go | 2 +- .../eks/api_op_DescribeAddonConfiguration.go | 9 +- service/eks/api_op_DescribeAddonVersions.go | 26 +- service/eks/api_op_DescribeCluster.go | 10 +- service/eks/api_op_DescribeFargateProfile.go | 4 +- .../api_op_DescribeIdentityProviderConfig.go | 4 +- service/eks/api_op_DescribeNodegroup.go | 4 +- service/eks/api_op_DescribeUpdate.go | 8 +- .../eks/api_op_DisassociateAccessPolicy.go | 143 + ...i_op_DisassociateIdentityProviderConfig.go | 5 +- service/eks/api_op_ListAccessEntries.go | 260 ++ service/eks/api_op_ListAccessPolicies.go | 251 ++ service/eks/api_op_ListAddons.go | 40 +- .../api_op_ListAssociatedAccessPolicies.go | 270 ++ service/eks/api_op_ListClusters.go | 58 +- service/eks/api_op_ListFargateProfiles.go | 53 +- .../eks/api_op_ListIdentityProviderConfigs.go | 38 +- service/eks/api_op_ListNodegroups.go | 54 +- service/eks/api_op_ListTagsForResource.go | 4 +- service/eks/api_op_ListUpdates.go | 50 +- service/eks/api_op_RegisterCluster.go | 19 +- service/eks/api_op_TagResource.go | 21 +- service/eks/api_op_UntagResource.go | 8 +- service/eks/api_op_UpdateAccessEntry.go | 206 ++ service/eks/api_op_UpdateAddon.go | 10 +- service/eks/api_op_UpdateClusterConfig.go | 17 +- service/eks/api_op_UpdateClusterVersion.go | 4 +- service/eks/api_op_UpdateNodegroupConfig.go | 9 +- service/eks/api_op_UpdateNodegroupVersion.go | 17 +- .../api_op_UpdatePodIdentityAssociation.go | 6 +- service/eks/deserializers.go | 3037 +++++++++++++---- service/eks/doc.go | 2 +- service/eks/generated.json | 9 + service/eks/serializers.go | 1032 +++++- service/eks/types/enums.go | 42 + service/eks/types/errors.go | 3 +- service/eks/types/types.go | 347 +- service/eks/validators.go | 342 ++ .../internal/endpoints/endpoints.go | 3 + service/quicksight/api_op_CreateGroup.go | 5 +- .../api_op_CreateOutpostResolver.go | 2 +- .../api_op_CreateResolverEndpoint.go | 19 +- .../api_op_CreateResolverRule.go | 14 +- .../api_op_ListResolverDnssecConfigs.go | 3 +- .../api_op_UpdateResolverEndpoint.go | 24 +- service/route53resolver/deserializers.go | 62 + service/route53resolver/endpoints.go | 2 +- service/route53resolver/serializers.go | 30 + service/route53resolver/types/enums.go | 20 + service/route53resolver/types/errors.go | 4 +- service/route53resolver/types/types.go | 30 + service/route53resolver/validators.go | 3 - service/s3/internal/endpoints/endpoints.go | 67 + .../internal/endpoints/s3/endpoints.go | 67 + 123 files changed, 7153 insertions(+), 1415 deletions(-) create mode 100644 .changelog/12629cc2d7504eee9779421b9e4843b6.json create mode 100644 .changelog/6e67e26167394f7e9d5a0b4bfab007f2.json create mode 100644 .changelog/9ef4fa71ef184935abba77ce4e289215.json create mode 100644 .changelog/f665a85613e74a5a8017b8683efab70a.json create mode 100644 service/eks/api_op_AssociateAccessPolicy.go create mode 100644 service/eks/api_op_CreateAccessEntry.go create mode 100644 service/eks/api_op_DeleteAccessEntry.go create mode 100644 service/eks/api_op_DescribeAccessEntry.go create mode 100644 service/eks/api_op_DisassociateAccessPolicy.go create mode 100644 service/eks/api_op_ListAccessEntries.go create mode 100644 service/eks/api_op_ListAccessPolicies.go create mode 100644 service/eks/api_op_ListAssociatedAccessPolicies.go create mode 100644 service/eks/api_op_UpdateAccessEntry.go diff --git a/.changelog/12629cc2d7504eee9779421b9e4843b6.json b/.changelog/12629cc2d7504eee9779421b9e4843b6.json new file mode 100644 index 00000000000..8447db943cc --- /dev/null +++ b/.changelog/12629cc2d7504eee9779421b9e4843b6.json @@ -0,0 +1,8 @@ +{ + "id": "12629cc2-d750-4eee-9779-421b9e4843b6", + "type": "feature", + "description": "Amazon Cognito now supports trigger versions that define the fields in the request sent to pre token generation Lambda triggers.", + "modules": [ + "service/cognitoidentityprovider" + ] +} \ No newline at end of file diff --git a/.changelog/6e67e26167394f7e9d5a0b4bfab007f2.json b/.changelog/6e67e26167394f7e9d5a0b4bfab007f2.json new file mode 100644 index 00000000000..eed458112cb --- /dev/null +++ b/.changelog/6e67e26167394f7e9d5a0b4bfab007f2.json @@ -0,0 +1,8 @@ +{ + "id": "6e67e261-6739-4f7e-9d5a-0b4bfab007f2", + "type": "feature", + "description": "Add support for EKS Cluster Access Management.", + "modules": [ + "service/eks" + ] +} \ No newline at end of file diff --git a/.changelog/9ef4fa71ef184935abba77ce4e289215.json b/.changelog/9ef4fa71ef184935abba77ce4e289215.json new file mode 100644 index 00000000000..6c180bfcc88 --- /dev/null +++ b/.changelog/9ef4fa71ef184935abba77ce4e289215.json @@ -0,0 +1,8 @@ +{ + "id": "9ef4fa71-ef18-4935-abba-77ce4e289215", + "type": "documentation", + "description": "A docs-only release to add missing entities to the API reference.", + "modules": [ + "service/quicksight" + ] +} \ No newline at end of file diff --git a/.changelog/f665a85613e74a5a8017b8683efab70a.json b/.changelog/f665a85613e74a5a8017b8683efab70a.json new file mode 100644 index 00000000000..b7151673953 --- /dev/null +++ b/.changelog/f665a85613e74a5a8017b8683efab70a.json @@ -0,0 +1,8 @@ +{ + "id": "f665a856-13e7-4a5a-8017-b8683efab70a", + "type": "feature", + "description": "Add DOH protocols in resolver endpoints.", + "modules": [ + "service/route53resolver" + ] +} \ No newline at end of file diff --git a/service/cloudhsmv2/internal/endpoints/endpoints.go b/service/cloudhsmv2/internal/endpoints/endpoints.go index bf52c5b7270..854cf1f3e00 100644 --- a/service/cloudhsmv2/internal/endpoints/endpoints.go +++ b/service/cloudhsmv2/internal/endpoints/endpoints.go @@ -169,6 +169,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{}, diff --git a/service/cognitoidentityprovider/api_op_AdminAddUserToGroup.go b/service/cognitoidentityprovider/api_op_AdminAddUserToGroup.go index 0a64103d596..15429e3c69b 100644 --- a/service/cognitoidentityprovider/api_op_AdminAddUserToGroup.go +++ b/service/cognitoidentityprovider/api_op_AdminAddUserToGroup.go @@ -11,11 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Adds the specified user to the specified group. Amazon Cognito evaluates -// Identity and Access Management (IAM) policies in requests for this API -// operation. For this operation, you must use IAM credentials to authorize -// requests, and you must grant yourself the corresponding IAM permission in a -// policy. Learn more +// Adds a user to a group. A user who is in a group can present a preferred-role +// claim to an identity pool, and populates a cognito:groups claim to their access +// and identity tokens. Amazon Cognito evaluates Identity and Access Management +// (IAM) policies in requests for this API operation. For this operation, you must +// use IAM credentials to authorize requests, and you must grant yourself the +// corresponding IAM permission in a policy. Learn more // - Signing Amazon Web Services API Requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html) // - Using the Amazon Cognito user pools API and user pool endpoints (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) func (c *Client) AdminAddUserToGroup(ctx context.Context, params *AdminAddUserToGroupInput, optFns ...func(*Options)) (*AdminAddUserToGroupOutput, error) { @@ -35,7 +36,7 @@ func (c *Client) AdminAddUserToGroup(ctx context.Context, params *AdminAddUserTo type AdminAddUserToGroupInput struct { - // The group name. + // The name of the group that you want to add your user to. // // This member is required. GroupName *string @@ -45,7 +46,10 @@ type AdminAddUserToGroupInput struct { // This member is required. UserPoolId *string - // The username for the user. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminConfirmSignUp.go b/service/cognitoidentityprovider/api_op_AdminConfirmSignUp.go index d38c912c8ae..1bc80cb3f99 100644 --- a/service/cognitoidentityprovider/api_op_AdminConfirmSignUp.go +++ b/service/cognitoidentityprovider/api_op_AdminConfirmSignUp.go @@ -11,11 +11,20 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Confirms user registration as an admin without using a confirmation code. Works -// on any user. Amazon Cognito evaluates Identity and Access Management (IAM) -// policies in requests for this API operation. For this operation, you must use -// IAM credentials to authorize requests, and you must grant yourself the -// corresponding IAM permission in a policy. Learn more +// This IAM-authenticated API operation provides a code that Amazon Cognito sent +// to your user when they signed up in your user pool. After your user enters their +// code, they confirm ownership of the email address or phone number that they +// provided, and their user account becomes active. Depending on your user pool +// configuration, your users will receive their confirmation code in an email or +// SMS message. Local users who signed up in your user pool are the only type of +// user who can confirm sign-up with a code. Users who federate through an external +// identity provider (IdP) have already been confirmed by their IdP. +// Administrator-created users confirm their accounts when they respond to their +// invitation email message and choose a password. Amazon Cognito evaluates +// Identity and Access Management (IAM) policies in requests for this API +// operation. For this operation, you must use IAM credentials to authorize +// requests, and you must grant yourself the corresponding IAM permission in a +// policy. Learn more // - Signing Amazon Web Services API Requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html) // - Using the Amazon Cognito user pools API and user pool endpoints (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) func (c *Client) AdminConfirmSignUp(ctx context.Context, params *AdminConfirmSignUpInput, optFns ...func(*Options)) (*AdminConfirmSignUpOutput, error) { @@ -41,7 +50,10 @@ type AdminConfirmSignUpInput struct { // This member is required. UserPoolId *string - // The user name for which you want to confirm user registration. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminCreateUser.go b/service/cognitoidentityprovider/api_op_AdminCreateUser.go index b57c88d6a16..e9ed8195b89 100644 --- a/service/cognitoidentityprovider/api_op_AdminCreateUser.go +++ b/service/cognitoidentityprovider/api_op_AdminCreateUser.go @@ -153,14 +153,16 @@ type AdminCreateUserInput struct { // the DesiredDeliveryMediums parameter. UserAttributes []types.AttributeType - // The user's validation data. This is an array of name-value pairs that contain - // user attributes and attribute values that you can use for custom validation, - // such as restricting the types of user accounts that can be registered. For - // example, you might choose to allow or disallow user sign-up based on the user's - // domain. To configure custom validation, you must create a Pre Sign-up Lambda - // trigger for the user pool as described in the Amazon Cognito Developer Guide. - // The Lambda trigger receives the validation data and uses it in the validation - // process. The user's validation data isn't persisted. + // Temporary user attributes that contribute to the outcomes of your pre sign-up + // Lambda trigger. This set of key-value pairs are for custom validation of + // information that you collect from your users but don't need to retain. Your + // Lambda function can analyze this additional data and act on it. Your function + // might perform external API operations like logging user attributes and + // validation data to Amazon CloudWatch Logs. Validation data might also affect the + // response that your function returns to Amazon Cognito, like automatically + // confirming the user if they sign up from within your network. For more + // information about the pre sign-up Lambda trigger, see Pre sign-up Lambda trigger (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html) + // . ValidationData []types.AttributeType noSmithyDocumentSerde diff --git a/service/cognitoidentityprovider/api_op_AdminDeleteUser.go b/service/cognitoidentityprovider/api_op_AdminDeleteUser.go index 7dcce1909de..0c78b841228 100644 --- a/service/cognitoidentityprovider/api_op_AdminDeleteUser.go +++ b/service/cognitoidentityprovider/api_op_AdminDeleteUser.go @@ -41,7 +41,10 @@ type AdminDeleteUserInput struct { // This member is required. UserPoolId *string - // The user name of the user you want to delete. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminDeleteUserAttributes.go b/service/cognitoidentityprovider/api_op_AdminDeleteUserAttributes.go index 533a744e613..4f167b02b4d 100644 --- a/service/cognitoidentityprovider/api_op_AdminDeleteUserAttributes.go +++ b/service/cognitoidentityprovider/api_op_AdminDeleteUserAttributes.go @@ -48,7 +48,10 @@ type AdminDeleteUserAttributesInput struct { // This member is required. UserPoolId *string - // The user name of the user from which you would like to delete attributes. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminDisableUser.go b/service/cognitoidentityprovider/api_op_AdminDisableUser.go index 1028f8e5ed9..eb91cbd7f15 100644 --- a/service/cognitoidentityprovider/api_op_AdminDisableUser.go +++ b/service/cognitoidentityprovider/api_op_AdminDisableUser.go @@ -42,7 +42,10 @@ type AdminDisableUserInput struct { // This member is required. UserPoolId *string - // The user name of the user you want to disable. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminEnableUser.go b/service/cognitoidentityprovider/api_op_AdminEnableUser.go index a9a9550aa68..d9950038762 100644 --- a/service/cognitoidentityprovider/api_op_AdminEnableUser.go +++ b/service/cognitoidentityprovider/api_op_AdminEnableUser.go @@ -41,7 +41,10 @@ type AdminEnableUserInput struct { // This member is required. UserPoolId *string - // The user name of the user you want to enable. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminForgetDevice.go b/service/cognitoidentityprovider/api_op_AdminForgetDevice.go index 6ddda831388..b7eca45d3d6 100644 --- a/service/cognitoidentityprovider/api_op_AdminForgetDevice.go +++ b/service/cognitoidentityprovider/api_op_AdminForgetDevice.go @@ -45,7 +45,10 @@ type AdminForgetDeviceInput struct { // This member is required. UserPoolId *string - // The user name. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminGetDevice.go b/service/cognitoidentityprovider/api_op_AdminGetDevice.go index b3994c3cf60..aab6d35a9a1 100644 --- a/service/cognitoidentityprovider/api_op_AdminGetDevice.go +++ b/service/cognitoidentityprovider/api_op_AdminGetDevice.go @@ -46,7 +46,10 @@ type AdminGetDeviceInput struct { // This member is required. UserPoolId *string - // The user name. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminGetUser.go b/service/cognitoidentityprovider/api_op_AdminGetUser.go index d5fccc1c331..f490204fb52 100644 --- a/service/cognitoidentityprovider/api_op_AdminGetUser.go +++ b/service/cognitoidentityprovider/api_op_AdminGetUser.go @@ -44,7 +44,10 @@ type AdminGetUserInput struct { // This member is required. UserPoolId *string - // The user name of the user you want to retrieve. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go b/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go index 25846a52d7a..c58067f0cd4 100644 --- a/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go +++ b/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go @@ -129,7 +129,6 @@ type AdminInitiateAuthInput struct { // - Pre token generation // - Create auth challenge // - Define auth challenge - // - Verify auth challenge // For more information, see Customizing user pool Workflows with Lambda Triggers (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html) // in the Amazon Cognito Developer Guide. When you use the ClientMetadata // parameter, remember that Amazon Cognito won't do the following: @@ -195,7 +194,7 @@ type AdminInitiateAuthOutput struct { // value of any additional attributes. // - MFA_SETUP : For users who are required to set up an MFA factor before they // can sign in. The MFA types activated for the user pool will be listed in the - // challenge parameters MFA_CAN_SETUP value. To set up software token MFA, use + // challenge parameters MFAS_CAN_SETUP value. To set up software token MFA, use // the session returned here from InitiateAuth as an input to // AssociateSoftwareToken , and use the session returned by VerifySoftwareToken // as an input to RespondToAuthChallenge with challenge name MFA_SETUP to diff --git a/service/cognitoidentityprovider/api_op_AdminListDevices.go b/service/cognitoidentityprovider/api_op_AdminListDevices.go index c1c57a7bac3..35224447eff 100644 --- a/service/cognitoidentityprovider/api_op_AdminListDevices.go +++ b/service/cognitoidentityprovider/api_op_AdminListDevices.go @@ -41,7 +41,10 @@ type AdminListDevicesInput struct { // This member is required. UserPoolId *string - // The user name. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string @@ -49,7 +52,12 @@ type AdminListDevicesInput struct { // The limit of the devices request. Limit *int32 - // The pagination token. + // This API operation returns a limited number of results. The pagination token is + // an identifier that you can present in an additional API request with the same + // parameters. When you include the pagination token, Amazon Cognito returns the + // next set of items after the current list. Subsequent requests return a new + // pagination token. By use of this token, you can paginate through the full list + // of items. PaginationToken *string noSmithyDocumentSerde @@ -61,7 +69,10 @@ type AdminListDevicesOutput struct { // The devices in the list of devices response. Devices []types.DeviceType - // The pagination token. + // The identifier that Amazon Cognito returned with the previous request to this + // operation. When you include a pagination token in your request, Amazon Cognito + // returns the next set of items in the list. By use of this token, you can + // paginate through the full list of items. PaginationToken *string // Metadata pertaining to the operation's result. diff --git a/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go b/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go index d3bb1cc82ca..17462fec959 100644 --- a/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go +++ b/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go @@ -12,9 +12,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the groups that the user belongs to. Amazon Cognito evaluates Identity -// and Access Management (IAM) policies in requests for this API operation. For -// this operation, you must use IAM credentials to authorize requests, and you must +// Lists the groups that a user belongs to. Amazon Cognito evaluates Identity and +// Access Management (IAM) policies in requests for this API operation. For this +// operation, you must use IAM credentials to authorize requests, and you must // grant yourself the corresponding IAM permission in a policy. Learn more // - Signing Amazon Web Services API Requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html) // - Using the Amazon Cognito user pools API and user pool endpoints (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) @@ -40,7 +40,10 @@ type AdminListGroupsForUserInput struct { // This member is required. UserPoolId *string - // The username for the user. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go b/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go index 9d1627cefa7..50b83865550 100644 --- a/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go +++ b/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go @@ -41,7 +41,10 @@ type AdminListUserAuthEventsInput struct { // This member is required. UserPoolId *string - // The user pool username or an alias. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminRemoveUserFromGroup.go b/service/cognitoidentityprovider/api_op_AdminRemoveUserFromGroup.go index 493bf30c595..246053a29d0 100644 --- a/service/cognitoidentityprovider/api_op_AdminRemoveUserFromGroup.go +++ b/service/cognitoidentityprovider/api_op_AdminRemoveUserFromGroup.go @@ -45,7 +45,10 @@ type AdminRemoveUserFromGroupInput struct { // This member is required. UserPoolId *string - // The username for the user. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go b/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go index c9eab4b6a19..fd6f7671ad5 100644 --- a/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go +++ b/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go @@ -63,7 +63,10 @@ type AdminResetUserPasswordInput struct { // This member is required. UserPoolId *string - // The user name of the user whose password you want to reset. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go b/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go index ac7373a6137..34b7b17ec02 100644 --- a/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go +++ b/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go @@ -12,11 +12,17 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Responds to an authentication challenge, as an administrator. This action might -// generate an SMS text message. Starting June 1, 2021, US telecom carriers require -// you to register an origination phone number before you can send SMS messages to -// US phone numbers. If you use SMS text messages in Amazon Cognito, you must -// register a phone number with Amazon Pinpoint (https://console.aws.amazon.com/pinpoint/home/) +// Some API operations in a user pool generate a challenge, like a prompt for an +// MFA code, for device authentication that bypasses MFA, or for a custom +// authentication challenge. An AdminRespondToAuthChallenge API request provides +// the answer to that challenge, like a code or a secure remote password (SRP). The +// parameters of a response to an authentication challenge vary with the type of +// challenge. For more information about custom authentication challenges, see +// Custom authentication challenge Lambda triggers (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html) +// . This action might generate an SMS text message. Starting June 1, 2021, US +// telecom carriers require you to register an origination phone number before you +// can send SMS messages to US phone numbers. If you use SMS text messages in +// Amazon Cognito, you must register a phone number with Amazon Pinpoint (https://console.aws.amazon.com/pinpoint/home/) // . Amazon Cognito uses the registered number automatically. Otherwise, Amazon // Cognito users who must receive SMS messages might not be able to sign up, // activate their accounts, or sign in. If you have never used SMS text messages @@ -70,34 +76,41 @@ type AdminRespondToAuthChallengeInput struct { // AdminRespondToAuthChallenge calls. AnalyticsMetadata *types.AnalyticsMetadataType - // The challenge responses. These are inputs corresponding to the value of - // ChallengeName , for example: - // - SMS_MFA : SMS_MFA_CODE , USERNAME , SECRET_HASH (if app client is configured - // with client secret). - // - PASSWORD_VERIFIER : PASSWORD_CLAIM_SIGNATURE , PASSWORD_CLAIM_SECRET_BLOCK , - // TIMESTAMP , USERNAME , SECRET_HASH (if app client is configured with client - // secret). PASSWORD_VERIFIER requires DEVICE_KEY when signing in with a - // remembered device. - // - ADMIN_NO_SRP_AUTH : PASSWORD , USERNAME , SECRET_HASH (if app client is - // configured with client secret). - // - NEW_PASSWORD_REQUIRED : NEW_PASSWORD , USERNAME , SECRET_HASH (if app client - // is configured with client secret). To set any required attributes that Amazon - // Cognito returned as requiredAttributes in the AdminInitiateAuth response, add - // a userAttributes.attributename parameter. This parameter can also set values - // for writable attributes that aren't required by your user pool. In a - // NEW_PASSWORD_REQUIRED challenge response, you can't modify a required - // attribute that already has a value. In AdminRespondToAuthChallenge , set a - // value for any keys that Amazon Cognito returned in the requiredAttributes - // parameter, then use the AdminUpdateUserAttributes API operation to modify the - // value of any additional attributes. - // - MFA_SETUP requires USERNAME , plus you must use the session value returned - // by VerifySoftwareToken in the Session parameter. - // The value of the USERNAME attribute must be the user's actual username, not an - // alias (such as an email address or phone number). To make this simpler, the - // AdminInitiateAuth response includes the actual username value in the - // USERNAMEUSER_ID_FOR_SRP attribute. This happens even if you specified an alias - // in your call to AdminInitiateAuth . For more information about SECRET_HASH , see - // Computing secret hash values (https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash) + // The responses to the challenge that you received in the previous request. Each + // challenge has its own required response parameters. The following examples are + // partial JSON request bodies that highlight challenge-response parameters. You + // must provide a SECRET_HASH parameter in all challenge responses to an app client + // that has a client secret. SMS_MFA "ChallengeName": "SMS_MFA", + // "ChallengeResponses": {"SMS_MFA_CODE": "[SMS_code]", "USERNAME": "[username]"} + // PASSWORD_VERIFIER "ChallengeName": "PASSWORD_VERIFIER", "ChallengeResponses": + // {"PASSWORD_CLAIM_SIGNATURE": "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": + // "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"} Add + // "DEVICE_KEY" when you sign in with a remembered device. CUSTOM_CHALLENGE + // "ChallengeName": "CUSTOM_CHALLENGE", "ChallengeResponses": {"USERNAME": + // "[username]", "ANSWER": "[challenge_answer]"} Add "DEVICE_KEY" when you sign in + // with a remembered device. NEW_PASSWORD_REQUIRED "ChallengeName": + // "NEW_PASSWORD_REQUIRED", "ChallengeResponses": {"NEW_PASSWORD": + // "[new_password]", "USERNAME": "[username]"} To set any required attributes that + // InitiateAuth returned in an requiredAttributes parameter, add + // "userAttributes.[attribute_name]": "[attribute_value]" . This parameter can also + // set values for writable attributes that aren't required by your user pool. In a + // NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute + // that already has a value. In RespondToAuthChallenge , set a value for any keys + // that Amazon Cognito returned in the requiredAttributes parameter, then use the + // UpdateUserAttributes API operation to modify the value of any additional + // attributes. SOFTWARE_TOKEN_MFA "ChallengeName": "SOFTWARE_TOKEN_MFA", + // "ChallengeResponses": {"USERNAME": "[username]", "SOFTWARE_TOKEN_MFA_CODE": + // [authenticator_code]} DEVICE_SRP_AUTH "ChallengeName": "DEVICE_SRP_AUTH", + // "ChallengeResponses": {"USERNAME": "[username]", "DEVICE_KEY": "[device_key]", + // "SRP_A": "[srp_a]"} DEVICE_PASSWORD_VERIFIER "ChallengeName": + // "DEVICE_PASSWORD_VERIFIER", "ChallengeResponses": {"DEVICE_KEY": "[device_key]", + // "PASSWORD_CLAIM_SIGNATURE": "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": + // "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"} MFA_SETUP + // "ChallengeName": "MFA_SETUP", "ChallengeResponses": {"USERNAME": "[username]"}, + // "SESSION": "[Session ID from VerifySoftwareToken]" SELECT_MFA_TYPE + // "ChallengeName": "SELECT_MFA_TYPE", "ChallengeResponses": {"USERNAME": + // "[username]", "ANSWER": "[SMS_MFA or SOFTWARE_TOKEN_MFA]"} For more information + // about SECRET_HASH , see Computing secret hash values (https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash) // . For information about DEVICE_KEY , see Working with user devices in your user // pool (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html) // . diff --git a/service/cognitoidentityprovider/api_op_AdminSetUserMFAPreference.go b/service/cognitoidentityprovider/api_op_AdminSetUserMFAPreference.go index d2480a111a3..3bb4f3fabc3 100644 --- a/service/cognitoidentityprovider/api_op_AdminSetUserMFAPreference.go +++ b/service/cognitoidentityprovider/api_op_AdminSetUserMFAPreference.go @@ -45,7 +45,10 @@ type AdminSetUserMFAPreferenceInput struct { // This member is required. UserPoolId *string - // The user pool username or alias. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminSetUserPassword.go b/service/cognitoidentityprovider/api_op_AdminSetUserPassword.go index 6aac9f145da..0b0512625a2 100644 --- a/service/cognitoidentityprovider/api_op_AdminSetUserPassword.go +++ b/service/cognitoidentityprovider/api_op_AdminSetUserPassword.go @@ -61,7 +61,10 @@ type AdminSetUserPasswordInput struct { // This member is required. UserPoolId *string - // The user name of the user whose password you want to set. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminSetUserSettings.go b/service/cognitoidentityprovider/api_op_AdminSetUserSettings.go index 514b66e433c..44b50f682bd 100644 --- a/service/cognitoidentityprovider/api_op_AdminSetUserSettings.go +++ b/service/cognitoidentityprovider/api_op_AdminSetUserSettings.go @@ -51,7 +51,10 @@ type AdminSetUserSettingsInput struct { // This member is required. UserPoolId *string - // The user name of the user whose options you're setting. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminUpdateAuthEventFeedback.go b/service/cognitoidentityprovider/api_op_AdminUpdateAuthEventFeedback.go index 06a8697b7a2..392c53633ec 100644 --- a/service/cognitoidentityprovider/api_op_AdminUpdateAuthEventFeedback.go +++ b/service/cognitoidentityprovider/api_op_AdminUpdateAuthEventFeedback.go @@ -57,7 +57,10 @@ type AdminUpdateAuthEventFeedbackInput struct { // This member is required. UserPoolId *string - // The user pool username. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminUpdateDeviceStatus.go b/service/cognitoidentityprovider/api_op_AdminUpdateDeviceStatus.go index 8471461d2c1..574cea82380 100644 --- a/service/cognitoidentityprovider/api_op_AdminUpdateDeviceStatus.go +++ b/service/cognitoidentityprovider/api_op_AdminUpdateDeviceStatus.go @@ -47,7 +47,10 @@ type AdminUpdateDeviceStatusInput struct { // This member is required. UserPoolId *string - // The user name. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go b/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go index b4d17e38726..eb850274942 100644 --- a/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go +++ b/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go @@ -77,7 +77,10 @@ type AdminUpdateUserAttributesInput struct { // This member is required. UserPoolId *string - // The user name of the user for whom you want to update user attributes. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_AdminUserGlobalSignOut.go b/service/cognitoidentityprovider/api_op_AdminUserGlobalSignOut.go index c60007a3053..692affe427a 100644 --- a/service/cognitoidentityprovider/api_op_AdminUserGlobalSignOut.go +++ b/service/cognitoidentityprovider/api_op_AdminUserGlobalSignOut.go @@ -11,14 +11,24 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Signs out a user from all devices. AdminUserGlobalSignOut invalidates all -// identity, access and refresh tokens that Amazon Cognito has issued to a user. A -// user can still use a hosted UI cookie to retrieve new tokens for the duration of -// the 1-hour cookie validity period. Your app isn't aware that a user's access -// token is revoked unless it attempts to authorize a user pools API request with -// an access token that contains the scope aws.cognito.signin.user.admin . Your app -// might otherwise accept access tokens until they expire. Amazon Cognito evaluates -// Identity and Access Management (IAM) policies in requests for this API +// Invalidates the identity, access, and refresh tokens that Amazon Cognito issued +// to a user. Call this operation with your administrative credentials when your +// user signs out of your app. This results in the following behavior. +// - Amazon Cognito no longer accepts token-authorized user operations that you +// authorize with a signed-out user's access tokens. For more information, see +// Using the Amazon Cognito user pools API and user pool endpoints (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) +// . Amazon Cognito returns an Access Token has been revoked error when your app +// attempts to authorize a user pools API request with a revoked access token that +// contains the scope aws.cognito.signin.user.admin . +// - Amazon Cognito no longer accepts a signed-out user's ID token in a GetId (https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetId.html) +// request to an identity pool with ServerSideTokenCheck enabled for its user +// pool IdP configuration in CognitoIdentityProvider (https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_CognitoIdentityProvider.html) +// . +// - Amazon Cognito no longer accepts a signed-out user's refresh tokens in +// refresh requests. +// +// Other requests might be valid until your user's token expires. Amazon Cognito +// evaluates Identity and Access Management (IAM) policies in requests for this API // operation. For this operation, you must use IAM credentials to authorize // requests, and you must grant yourself the corresponding IAM permission in a // policy. Learn more @@ -47,7 +57,10 @@ type AdminUserGlobalSignOutInput struct { // This member is required. UserPoolId *string - // The user name. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_ConfirmForgotPassword.go b/service/cognitoidentityprovider/api_op_ConfirmForgotPassword.go index 1b7fb3518b6..fb01e0a3109 100644 --- a/service/cognitoidentityprovider/api_op_ConfirmForgotPassword.go +++ b/service/cognitoidentityprovider/api_op_ConfirmForgotPassword.go @@ -53,8 +53,10 @@ type ConfirmForgotPasswordInput struct { // This member is required. Password *string - // The user name of the user for whom you want to enter a code to retrieve a - // forgotten password. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_ConfirmSignUp.go b/service/cognitoidentityprovider/api_op_ConfirmSignUp.go index f1022659122..478bbce6906 100644 --- a/service/cognitoidentityprovider/api_op_ConfirmSignUp.go +++ b/service/cognitoidentityprovider/api_op_ConfirmSignUp.go @@ -11,12 +11,24 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Confirms registration of a new user. Amazon Cognito doesn't evaluate Identity -// and Access Management (IAM) policies in requests for this API operation. For -// this operation, you can't use IAM credentials to authorize requests, and you -// can't grant IAM permissions in policies. For more information about -// authorization models in Amazon Cognito, see Using the Amazon Cognito native and -// OIDC APIs (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) +// This public API operation provides a code that Amazon Cognito sent to your user +// when they signed up in your user pool via the SignUp (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SignUp.html) +// API operation. After your user enters their code, they confirm ownership of the +// email address or phone number that they provided, and their user account becomes +// active. Depending on your user pool configuration, your users will receive their +// confirmation code in an email or SMS message. Local users who signed up in your +// user pool are the only type of user who can confirm sign-up with a code. Users +// who federate through an external identity provider (IdP) have already been +// confirmed by their IdP. Administrator-created users, users created with the +// AdminCreateUser (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminCreateUser.html) +// API operation, confirm their accounts when they respond to their invitation +// email message and choose a password. They do not receive a confirmation code. +// Instead, they receive a temporary password. Amazon Cognito doesn't evaluate +// Identity and Access Management (IAM) policies in requests for this API +// operation. For this operation, you can't use IAM credentials to authorize +// requests, and you can't grant IAM permissions in policies. For more information +// about authorization models in Amazon Cognito, see Using the Amazon Cognito +// native and OIDC APIs (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) // . func (c *Client) ConfirmSignUp(ctx context.Context, params *ConfirmSignUpInput, optFns ...func(*Options)) (*ConfirmSignUpOutput, error) { if params == nil { @@ -46,7 +58,10 @@ type ConfirmSignUpInput struct { // This member is required. ConfirmationCode *string - // The user name of the user whose registration you want to confirm. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go b/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go index 6e3c8e06d59..356d2019901 100644 --- a/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go +++ b/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go @@ -194,7 +194,18 @@ type CreateUserPoolClientInput struct { // existence related errors aren't prevented. PreventUserExistenceErrors types.PreventUserExistenceErrorTypes - // The read attributes. + // The list of user attributes that you want your app client to have read-only + // access to. After your user authenticates in your app, their access token + // authorizes them to read their own attribute value for any attribute in this + // list. An example of this kind of activity is when your user selects a link to + // view their profile information. Your app makes a GetUser (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUser.html) + // API request to retrieve and display your user's profile data. When you don't + // specify the ReadAttributes for your app client, your app can read the values of + // email_verified , phone_number_verified , and the Standard attributes of your + // user pool. When your user pool has read access to these default attributes, + // ReadAttributes doesn't return any information. Amazon Cognito only populates + // ReadAttributes in the API response if you have specified your own custom set of + // read attributes. ReadAttributes []string // The refresh token time limit. After this limit expires, your user can't use @@ -221,12 +232,23 @@ type CreateUserPoolClientInput struct { // RefreshToken is days, and default for ID and access tokens are hours. TokenValidityUnits *types.TokenValidityUnitsType - // The user pool attributes that the app client can write to. If your app client - // allows users to sign in through an IdP, this array must include all attributes - // that you have mapped to IdP attributes. Amazon Cognito updates mapped attributes - // when users sign in to your application through an IdP. If your app client does - // not have write access to a mapped attribute, Amazon Cognito throws an error when - // it tries to update the attribute. For more information, see Specifying IdP + // The list of user attributes that you want your app client to have write access + // to. After your user authenticates in your app, their access token authorizes + // them to set or modify their own attribute value for any attribute in this list. + // An example of this kind of activity is when you present your user with a form to + // update their profile information and they change their last name. Your app then + // makes an UpdateUserAttributes (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserAttributes.html) + // API request and sets family_name to the new value. When you don't specify the + // WriteAttributes for your app client, your app can write the values of the + // Standard attributes of your user pool. When your user pool has write access to + // these default attributes, WriteAttributes doesn't return any information. + // Amazon Cognito only populates WriteAttributes in the API response if you have + // specified your own custom set of write attributes. If your app client allows + // users to sign in through an IdP, this array must include all attributes that you + // have mapped to IdP attributes. Amazon Cognito updates mapped attributes when + // users sign in to your application through an IdP. If your app client does not + // have write access to a mapped attribute, Amazon Cognito throws an error when it + // tries to update the attribute. For more information, see Specifying IdP // Attribute Mappings for Your user pool (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html) // . WriteAttributes []string diff --git a/service/cognitoidentityprovider/api_op_ForgotPassword.go b/service/cognitoidentityprovider/api_op_ForgotPassword.go index 568dd871dad..54e59745eb1 100644 --- a/service/cognitoidentityprovider/api_op_ForgotPassword.go +++ b/service/cognitoidentityprovider/api_op_ForgotPassword.go @@ -63,8 +63,10 @@ type ForgotPasswordInput struct { // This member is required. ClientId *string - // The user name of the user for whom you want to enter a code to reset a - // forgotten password. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_GlobalSignOut.go b/service/cognitoidentityprovider/api_op_GlobalSignOut.go index faa6c4e705d..1a0a19861c1 100644 --- a/service/cognitoidentityprovider/api_op_GlobalSignOut.go +++ b/service/cognitoidentityprovider/api_op_GlobalSignOut.go @@ -10,18 +10,28 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Signs out a user from all devices. GlobalSignOut invalidates all identity, -// access and refresh tokens that Amazon Cognito has issued to a user. A user can -// still use a hosted UI cookie to retrieve new tokens for the duration of the -// 1-hour cookie validity period. Your app isn't aware that a user's access token -// is revoked unless it attempts to authorize a user pools API request with an -// access token that contains the scope aws.cognito.signin.user.admin . Your app -// might otherwise accept access tokens until they expire. Amazon Cognito doesn't -// evaluate Identity and Access Management (IAM) policies in requests for this API -// operation. For this operation, you can't use IAM credentials to authorize -// requests, and you can't grant IAM permissions in policies. For more information -// about authorization models in Amazon Cognito, see Using the Amazon Cognito -// native and OIDC APIs (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) +// Invalidates the identity, access, and refresh tokens that Amazon Cognito issued +// to a user. Call this operation when your user signs out of your app. This +// results in the following behavior. +// - Amazon Cognito no longer accepts token-authorized user operations that you +// authorize with a signed-out user's access tokens. For more information, see +// Using the Amazon Cognito user pools API and user pool endpoints (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) +// . Amazon Cognito returns an Access Token has been revoked error when your app +// attempts to authorize a user pools API request with a revoked access token that +// contains the scope aws.cognito.signin.user.admin . +// - Amazon Cognito no longer accepts a signed-out user's ID token in a GetId (https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetId.html) +// request to an identity pool with ServerSideTokenCheck enabled for its user +// pool IdP configuration in CognitoIdentityProvider (https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_CognitoIdentityProvider.html) +// . +// - Amazon Cognito no longer accepts a signed-out user's refresh tokens in +// refresh requests. +// +// Other requests might be valid until your user's token expires. Amazon Cognito +// doesn't evaluate Identity and Access Management (IAM) policies in requests for +// this API operation. For this operation, you can't use IAM credentials to +// authorize requests, and you can't grant IAM permissions in policies. For more +// information about authorization models in Amazon Cognito, see Using the Amazon +// Cognito native and OIDC APIs (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) // . func (c *Client) GlobalSignOut(ctx context.Context, params *GlobalSignOutInput, optFns ...func(*Options)) (*GlobalSignOutOutput, error) { if params == nil { diff --git a/service/cognitoidentityprovider/api_op_InitiateAuth.go b/service/cognitoidentityprovider/api_op_InitiateAuth.go index b436c3e736e..68c0909b72f 100644 --- a/service/cognitoidentityprovider/api_op_InitiateAuth.go +++ b/service/cognitoidentityprovider/api_op_InitiateAuth.go @@ -123,7 +123,6 @@ type InitiateAuthInput struct { // - Pre token generation // - Create auth challenge // - Define auth challenge - // - Verify auth challenge // For more information, see Customizing user pool Workflows with Lambda Triggers (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html) // in the Amazon Cognito Developer Guide. When you use the ClientMetadata // parameter, remember that Amazon Cognito won't do the following: @@ -155,9 +154,9 @@ type InitiateAuthOutput struct { AuthenticationResult *types.AuthenticationResultType // The name of the challenge that you're responding to with this call. This name - // is returned in the AdminInitiateAuth response if you must pass another - // challenge. Valid values include the following: All of the following challenges - // require USERNAME and SECRET_HASH (if applicable) in the parameters. + // is returned in the InitiateAuth response if you must pass another challenge. + // Valid values include the following: All of the following challenges require + // USERNAME and SECRET_HASH (if applicable) in the parameters. // - SMS_MFA : Next challenge is to supply an SMS_MFA_CODE , delivered via SMS. // - PASSWORD_VERIFIER : Next challenge is to supply PASSWORD_CLAIM_SIGNATURE , // PASSWORD_CLAIM_SECRET_BLOCK , and TIMESTAMP after the client-side SRP @@ -183,7 +182,7 @@ type InitiateAuthOutput struct { // additional attributes. // - MFA_SETUP : For users who are required to setup an MFA factor before they // can sign in. The MFA types activated for the user pool will be listed in the - // challenge parameters MFA_CAN_SETUP value. To set up software token MFA, use + // challenge parameters MFAS_CAN_SETUP value. To set up software token MFA, use // the session returned here from InitiateAuth as an input to // AssociateSoftwareToken . Use the session returned by VerifySoftwareToken as an // input to RespondToAuthChallenge with challenge name MFA_SETUP to complete diff --git a/service/cognitoidentityprovider/api_op_ListDevices.go b/service/cognitoidentityprovider/api_op_ListDevices.go index 3ea5242f952..5d44bb4adc4 100644 --- a/service/cognitoidentityprovider/api_op_ListDevices.go +++ b/service/cognitoidentityprovider/api_op_ListDevices.go @@ -45,7 +45,12 @@ type ListDevicesInput struct { // The limit of the device request. Limit *int32 - // The pagination token for the list request. + // This API operation returns a limited number of results. The pagination token is + // an identifier that you can present in an additional API request with the same + // parameters. When you include the pagination token, Amazon Cognito returns the + // next set of items after the current list. Subsequent requests return a new + // pagination token. By use of this token, you can paginate through the full list + // of items. PaginationToken *string noSmithyDocumentSerde @@ -57,7 +62,10 @@ type ListDevicesOutput struct { // The devices returned in the list devices response. Devices []types.DeviceType - // The pagination token for the list device response. + // The identifier that Amazon Cognito returned with the previous request to this + // operation. When you include a pagination token in your request, Amazon Cognito + // returns the next set of items in the list. By use of this token, you can + // paginate through the full list of items. PaginationToken *string // Metadata pertaining to the operation's result. diff --git a/service/cognitoidentityprovider/api_op_ListUserImportJobs.go b/service/cognitoidentityprovider/api_op_ListUserImportJobs.go index 053285038ac..36a4b66731c 100644 --- a/service/cognitoidentityprovider/api_op_ListUserImportJobs.go +++ b/service/cognitoidentityprovider/api_op_ListUserImportJobs.go @@ -46,8 +46,12 @@ type ListUserImportJobsInput struct { // This member is required. UserPoolId *string - // An identifier that was returned from the previous call to ListUserImportJobs , - // which can be used to return the next set of import jobs in the list. + // This API operation returns a limited number of results. The pagination token is + // an identifier that you can present in an additional API request with the same + // parameters. When you include the pagination token, Amazon Cognito returns the + // next set of items after the current list. Subsequent requests return a new + // pagination token. By use of this token, you can paginate through the full list + // of items. PaginationToken *string noSmithyDocumentSerde @@ -57,8 +61,10 @@ type ListUserImportJobsInput struct { // jobs. type ListUserImportJobsOutput struct { - // An identifier that can be used to return the next set of user import jobs in - // the list. + // The identifier that Amazon Cognito returned with the previous request to this + // operation. When you include a pagination token in your request, Amazon Cognito + // returns the next set of items in the list. By use of this token, you can + // paginate through the full list of items. PaginationToken *string // The user import jobs. diff --git a/service/cognitoidentityprovider/api_op_ListUsers.go b/service/cognitoidentityprovider/api_op_ListUsers.go index 90ca931225d..20256fc5cf1 100644 --- a/service/cognitoidentityprovider/api_op_ListUsers.go +++ b/service/cognitoidentityprovider/api_op_ListUsers.go @@ -45,7 +45,11 @@ type ListUsersInput struct { // A JSON array of user attribute names, for example given_name , that you want // Amazon Cognito to include in the response for each user. When you don't provide // an AttributesToGet parameter, Amazon Cognito returns all attributes for each - // user. + // user. Use AttributesToGet with required attributes in your user pool, or in + // conjunction with Filter . Amazon Cognito returns an error if not all users in + // the results have set a value for the attribute you request. Attributes that you + // can't filter on, including custom attributes, must have a value set in every + // user profile before an AttributesToGet parameter returns results. AttributesToGet []string // A filter string of the form "AttributeName Filter-Type "AttributeValue"". @@ -87,8 +91,12 @@ type ListUsersInput struct { // Maximum number of users to be returned. Limit *int32 - // An identifier that was returned from the previous call to this operation, which - // can be used to return the next set of items in the list. + // This API operation returns a limited number of results. The pagination token is + // an identifier that you can present in an additional API request with the same + // parameters. When you include the pagination token, Amazon Cognito returns the + // next set of items after the current list. Subsequent requests return a new + // pagination token. By use of this token, you can paginate through the full list + // of items. PaginationToken *string noSmithyDocumentSerde @@ -97,8 +105,10 @@ type ListUsersInput struct { // The response from the request to list users. type ListUsersOutput struct { - // An identifier that was returned from the previous call to this operation, which - // can be used to return the next set of items in the list. + // The identifier that Amazon Cognito returned with the previous request to this + // operation. When you include a pagination token in your request, Amazon Cognito + // returns the next set of items in the list. By use of this token, you can + // paginate through the full list of items. PaginationToken *string // A list of the user pool users, and their attributes, that match your query. diff --git a/service/cognitoidentityprovider/api_op_ListUsersInGroup.go b/service/cognitoidentityprovider/api_op_ListUsersInGroup.go index d1c01a04fef..01fbac197c5 100644 --- a/service/cognitoidentityprovider/api_op_ListUsersInGroup.go +++ b/service/cognitoidentityprovider/api_op_ListUsersInGroup.go @@ -45,7 +45,7 @@ type ListUsersInGroupInput struct { // This member is required. UserPoolId *string - // The limit of the request to list users. + // The maximum number of users that you want to retrieve before pagination. Limit *int32 // An identifier that was returned from the previous call to this operation, which @@ -61,7 +61,7 @@ type ListUsersInGroupOutput struct { // items in the list. NextToken *string - // The users returned in the request to list users. + // A list of users in the group, and their attributes. Users []types.UserType // Metadata pertaining to the operation's result. @@ -159,7 +159,7 @@ var _ ListUsersInGroupAPIClient = (*Client)(nil) // ListUsersInGroupPaginatorOptions is the paginator options for ListUsersInGroup type ListUsersInGroupPaginatorOptions struct { - // The limit of the request to list users. + // The maximum number of users that you want to retrieve before pagination. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go b/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go index d219fdc5aef..e9393793071 100644 --- a/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go +++ b/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go @@ -54,8 +54,10 @@ type ResendConfirmationCodeInput struct { // This member is required. ClientId *string - // The username attribute of the user to whom you want to resend a confirmation - // code. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go b/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go index 2afd55efe49..c781a4604b4 100644 --- a/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go +++ b/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go @@ -11,12 +11,18 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Responds to the authentication challenge. Amazon Cognito doesn't evaluate -// Identity and Access Management (IAM) policies in requests for this API -// operation. For this operation, you can't use IAM credentials to authorize -// requests, and you can't grant IAM permissions in policies. For more information -// about authorization models in Amazon Cognito, see Using the Amazon Cognito -// native and OIDC APIs (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) +// Some API operations in a user pool generate a challenge, like a prompt for an +// MFA code, for device authentication that bypasses MFA, or for a custom +// authentication challenge. A RespondToAuthChallenge API request provides the +// answer to that challenge, like a code or a secure remote password (SRP). The +// parameters of a response to an authentication challenge vary with the type of +// challenge. For more information about custom authentication challenges, see +// Custom authentication challenge Lambda triggers (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html) +// . Amazon Cognito doesn't evaluate Identity and Access Management (IAM) policies +// in requests for this API operation. For this operation, you can't use IAM +// credentials to authorize requests, and you can't grant IAM permissions in +// policies. For more information about authorization models in Amazon Cognito, see +// Using the Amazon Cognito native and OIDC APIs (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) // . This action might generate an SMS text message. Starting June 1, 2021, US // telecom carriers require you to register an origination phone number before you // can send SMS messages to US phone numbers. If you use SMS text messages in @@ -64,32 +70,41 @@ type RespondToAuthChallengeInput struct { // RespondToAuthChallenge calls. AnalyticsMetadata *types.AnalyticsMetadataType - // The challenge responses. These are inputs corresponding to the value of - // ChallengeName , for example: SECRET_HASH (if app client is configured with - // client secret) applies to all of the inputs that follow (including - // SOFTWARE_TOKEN_MFA ). - // - SMS_MFA : SMS_MFA_CODE , USERNAME . - // - PASSWORD_VERIFIER : PASSWORD_CLAIM_SIGNATURE , PASSWORD_CLAIM_SECRET_BLOCK , - // TIMESTAMP , USERNAME . PASSWORD_VERIFIER requires DEVICE_KEY when you sign in - // with a remembered device. - // - NEW_PASSWORD_REQUIRED : NEW_PASSWORD , USERNAME , SECRET_HASH (if app client - // is configured with client secret). To set any required attributes that Amazon - // Cognito returned as requiredAttributes in the InitiateAuth response, add a - // userAttributes.attributename parameter. This parameter can also set values - // for writable attributes that aren't required by your user pool. In a - // NEW_PASSWORD_REQUIRED challenge response, you can't modify a required - // attribute that already has a value. In RespondToAuthChallenge , set a value - // for any keys that Amazon Cognito returned in the requiredAttributes parameter, - // then use the UpdateUserAttributes API operation to modify the value of any - // additional attributes. - // - SOFTWARE_TOKEN_MFA : USERNAME and SOFTWARE_TOKEN_MFA_CODE are required - // attributes. - // - DEVICE_SRP_AUTH requires USERNAME , DEVICE_KEY , SRP_A (and SECRET_HASH ). - // - DEVICE_PASSWORD_VERIFIER requires everything that PASSWORD_VERIFIER - // requires, plus DEVICE_KEY . - // - MFA_SETUP requires USERNAME , plus you must use the session value returned - // by VerifySoftwareToken in the Session parameter. - // For more information about SECRET_HASH , see Computing secret hash values (https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash) + // The responses to the challenge that you received in the previous request. Each + // challenge has its own required response parameters. The following examples are + // partial JSON request bodies that highlight challenge-response parameters. You + // must provide a SECRET_HASH parameter in all challenge responses to an app client + // that has a client secret. SMS_MFA "ChallengeName": "SMS_MFA", + // "ChallengeResponses": {"SMS_MFA_CODE": "[SMS_code]", "USERNAME": "[username]"} + // PASSWORD_VERIFIER "ChallengeName": "PASSWORD_VERIFIER", "ChallengeResponses": + // {"PASSWORD_CLAIM_SIGNATURE": "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": + // "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"} Add + // "DEVICE_KEY" when you sign in with a remembered device. CUSTOM_CHALLENGE + // "ChallengeName": "CUSTOM_CHALLENGE", "ChallengeResponses": {"USERNAME": + // "[username]", "ANSWER": "[challenge_answer]"} Add "DEVICE_KEY" when you sign in + // with a remembered device. NEW_PASSWORD_REQUIRED "ChallengeName": + // "NEW_PASSWORD_REQUIRED", "ChallengeResponses": {"NEW_PASSWORD": + // "[new_password]", "USERNAME": "[username]"} To set any required attributes that + // InitiateAuth returned in an requiredAttributes parameter, add + // "userAttributes.[attribute_name]": "[attribute_value]" . This parameter can also + // set values for writable attributes that aren't required by your user pool. In a + // NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute + // that already has a value. In RespondToAuthChallenge , set a value for any keys + // that Amazon Cognito returned in the requiredAttributes parameter, then use the + // UpdateUserAttributes API operation to modify the value of any additional + // attributes. SOFTWARE_TOKEN_MFA "ChallengeName": "SOFTWARE_TOKEN_MFA", + // "ChallengeResponses": {"USERNAME": "[username]", "SOFTWARE_TOKEN_MFA_CODE": + // [authenticator_code]} DEVICE_SRP_AUTH "ChallengeName": "DEVICE_SRP_AUTH", + // "ChallengeResponses": {"USERNAME": "[username]", "DEVICE_KEY": "[device_key]", + // "SRP_A": "[srp_a]"} DEVICE_PASSWORD_VERIFIER "ChallengeName": + // "DEVICE_PASSWORD_VERIFIER", "ChallengeResponses": {"DEVICE_KEY": "[device_key]", + // "PASSWORD_CLAIM_SIGNATURE": "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": + // "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"} MFA_SETUP + // "ChallengeName": "MFA_SETUP", "ChallengeResponses": {"USERNAME": "[username]"}, + // "SESSION": "[Session ID from VerifySoftwareToken]" SELECT_MFA_TYPE + // "ChallengeName": "SELECT_MFA_TYPE", "ChallengeResponses": {"USERNAME": + // "[username]", "ANSWER": "[SMS_MFA or SOFTWARE_TOKEN_MFA]"} For more information + // about SECRET_HASH , see Computing secret hash values (https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash) // . For information about DEVICE_KEY , see Working with user devices in your user // pool (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html) // . diff --git a/service/cognitoidentityprovider/api_op_SignUp.go b/service/cognitoidentityprovider/api_op_SignUp.go index a94ab0ed15e..cb61e1524e1 100644 --- a/service/cognitoidentityprovider/api_op_SignUp.go +++ b/service/cognitoidentityprovider/api_op_SignUp.go @@ -59,7 +59,8 @@ type SignUpInput struct { // This member is required. Password *string - // The user name of the user you want to register. + // The username of the user that you want to sign up. The value of this parameter + // is typically a username, but can be any alias attribute in your user pool. // // This member is required. Username *string @@ -104,7 +105,16 @@ type SignUpInput struct { // Amazon Cognito when it makes API requests. UserContextData *types.UserContextDataType - // The validation data in the request to register a user. + // Temporary user attributes that contribute to the outcomes of your pre sign-up + // Lambda trigger. This set of key-value pairs are for custom validation of + // information that you collect from your users but don't need to retain. Your + // Lambda function can analyze this additional data and act on it. Your function + // might perform external API operations like logging user attributes and + // validation data to Amazon CloudWatch Logs. Validation data might also affect the + // response that your function returns to Amazon Cognito, like automatically + // confirming the user if they sign up from within your network. For more + // information about the pre sign-up Lambda trigger, see Pre sign-up Lambda trigger (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html) + // . ValidationData []types.AttributeType noSmithyDocumentSerde diff --git a/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go b/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go index 43bf77e644a..457749584a3 100644 --- a/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go +++ b/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go @@ -61,7 +61,10 @@ type UpdateAuthEventFeedbackInput struct { // This member is required. UserPoolId *string - // The user pool username. + // The username of the user that you want to query or modify. The value of this + // parameter is typically your user's username, but it can be any of their alias + // attributes. If username isn't an alias attribute in your user pool, you can + // also use their sub in this request. // // This member is required. Username *string diff --git a/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go b/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go index 4eb7d1332bb..6ee16b98ae8 100644 --- a/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go +++ b/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go @@ -11,12 +11,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Allows a user to update a specific attribute (one at a time). Amazon Cognito -// doesn't evaluate Identity and Access Management (IAM) policies in requests for -// this API operation. For this operation, you can't use IAM credentials to -// authorize requests, and you can't grant IAM permissions in policies. For more -// information about authorization models in Amazon Cognito, see Using the Amazon -// Cognito native and OIDC APIs (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) +// With this operation, your users can update one or more of their attributes with +// their own credentials. You authorize this API request with the user's access +// token. To delete an attribute from your user, submit the attribute in your API +// request with a blank value. Custom attribute values in this request must include +// the custom: prefix. Amazon Cognito doesn't evaluate Identity and Access +// Management (IAM) policies in requests for this API operation. For this +// operation, you can't use IAM credentials to authorize requests, and you can't +// grant IAM permissions in policies. For more information about authorization +// models in Amazon Cognito, see Using the Amazon Cognito native and OIDC APIs (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) // . This action might generate an SMS text message. Starting June 1, 2021, US // telecom carriers require you to register an origination phone number before you // can send SMS messages to US phone numbers. If you use SMS text messages in diff --git a/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go b/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go index c579a6dfe69..7c209980ff2 100644 --- a/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go +++ b/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go @@ -194,7 +194,18 @@ type UpdateUserPoolClientInput struct { // existence related errors aren't prevented. PreventUserExistenceErrors types.PreventUserExistenceErrorTypes - // The read-only attributes of the user pool. + // The list of user attributes that you want your app client to have read-only + // access to. After your user authenticates in your app, their access token + // authorizes them to read their own attribute value for any attribute in this + // list. An example of this kind of activity is when your user selects a link to + // view their profile information. Your app makes a GetUser (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUser.html) + // API request to retrieve and display your user's profile data. When you don't + // specify the ReadAttributes for your app client, your app can read the values of + // email_verified , phone_number_verified , and the Standard attributes of your + // user pool. When your user pool has read access to these default attributes, + // ReadAttributes doesn't return any information. Amazon Cognito only populates + // ReadAttributes in the API response if you have specified your own custom set of + // read attributes. ReadAttributes []string // The refresh token time limit. After this limit expires, your user can't use @@ -220,7 +231,25 @@ type UpdateUserPoolClientInput struct { // access tokens is hours. TokenValidityUnits *types.TokenValidityUnitsType - // The writeable attributes of the user pool. + // The list of user attributes that you want your app client to have write access + // to. After your user authenticates in your app, their access token authorizes + // them to set or modify their own attribute value for any attribute in this list. + // An example of this kind of activity is when you present your user with a form to + // update their profile information and they change their last name. Your app then + // makes an UpdateUserAttributes (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserAttributes.html) + // API request and sets family_name to the new value. When you don't specify the + // WriteAttributes for your app client, your app can write the values of the + // Standard attributes of your user pool. When your user pool has write access to + // these default attributes, WriteAttributes doesn't return any information. + // Amazon Cognito only populates WriteAttributes in the API response if you have + // specified your own custom set of write attributes. If your app client allows + // users to sign in through an IdP, this array must include all attributes that you + // have mapped to IdP attributes. Amazon Cognito updates mapped attributes when + // users sign in to your application through an IdP. If your app client does not + // have write access to a mapped attribute, Amazon Cognito throws an error when it + // tries to update the attribute. For more information, see Specifying IdP + // Attribute Mappings for Your user pool (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html) + // . WriteAttributes []string noSmithyDocumentSerde diff --git a/service/cognitoidentityprovider/deserializers.go b/service/cognitoidentityprovider/deserializers.go index e5467bc5ec0..9c9da5d0148 100644 --- a/service/cognitoidentityprovider/deserializers.go +++ b/service/cognitoidentityprovider/deserializers.go @@ -17812,6 +17812,11 @@ func awsAwsjson11_deserializeDocumentLambdaConfigType(v **types.LambdaConfigType sv.PreTokenGeneration = ptr.String(jtv) } + case "PreTokenGenerationConfig": + if err := awsAwsjson11_deserializeDocumentPreTokenGenerationVersionConfigType(&sv.PreTokenGenerationConfig, value); err != nil { + return err + } + case "UserMigration": if value != nil { jtv, ok := value.(string) @@ -18743,6 +18748,55 @@ func awsAwsjson11_deserializeDocumentPreconditionNotMetException(v **types.Preco return nil } +func awsAwsjson11_deserializeDocumentPreTokenGenerationVersionConfigType(v **types.PreTokenGenerationVersionConfigType, 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.PreTokenGenerationVersionConfigType + if *v == nil { + sv = &types.PreTokenGenerationVersionConfigType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LambdaArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnType to be of type string, got %T instead", value) + } + sv.LambdaArn = ptr.String(jtv) + } + + case "LambdaVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PreTokenGenerationLambdaVersionType to be of type string, got %T instead", value) + } + sv.LambdaVersion = types.PreTokenGenerationLambdaVersionType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentProviderDescription(v **types.ProviderDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/cognitoidentityprovider/doc.go b/service/cognitoidentityprovider/doc.go index 8c163db90da..453db8a0f28 100644 --- a/service/cognitoidentityprovider/doc.go +++ b/service/cognitoidentityprovider/doc.go @@ -3,20 +3,33 @@ // Package cognitoidentityprovider provides the API client, operations, and // parameter types for Amazon Cognito Identity Provider. // -// With the Amazon Cognito user pools API, you can set up user pools and app -// clients, and authenticate users. To authenticate users from third-party identity -// providers (IdPs) in this API, you can link IdP users to native user profiles (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation-consolidate-users.html) -// . Learn more about the authentication and authorization of federated users in -// the Using the Amazon Cognito user pools API and user pool endpoints (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-userpools-server-contract-reference.html) +// With the Amazon Cognito user pools API, you can configure user pools and +// authenticate users. To authenticate users from third-party identity providers +// (IdPs) in this API, you can link IdP users to native user profiles (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation-consolidate-users.html) +// . Learn more about the authentication and authorization of federated users at +// Adding user pool sign-in through a third party (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation.html) +// and in the User pool federation endpoints and hosted UI reference (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-userpools-server-contract-reference.html) // . This API reference provides detailed information about API operations and -// object types in Amazon Cognito. At the bottom of the page for each API operation -// and object, under See Also, you can learn how to use it in an Amazon Web -// Services SDK in the language of your choice. Along with resource management -// operations, the Amazon Cognito user pools API includes classes of operations and -// authorization models for client-side and server-side user operations. For more -// information, see Using the Amazon Cognito native and OIDC APIs (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) -// in the Amazon Cognito Developer Guide. You can also start reading about the -// CognitoIdentityProvider client in the following SDK guides. +// object types in Amazon Cognito. Along with resource management operations, the +// Amazon Cognito user pools API includes classes of operations and authorization +// models for client-side and server-side authentication of users. You can interact +// with operations in the Amazon Cognito user pools API as any of the following +// subjects. +// - An administrator who wants to configure user pools, app clients, users, +// groups, or other user pool functions. +// - A server-side app, like a web application, that wants to use its Amazon Web +// Services privileges to manage, authenticate, or authorize a user. +// - A client-side app, like a mobile app, that wants to make unauthenticated +// requests to manage, authenticate, or authorize a user. +// +// For more information, see Using the Amazon Cognito user pools API and user pool +// endpoints (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) +// in the Amazon Cognito Developer Guide. With your Amazon Web Services SDK, you +// can build the logic to support operational flows in every use case for this API. +// You can also make direct REST API requests to Amazon Cognito user pools service +// endpoints (https://docs.aws.amazon.com/general/latest/gr/cognito_identity.html#cognito_identity_your_user_pools_region) +// . The following links can get you started with the CognitoIdentityProvider +// client in other supported Amazon Web Services SDKs. // - Amazon Web Services Command Line Interface (https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/index.html#cli-aws-cognito-idp) // - Amazon Web Services SDK for .NET (https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/CognitoIdentityProvider/TCognitoIdentityProviderClient.html) // - Amazon Web Services SDK for C++ (https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-cognito-idp/html/class_aws_1_1_cognito_identity_provider_1_1_cognito_identity_provider_client.html) diff --git a/service/cognitoidentityprovider/serializers.go b/service/cognitoidentityprovider/serializers.go index bc2569e1145..c49fe912a31 100644 --- a/service/cognitoidentityprovider/serializers.go +++ b/service/cognitoidentityprovider/serializers.go @@ -6308,6 +6308,13 @@ func awsAwsjson11_serializeDocumentLambdaConfigType(v *types.LambdaConfigType, v ok.String(*v.PreTokenGeneration) } + if v.PreTokenGenerationConfig != nil { + ok := object.Key("PreTokenGenerationConfig") + if err := awsAwsjson11_serializeDocumentPreTokenGenerationVersionConfigType(v.PreTokenGenerationConfig, ok); err != nil { + return err + } + } + if v.UserMigration != nil { ok := object.Key("UserMigration") ok.String(*v.UserMigration) @@ -6551,6 +6558,23 @@ func awsAwsjson11_serializeDocumentPasswordPolicyType(v *types.PasswordPolicyTyp return nil } +func awsAwsjson11_serializeDocumentPreTokenGenerationVersionConfigType(v *types.PreTokenGenerationVersionConfigType, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LambdaArn != nil { + ok := object.Key("LambdaArn") + ok.String(*v.LambdaArn) + } + + if len(v.LambdaVersion) > 0 { + ok := object.Key("LambdaVersion") + ok.String(string(v.LambdaVersion)) + } + + return nil +} + func awsAwsjson11_serializeDocumentProviderDetailsType(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/cognitoidentityprovider/types/enums.go b/service/cognitoidentityprovider/types/enums.go index 3d7c771d8c2..53345740bb7 100644 --- a/service/cognitoidentityprovider/types/enums.go +++ b/service/cognitoidentityprovider/types/enums.go @@ -560,6 +560,25 @@ func (OAuthFlowType) Values() []OAuthFlowType { } } +type PreTokenGenerationLambdaVersionType string + +// Enum values for PreTokenGenerationLambdaVersionType +const ( + PreTokenGenerationLambdaVersionTypeV10 PreTokenGenerationLambdaVersionType = "V1_0" + PreTokenGenerationLambdaVersionTypeV20 PreTokenGenerationLambdaVersionType = "V2_0" +) + +// Values returns all known values for PreTokenGenerationLambdaVersionType. 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 (PreTokenGenerationLambdaVersionType) Values() []PreTokenGenerationLambdaVersionType { + return []PreTokenGenerationLambdaVersionType{ + "V1_0", + "V2_0", + } +} + type PreventUserExistenceErrorTypes string // Enum values for PreventUserExistenceErrorTypes diff --git a/service/cognitoidentityprovider/types/types.go b/service/cognitoidentityprovider/types/types.go index 5fe46844282..5ef44650b4e 100644 --- a/service/cognitoidentityprovider/types/types.go +++ b/service/cognitoidentityprovider/types/types.go @@ -328,17 +328,18 @@ type CustomDomainConfigType struct { noSmithyDocumentSerde } -// A custom email sender Lambda configuration type. +// The properties of a custom email sender Lambda trigger. type CustomEmailLambdaVersionConfigType struct { - // The Amazon Resource Name (ARN) of the Lambda function that Amazon Cognito - // activates to send email notifications to users. + // The Amazon Resource Name (ARN) of the function that you want to assign to your + // Lambda trigger. // // This member is required. LambdaArn *string - // Signature of the "request" attribute in the "event" information Amazon Cognito - // passes to your custom email Lambda function. The only supported value is V1_0 . + // The user pool trigger version of the request that Amazon Cognito sends to your + // Lambda function. Higher-numbered versions add fields that support new features. + // You must use a LambdaVersion of V1_0 with a custom sender function. // // This member is required. LambdaVersion CustomEmailSenderLambdaVersionType @@ -346,18 +347,18 @@ type CustomEmailLambdaVersionConfigType struct { noSmithyDocumentSerde } -// A custom SMS sender Lambda configuration type. +// The properties of a custom SMS sender Lambda trigger. type CustomSMSLambdaVersionConfigType struct { - // The Amazon Resource Name (ARN) of the Lambda function that Amazon Cognito - // activates to send SMS notifications to users. + // The Amazon Resource Name (ARN) of the function that you want to assign to your + // Lambda trigger. // // This member is required. LambdaArn *string - // Signature of the "request" attribute in the "event" information that Amazon - // Cognito passes to your custom SMS Lambda function. The only supported value is - // V1_0 . + // The user pool trigger version of the request that Amazon Cognito sends to your + // Lambda function. Higher-numbered versions add fields that support new features. + // You must use a LambdaVersion of V1_0 with a custom sender function. // // This member is required. LambdaVersion CustomSMSSenderLambdaVersionType @@ -762,9 +763,18 @@ type LambdaConfigType struct { // A pre-registration Lambda trigger. PreSignUp *string - // A Lambda trigger that is invoked before token generation. + // The Amazon Resource Name (ARN) of the function that you want to assign to your + // Lambda trigger. Set this parameter for legacy purposes. If you also set an ARN + // in PreTokenGenerationConfig , its value must be identical to PreTokenGeneration + // . For new instances of pre token generation triggers, set the LambdaArn of + // PreTokenGenerationConfig . You can set PreTokenGeneration *string + // The detailed configuration of a pre token generation trigger. If you also set + // an ARN in PreTokenGeneration , its value must be identical to + // PreTokenGenerationConfig . + PreTokenGenerationConfig *PreTokenGenerationVersionConfigType + // The user migration Lambda config type. UserMigration *string @@ -941,14 +951,36 @@ type PasswordPolicyType struct { // The number of days a temporary password is valid in the password policy. If the // user doesn't sign in during this time, an administrator must reset their - // password. When you set TemporaryPasswordValidityDays for a user pool, you can - // no longer set a value for the legacy UnusedAccountValidityDays parameter in - // that user pool. + // password. Defaults to 7 . If you submit a value of 0 , Amazon Cognito treats it + // as a null value and sets TemporaryPasswordValidityDays to its default value. + // When you set TemporaryPasswordValidityDays for a user pool, you can no longer + // set a value for the legacy UnusedAccountValidityDays parameter in that user + // pool. TemporaryPasswordValidityDays int32 noSmithyDocumentSerde } +// The properties of a pre token generation Lambda trigger. +type PreTokenGenerationVersionConfigType struct { + + // The Amazon Resource Name (ARN) of the function that you want to assign to your + // Lambda trigger. This parameter and the PreTokenGeneration property of + // LambdaConfig have the same value. For new instances of pre token generation + // triggers, set LambdaArn . + // + // This member is required. + LambdaArn *string + + // The user pool trigger version of the request that Amazon Cognito sends to your + // Lambda function. Higher-numbered versions add fields that support new features. + // + // This member is required. + LambdaVersion PreTokenGenerationLambdaVersionType + + noSmithyDocumentSerde +} + // A container for IdP details. type ProviderDescription struct { @@ -1085,7 +1117,10 @@ type RiskExceptionConfigurationType struct { // IAM-authenticated API operations. Use app client read/write permissions instead. type SchemaAttributeType struct { - // The data format of the values for your attribute. + // The data format of the values for your attribute. When you choose an + // AttributeDataType , Amazon Cognito validates the input against the data type. A + // custom attribute value in your user's ID token is always a string, for example + // "custom:isMember" : "true" or "custom:YearsAsMember" : "12" . AttributeDataType AttributeDataType // You should use WriteAttributes (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes) @@ -1107,7 +1142,14 @@ type SchemaAttributeType struct { // . Mutable *bool - // The name of your user pool attribute, for example username or custom:costcenter . + // The name of your user pool attribute. When you create or update a user pool, + // adding a schema attribute creates a custom or developer-only attribute. When you + // add an attribute with a Name value of MyAttribute , Amazon Cognito creates the + // custom attribute custom:MyAttribute . When DeveloperOnlyAttribute is true , + // Amazon Cognito creates your attribute as dev:MyAttribute . In an operation that + // describes a user pool, Amazon Cognito returns this value as value for standard + // attributes, custom:value for custom attributes, and dev:value for + // developer-only attributes.. Name *string // Specifies the constraints for an attribute of the number type. @@ -1618,7 +1660,18 @@ type UserPoolClientType struct { // existence related errors aren't prevented. PreventUserExistenceErrors PreventUserExistenceErrorTypes - // The Read-only attributes. + // The list of user attributes that you want your app client to have read-only + // access to. After your user authenticates in your app, their access token + // authorizes them to read their own attribute value for any attribute in this + // list. An example of this kind of activity is when your user selects a link to + // view their profile information. Your app makes a GetUser (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUser.html) + // API request to retrieve and display your user's profile data. When you don't + // specify the ReadAttributes for your app client, your app can read the values of + // email_verified , phone_number_verified , and the Standard attributes of your + // user pool. When your user pool has read access to these default attributes, + // ReadAttributes doesn't return any information. Amazon Cognito only populates + // ReadAttributes in the API response if you have specified your own custom set of + // read attributes. ReadAttributes []string // The refresh token time limit. After this limit expires, your user can't use @@ -1646,7 +1699,25 @@ type UserPoolClientType struct { // The user pool ID for the user pool client. UserPoolId *string - // The writeable attributes. + // The list of user attributes that you want your app client to have write access + // to. After your user authenticates in your app, their access token authorizes + // them to set or modify their own attribute value for any attribute in this list. + // An example of this kind of activity is when you present your user with a form to + // update their profile information and they change their last name. Your app then + // makes an UpdateUserAttributes (https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserAttributes.html) + // API request and sets family_name to the new value. When you don't specify the + // WriteAttributes for your app client, your app can write the values of the + // Standard attributes of your user pool. When your user pool has write access to + // these default attributes, WriteAttributes doesn't return any information. + // Amazon Cognito only populates WriteAttributes in the API response if you have + // specified your own custom set of write attributes. If your app client allows + // users to sign in through an IdP, this array must include all attributes that you + // have mapped to IdP attributes. Amazon Cognito updates mapped attributes when + // users sign in to your application through an IdP. If your app client does not + // have write access to a mapped attribute, Amazon Cognito throws an error when it + // tries to update the attribute. For more information, see Specifying IdP + // Attribute Mappings for Your user pool (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html) + // . WriteAttributes []string noSmithyDocumentSerde @@ -1824,7 +1895,7 @@ type UserPoolType struct { // . SmsVerificationMessage *string - // The status of a user pool. + // This parameter is no longer used. // // Deprecated: This property is no longer available. Status StatusType diff --git a/service/cognitoidentityprovider/validators.go b/service/cognitoidentityprovider/validators.go index cc1d8c6b0a6..f78a49c6b63 100644 --- a/service/cognitoidentityprovider/validators.go +++ b/service/cognitoidentityprovider/validators.go @@ -2687,6 +2687,11 @@ func validateLambdaConfigType(v *types.LambdaConfigType) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "LambdaConfigType"} + if v.PreTokenGenerationConfig != nil { + if err := validatePreTokenGenerationVersionConfigType(v.PreTokenGenerationConfig); err != nil { + invalidParams.AddNested("PreTokenGenerationConfig", err.(smithy.InvalidParamsError)) + } + } if v.CustomSMSSender != nil { if err := validateCustomSMSLambdaVersionConfigType(v.CustomSMSSender); err != nil { invalidParams.AddNested("CustomSMSSender", err.(smithy.InvalidParamsError)) @@ -2784,6 +2789,24 @@ func validateNotifyEmailType(v *types.NotifyEmailType) error { } } +func validatePreTokenGenerationVersionConfigType(v *types.PreTokenGenerationVersionConfigType) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PreTokenGenerationVersionConfigType"} + if len(v.LambdaVersion) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("LambdaVersion")) + } + if v.LambdaArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LambdaArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRecoveryMechanismsType(v []types.RecoveryOptionType) error { if v == nil { return nil diff --git a/service/dlm/internal/endpoints/endpoints.go b/service/dlm/internal/endpoints/endpoints.go index 433f3db5105..61fe929cefb 100644 --- a/service/dlm/internal/endpoints/endpoints.go +++ b/service/dlm/internal/endpoints/endpoints.go @@ -199,6 +199,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, diff --git a/service/eks/api_op_AssociateAccessPolicy.go b/service/eks/api_op_AssociateAccessPolicy.go new file mode 100644 index 00000000000..e162a4279aa --- /dev/null +++ b/service/eks/api_op_AssociateAccessPolicy.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +import ( + "context" + "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/eks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates an access policy and its scope to an access entry. For more +// information about associating access policies, see Associating and +// disassociating access policies to and from access entries (https://docs.aws.amazon.com/eks/latest/userguide/access-policies.html) +// in the Amazon EKS User Guide. +func (c *Client) AssociateAccessPolicy(ctx context.Context, params *AssociateAccessPolicyInput, optFns ...func(*Options)) (*AssociateAccessPolicyOutput, error) { + if params == nil { + params = &AssociateAccessPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateAccessPolicy", params, optFns, c.addOperationAssociateAccessPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateAccessPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateAccessPolicyInput struct { + + // The scope for the AccessPolicy . You can scope access policies to an entire + // cluster or to specific Kubernetes namespaces. + // + // This member is required. + AccessScope *types.AccessScope + + // The name of your cluster. + // + // This member is required. + ClusterName *string + + // The ARN of the AccessPolicy that you're associating. For a list of ARNs, use + // ListAccessPolicies . + // + // This member is required. + PolicyArn *string + + // The Amazon Resource Name (ARN) of the IAM user or role for the AccessEntry that + // you're associating the access policy to. + // + // This member is required. + PrincipalArn *string + + noSmithyDocumentSerde +} + +type AssociateAccessPolicyOutput struct { + + // The AccessPolicy and scope associated to the AccessEntry . + AssociatedAccessPolicy *types.AssociatedAccessPolicy + + // The name of your cluster. + ClusterName *string + + // The ARN of the IAM principal for the AccessEntry . + PrincipalArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateAccessPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateAccessPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateAccessPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateAccessPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpAssociateAccessPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateAccessPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateAccessPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssociateAccessPolicy", + } +} diff --git a/service/eks/api_op_AssociateEncryptionConfig.go b/service/eks/api_op_AssociateEncryptionConfig.go index 401d53cde25..51e414813af 100644 --- a/service/eks/api_op_AssociateEncryptionConfig.go +++ b/service/eks/api_op_AssociateEncryptionConfig.go @@ -12,8 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Associate encryption configuration to an existing cluster. You can use this API -// to enable encryption on existing clusters which do not have encryption already +// Associates an encryption configuration to an existing cluster. Use this API to +// enable encryption on existing clusters that don't already have encryption // enabled. This allows you to implement a defense-in-depth security strategy // without migrating applications to new Amazon EKS clusters. func (c *Client) AssociateEncryptionConfig(ctx context.Context, params *AssociateEncryptionConfigInput, optFns ...func(*Options)) (*AssociateEncryptionConfigOutput, error) { @@ -33,7 +33,7 @@ func (c *Client) AssociateEncryptionConfig(ctx context.Context, params *Associat type AssociateEncryptionConfigInput struct { - // The name of the cluster that you are associating with encryption configuration. + // The name of your cluster. // // This member is required. ClusterName *string @@ -43,7 +43,8 @@ type AssociateEncryptionConfigInput struct { // This member is required. EncryptionConfig []types.EncryptionConfig - // The client request token you are using with the encryption configuration. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string noSmithyDocumentSerde diff --git a/service/eks/api_op_AssociateIdentityProviderConfig.go b/service/eks/api_op_AssociateIdentityProviderConfig.go index bc4eaf323fe..3d0e74af2e3 100644 --- a/service/eks/api_op_AssociateIdentityProviderConfig.go +++ b/service/eks/api_op_AssociateIdentityProviderConfig.go @@ -12,12 +12,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Associate an identity provider configuration to a cluster. If you want to +// Associates an identity provider configuration to a cluster. If you want to // authenticate identities using an identity provider, you can create an identity // provider configuration and associate it to your cluster. After configuring -// authentication to your cluster you can create Kubernetes roles and clusterroles -// to assign permissions to the roles, and then bind the roles to the identities -// using Kubernetes rolebindings and clusterrolebindings . For more information see +// authentication to your cluster you can create Kubernetes Role and ClusterRole +// objects, assign permissions to them, and then bind them to the identities using +// Kubernetes RoleBinding and ClusterRoleBinding objects. For more information see // Using RBAC Authorization (https://kubernetes.io/docs/reference/access-authn-authz/rbac/) // in the Kubernetes documentation. func (c *Client) AssociateIdentityProviderConfig(ctx context.Context, params *AssociateIdentityProviderConfigInput, optFns ...func(*Options)) (*AssociateIdentityProviderConfigOutput, error) { @@ -37,7 +37,7 @@ func (c *Client) AssociateIdentityProviderConfig(ctx context.Context, params *As type AssociateIdentityProviderConfigInput struct { - // The name of the cluster to associate the configuration to. + // The name of your cluster. // // This member is required. ClusterName *string @@ -47,12 +47,13 @@ type AssociateIdentityProviderConfigInput struct { // This member is required. Oidc *types.OidcIdentityProviderConfigRequest - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string - // The metadata to apply to the configuration to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string noSmithyDocumentSerde diff --git a/service/eks/api_op_CreateAccessEntry.go b/service/eks/api_op_CreateAccessEntry.go new file mode 100644 index 00000000000..0ba7fc80dfc --- /dev/null +++ b/service/eks/api_op_CreateAccessEntry.go @@ -0,0 +1,241 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +import ( + "context" + "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/eks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an access entry. An access entry allows an IAM principal to access your +// cluster. Access entries can replace the need to maintain entries in the aws-auth +// ConfigMap for authentication. You have the following options for authorizing an +// IAM principal to access Kubernetes objects on your cluster: Kubernetes +// role-based access control (RBAC), Amazon EKS, or both. Kubernetes RBAC +// authorization requires you to create and manage Kubernetes Role , ClusterRole , +// RoleBinding , and ClusterRoleBinding objects, in addition to managing access +// entries. If you use Amazon EKS authorization exclusively, you don't need to +// create and manage Kubernetes Role , ClusterRole , RoleBinding , and +// ClusterRoleBinding objects. For more information about access entries, see +// Access entries (https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html) +// in the Amazon EKS User Guide. +func (c *Client) CreateAccessEntry(ctx context.Context, params *CreateAccessEntryInput, optFns ...func(*Options)) (*CreateAccessEntryOutput, error) { + if params == nil { + params = &CreateAccessEntryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAccessEntry", params, optFns, c.addOperationCreateAccessEntryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAccessEntryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAccessEntryInput struct { + + // The name of your cluster. + // + // This member is required. + ClusterName *string + + // The ARN of the IAM principal for the AccessEntry . You can specify one ARN for + // each access entry. You can't specify the same ARN in more than one access entry. + // This value can't be changed after access entry creation. IAM best practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp) + // recommend using IAM roles with temporary credentials, rather than IAM users with + // long-term credentials. + // + // This member is required. + PrincipalArn *string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientRequestToken *string + + // The value for name that you've specified for kind: Group as a subject in a + // Kubernetes RoleBinding or ClusterRoleBinding object. Amazon EKS doesn't confirm + // that the value for name exists in any bindings on your cluster. You can specify + // one or more names. Kubernetes authorizes the principalArn of the access entry + // to access any cluster objects that you've specified in a Kubernetes Role or + // ClusterRole object that is also specified in a binding's roleRef . For more + // information about creating Kubernetes RoleBinding , ClusterRoleBinding , Role , + // or ClusterRole objects, see Using RBAC Authorization in the Kubernetes + // documentation (https://kubernetes.io/docs/reference/access-authn-authz/rbac/) . + // If you want Amazon EKS to authorize the principalArn (instead of, or in + // addition to Kubernetes authorizing the principalArn ), you can associate one or + // more access policies to the access entry using AssociateAccessPolicy . If you + // associate any access policies, the principalARN has all permissions assigned in + // the associated access policies and all permissions in any Kubernetes Role or + // ClusterRole objects that the group names are bound to. + KubernetesGroups []string + + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. + Tags map[string]string + + // If the principalArn is for an IAM role that's used for self-managed Amazon EC2 + // nodes, specify EC2_LINUX or EC2_WINDOWS . Amazon EKS grants the necessary + // permissions to the node for you. If the principalArn is for any other purpose, + // specify STANDARD . If you don't specify a value, Amazon EKS sets the value to + // STANDARD . It's unnecessary to create access entries for IAM roles used with + // Fargate profiles or managed Amazon EC2 nodes, because Amazon EKS creates entries + // in the aws-auth ConfigMap for the roles. You can't change this value once + // you've created the access entry. If you set the value to EC2_LINUX or + // EC2_WINDOWS , you can't specify values for kubernetesGroups , or associate an + // AccessPolicy to the access entry. + Type *string + + // The username to authenticate to Kubernetes with. We recommend not specifying a + // username and letting Amazon EKS specify it for you. For more information about + // the value Amazon EKS specifies for you, or constraints before specifying your + // own username, see Creating access entries (https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html#creating-access-entries) + // in the Amazon EKS User Guide. + Username *string + + noSmithyDocumentSerde +} + +type CreateAccessEntryOutput struct { + + // An access entry allows an IAM principal (user or role) to access your cluster. + // Access entries can replace the need to maintain the aws-auth ConfigMap for + // authentication. For more information about access entries, see Access entries (https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html) + // in the Amazon EKS User Guide. + AccessEntry *types.AccessEntry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAccessEntryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAccessEntry{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAccessEntry{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAccessEntry"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateAccessEntryMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateAccessEntryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccessEntry(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateAccessEntry struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateAccessEntry) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateAccessEntryInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAccessEntryInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateAccessEntryMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAccessEntry{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateAccessEntry(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateAccessEntry", + } +} diff --git a/service/eks/api_op_CreateAddon.go b/service/eks/api_op_CreateAddon.go index a96b7231f18..95e1eb6f111 100644 --- a/service/eks/api_op_CreateAddon.go +++ b/service/eks/api_op_CreateAddon.go @@ -33,14 +33,13 @@ func (c *Client) CreateAddon(ctx context.Context, params *CreateAddonInput, optF type CreateAddonInput struct { - // The name of the add-on. The name must match one of the names that - // DescribeAddonVersions (https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html) - // returns. + // The name of the add-on. The name must match one of the names returned by + // DescribeAddonVersions . // // This member is required. AddonName *string - // The name of the cluster to create the add-on for. + // The name of your cluster. // // This member is required. ClusterName *string @@ -55,8 +54,8 @@ type CreateAddonInput struct { ClientRequestToken *string // The set of configuration values for the add-on that's created. The values that - // you provide are validated against the schema in DescribeAddonConfiguration (https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonConfiguration.html) - // . + // you provide are validated against the schema returned by + // DescribeAddonConfiguration . ConfigurationValues *string // How to resolve field value conflicts for an Amazon EKS add-on. Conflicts are @@ -89,8 +88,9 @@ type CreateAddonInput struct { // in the Amazon EKS User Guide. ServiceAccountRoleArn *string - // The metadata to apply to the cluster to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string noSmithyDocumentSerde diff --git a/service/eks/api_op_CreateCluster.go b/service/eks/api_op_CreateCluster.go index a1f91abb9e9..681eca767e8 100644 --- a/service/eks/api_op_CreateCluster.go +++ b/service/eks/api_op_CreateCluster.go @@ -83,8 +83,11 @@ type CreateClusterInput struct { // This member is required. RoleArn *string - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // The access configuration for the cluster. + AccessConfig *types.CreateAccessConfigRequest + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string // The encryption configuration for the cluster. @@ -108,8 +111,9 @@ type CreateClusterInput struct { // EKS clusters on the Amazon Web Services cloud. OutpostConfig *types.OutpostConfigRequest - // The metadata to apply to the cluster to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string // The desired Kubernetes version for your cluster. If you don't specify a value diff --git a/service/eks/api_op_CreateEksAnywhereSubscription.go b/service/eks/api_op_CreateEksAnywhereSubscription.go index 1a186a3a1d7..d464d800adc 100644 --- a/service/eks/api_op_CreateEksAnywhereSubscription.go +++ b/service/eks/api_op_CreateEksAnywhereSubscription.go @@ -56,8 +56,8 @@ type CreateEksAnywhereSubscriptionInput struct { // term. AutoRenew bool - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string // The number of licenses to purchase with the subscription. Valid values are diff --git a/service/eks/api_op_CreateFargateProfile.go b/service/eks/api_op_CreateFargateProfile.go index 11aa3e1203f..0928b099a60 100644 --- a/service/eks/api_op_CreateFargateProfile.go +++ b/service/eks/api_op_CreateFargateProfile.go @@ -34,7 +34,7 @@ import ( // original after the updated profile has finished creating. If any Fargate // profiles in a cluster are in the DELETING status, you must wait for that // Fargate profile to finish deleting before you can create any other profiles in -// that cluster. For more information, see Fargate Profile (https://docs.aws.amazon.com/eks/latest/userguide/fargate-profile.html) +// that cluster. For more information, see Fargate profile (https://docs.aws.amazon.com/eks/latest/userguide/fargate-profile.html) // in the Amazon EKS User Guide. func (c *Client) CreateFargateProfile(ctx context.Context, params *CreateFargateProfileInput, optFns ...func(*Options)) (*CreateFargateProfileOutput, error) { if params == nil { @@ -53,7 +53,7 @@ func (c *Client) CreateFargateProfile(ctx context.Context, params *CreateFargate type CreateFargateProfileInput struct { - // The name of the Amazon EKS cluster to apply the Fargate profile to. + // The name of your cluster. // // This member is required. ClusterName *string @@ -63,34 +63,34 @@ type CreateFargateProfileInput struct { // This member is required. FargateProfileName *string - // The Amazon Resource Name (ARN) of the pod execution role to use for pods that - // match the selectors in the Fargate profile. The pod execution role allows + // The Amazon Resource Name (ARN) of the Pod execution role to use for a Pod that + // matches the selectors in the Fargate profile. The Pod execution role allows // Fargate infrastructure to register with your cluster as a node, and it provides // read access to Amazon ECR image repositories. For more information, see Pod - // Execution Role (https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html) + // execution role (https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html) // in the Amazon EKS User Guide. // // This member is required. PodExecutionRoleArn *string - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string - // The selectors to match for pods to use this Fargate profile. Each selector must - // have an associated namespace. Optionally, you can also specify labels for a - // namespace. You may specify up to five selectors in a Fargate profile. + // The selectors to match for a Pod to use this Fargate profile. Each selector + // must have an associated Kubernetes namespace . Optionally, you can also specify + // labels for a namespace . You may specify up to five selectors in a Fargate + // profile. Selectors []types.FargateProfileSelector - // The IDs of subnets to launch your pods into. At this time, pods running on - // Fargate are not assigned public IP addresses, so only private subnets (with no - // direct route to an Internet Gateway) are accepted for this parameter. + // The IDs of subnets to launch a Pod into. A Pod running on Fargate isn't + // assigned a public IP address, so only private subnets (with no direct route to + // an Internet Gateway) are accepted for this parameter. Subnets []string - // The metadata to apply to the Fargate profile to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. - // Fargate profile tags do not propagate to any other resources associated with the - // Fargate profile, such as the pods that are scheduled with it. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string noSmithyDocumentSerde diff --git a/service/eks/api_op_CreateNodegroup.go b/service/eks/api_op_CreateNodegroup.go index 11a0aabe1d2..2da542a3b70 100644 --- a/service/eks/api_op_CreateNodegroup.go +++ b/service/eks/api_op_CreateNodegroup.go @@ -14,12 +14,15 @@ import ( // Creates a managed node group for an Amazon EKS cluster. You can only create a // node group for your cluster that is equal to the current Kubernetes version for -// the cluster. An Amazon EKS managed node group is an Amazon EC2 Auto Scaling -// group and associated Amazon EC2 instances that are managed by Amazon Web -// Services for an Amazon EKS cluster. For more information, see Managed node -// groups (https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html) +// the cluster. All node groups are created with the latest AMI release version for +// the respective minor Kubernetes version of the cluster, unless you deploy a +// custom AMI using a launch template. For more information about using launch +// templates, see Launch template support (https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html) +// . An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and +// associated Amazon EC2 instances that are managed by Amazon Web Services for an +// Amazon EKS cluster. For more information, see Managed node groups (https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html) // in the Amazon EKS User Guide. Windows AMI types are only supported for -// commercial Regions that support Windows Amazon EKS. +// commercial Amazon Web Services Regions that support Windows on Amazon EKS. func (c *Client) CreateNodegroup(ctx context.Context, params *CreateNodegroupInput, optFns ...func(*Options)) (*CreateNodegroupOutput, error) { if params == nil { params = &CreateNodegroupInput{} @@ -37,7 +40,7 @@ func (c *Client) CreateNodegroup(ctx context.Context, params *CreateNodegroupInp type CreateNodegroupInput struct { - // The name of the cluster to create the node group in. + // The name of your cluster. // // This member is required. ClusterName *string @@ -86,8 +89,8 @@ type CreateNodegroupInput struct { // The capacity type for your node group. CapacityType types.CapacityTypes - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string // The root device disk size (in GiB) for your node group instances. The default @@ -112,8 +115,8 @@ type CreateNodegroupInput struct { // in the Amazon EKS User Guide. InstanceTypes []string - // The Kubernetes labels to be applied to the nodes in the node group when they - // are created. + // The Kubernetes labels to apply to the nodes in the node group when they are + // created. Labels map[string]string // An object representing a node group's launch template specification. If @@ -148,10 +151,9 @@ type CreateNodegroupInput struct { // for your node group. ScalingConfig *types.NodegroupScalingConfig - // The metadata to apply to the node group to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. - // Node group tags do not propagate to any other resources associated with the node - // group, such as the Amazon EC2 instances or subnets. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string // The Kubernetes taints to be applied to the nodes in the node group. For more diff --git a/service/eks/api_op_CreatePodIdentityAssociation.go b/service/eks/api_op_CreatePodIdentityAssociation.go index f75ea8bbdb2..0e2a9c71ad5 100644 --- a/service/eks/api_op_CreatePodIdentityAssociation.go +++ b/service/eks/api_op_CreatePodIdentityAssociation.go @@ -16,14 +16,14 @@ import ( // EKS cluster and an IAM role with EKS Pod Identity. Use EKS Pod Identity to give // temporary IAM credentials to pods and the credentials are rotated automatically. // Amazon EKS Pod Identity associations provide the ability to manage credentials -// for your applications, similar to the way that 7EC2l instance profiles provide -// credentials to Amazon EC2 instances. If a pod uses a service account that has an -// association, Amazon EKS sets environment variables in the containers of the pod. -// The environment variables configure the Amazon Web Services SDKs, including the -// Command Line Interface, to use the EKS Pod Identity credentials. Pod Identity is -// a simpler method than IAM roles for service accounts, as this method doesn't use -// OIDC identity providers. Additionally, you can configure a role for Pod Identity -// once, and reuse it across clusters. +// for your applications, similar to the way that Amazon EC2 instance profiles +// provide credentials to Amazon EC2 instances. If a pod uses a service account +// that has an association, Amazon EKS sets environment variables in the containers +// of the pod. The environment variables configure the Amazon Web Services SDKs, +// including the Command Line Interface, to use the EKS Pod Identity credentials. +// Pod Identity is a simpler method than IAM roles for service accounts, as this +// method doesn't use OIDC identity providers. Additionally, you can configure a +// role for Pod Identity once, and reuse it across clusters. func (c *Client) CreatePodIdentityAssociation(ctx context.Context, params *CreatePodIdentityAssociationInput, optFns ...func(*Options)) (*CreatePodIdentityAssociationOutput, error) { if params == nil { params = &CreatePodIdentityAssociationInput{} @@ -66,13 +66,14 @@ type CreatePodIdentityAssociationInput struct { // This member is required. ServiceAccount *string - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string - // The metadata that you apply to a resource to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. - // The following basic restrictions apply to tags: + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. The following basic restrictions + // apply to tags: // - Maximum number of tags per resource – 50 // - For each resource, each tag key must be unique, and each tag key can have // only one value. diff --git a/service/eks/api_op_DeleteAccessEntry.go b/service/eks/api_op_DeleteAccessEntry.go new file mode 100644 index 00000000000..66c49c9ea0a --- /dev/null +++ b/service/eks/api_op_DeleteAccessEntry.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +import ( + "context" + "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 access entry. Deleting an access entry of a type other than Standard +// can cause your cluster to function improperly. If you delete an access entry in +// error, you can recreate it. +func (c *Client) DeleteAccessEntry(ctx context.Context, params *DeleteAccessEntryInput, optFns ...func(*Options)) (*DeleteAccessEntryOutput, error) { + if params == nil { + params = &DeleteAccessEntryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAccessEntry", params, optFns, c.addOperationDeleteAccessEntryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAccessEntryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAccessEntryInput struct { + + // The name of your cluster. + // + // This member is required. + ClusterName *string + + // The ARN of the IAM principal for the AccessEntry . + // + // This member is required. + PrincipalArn *string + + noSmithyDocumentSerde +} + +type DeleteAccessEntryOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAccessEntryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAccessEntry{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAccessEntry{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAccessEntry"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteAccessEntryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccessEntry(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAccessEntry(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAccessEntry", + } +} diff --git a/service/eks/api_op_DeleteAddon.go b/service/eks/api_op_DeleteAddon.go index 70bd5f16a4a..0686dcb876c 100644 --- a/service/eks/api_op_DeleteAddon.go +++ b/service/eks/api_op_DeleteAddon.go @@ -12,9 +12,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Delete an Amazon EKS add-on. When you remove the add-on, it will also be -// deleted from the cluster. You can always manually start an add-on on the cluster -// using the Kubernetes API. +// Deletes an Amazon EKS add-on. When you remove an add-on, it's deleted from the +// cluster. You can always manually start an add-on on the cluster using the +// Kubernetes API. func (c *Client) DeleteAddon(ctx context.Context, params *DeleteAddonInput, optFns ...func(*Options)) (*DeleteAddonOutput, error) { if params == nil { params = &DeleteAddonInput{} @@ -39,7 +39,7 @@ type DeleteAddonInput struct { // This member is required. AddonName *string - // The name of the cluster to delete the add-on from. + // The name of your cluster. // // This member is required. ClusterName *string diff --git a/service/eks/api_op_DeleteCluster.go b/service/eks/api_op_DeleteCluster.go index 690888fc0fa..598ec2ae655 100644 --- a/service/eks/api_op_DeleteCluster.go +++ b/service/eks/api_op_DeleteCluster.go @@ -12,15 +12,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the Amazon EKS cluster control plane. If you have active services in +// Deletes an Amazon EKS cluster control plane. If you have active services in // your cluster that are associated with a load balancer, you must delete those // services before deleting the cluster so that the load balancers are deleted // properly. Otherwise, you can have orphaned resources in your VPC that prevent // you from being able to delete the VPC. For more information, see Deleting a -// Cluster (https://docs.aws.amazon.com/eks/latest/userguide/delete-cluster.html) +// cluster (https://docs.aws.amazon.com/eks/latest/userguide/delete-cluster.html) // in the Amazon EKS User Guide. If you have managed node groups or Fargate // profiles attached to the cluster, you must delete them first. For more -// information, see DeleteNodegroup and DeleteFargateProfile . +// information, see DeleteNodgroup and DeleteFargateProfile . func (c *Client) DeleteCluster(ctx context.Context, params *DeleteClusterInput, optFns ...func(*Options)) (*DeleteClusterOutput, error) { if params == nil { params = &DeleteClusterInput{} diff --git a/service/eks/api_op_DeleteFargateProfile.go b/service/eks/api_op_DeleteFargateProfile.go index e474ecb03fd..d46e48ee94e 100644 --- a/service/eks/api_op_DeleteFargateProfile.go +++ b/service/eks/api_op_DeleteFargateProfile.go @@ -12,14 +12,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes an Fargate profile. When you delete a Fargate profile, any pods running -// on Fargate that were created with the profile are deleted. If those pods match -// another Fargate profile, then they are scheduled on Fargate with that profile. -// If they no longer match any Fargate profiles, then they are not scheduled on -// Fargate and they may remain in a pending state. Only one Fargate profile in a -// cluster can be in the DELETING status at a time. You must wait for a Fargate -// profile to finish deleting before you can delete any other profiles in that -// cluster. +// Deletes an Fargate profile. When you delete a Fargate profile, any Pod running +// on Fargate that was created with the profile is deleted. If the Pod matches +// another Fargate profile, then it is scheduled on Fargate with that profile. If +// it no longer matches any Fargate profiles, then it's not scheduled on Fargate +// and may remain in a pending state. Only one Fargate profile in a cluster can be +// in the DELETING status at a time. You must wait for a Fargate profile to finish +// deleting before you can delete any other profiles in that cluster. func (c *Client) DeleteFargateProfile(ctx context.Context, params *DeleteFargateProfileInput, optFns ...func(*Options)) (*DeleteFargateProfileOutput, error) { if params == nil { params = &DeleteFargateProfileInput{} @@ -37,8 +36,7 @@ func (c *Client) DeleteFargateProfile(ctx context.Context, params *DeleteFargate type DeleteFargateProfileInput struct { - // The name of the Amazon EKS cluster associated with the Fargate profile to - // delete. + // The name of your cluster. // // This member is required. ClusterName *string diff --git a/service/eks/api_op_DeleteNodegroup.go b/service/eks/api_op_DeleteNodegroup.go index 945d68cbac6..cabfc4da4fb 100644 --- a/service/eks/api_op_DeleteNodegroup.go +++ b/service/eks/api_op_DeleteNodegroup.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes an Amazon EKS node group for a cluster. +// Deletes a managed node group. func (c *Client) DeleteNodegroup(ctx context.Context, params *DeleteNodegroupInput, optFns ...func(*Options)) (*DeleteNodegroupOutput, error) { if params == nil { params = &DeleteNodegroupInput{} @@ -30,7 +30,7 @@ func (c *Client) DeleteNodegroup(ctx context.Context, params *DeleteNodegroupInp type DeleteNodegroupInput struct { - // The name of the Amazon EKS cluster that is associated with your node group. + // The name of your cluster. // // This member is required. ClusterName *string diff --git a/service/eks/api_op_DeregisterCluster.go b/service/eks/api_op_DeregisterCluster.go index bbc5ad14647..a57b6714fb4 100644 --- a/service/eks/api_op_DeregisterCluster.go +++ b/service/eks/api_op_DeregisterCluster.go @@ -13,6 +13,9 @@ import ( ) // Deregisters a connected cluster to remove it from the Amazon EKS control plane. +// A connected cluster is a Kubernetes cluster that you've connected to your +// control plane using the Amazon EKS Connector (https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.html) +// . func (c *Client) DeregisterCluster(ctx context.Context, params *DeregisterClusterInput, optFns ...func(*Options)) (*DeregisterClusterOutput, error) { if params == nil { params = &DeregisterClusterInput{} diff --git a/service/eks/api_op_DescribeAccessEntry.go b/service/eks/api_op_DescribeAccessEntry.go new file mode 100644 index 00000000000..6c36da17bf9 --- /dev/null +++ b/service/eks/api_op_DescribeAccessEntry.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +import ( + "context" + "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/eks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes an access entry. +func (c *Client) DescribeAccessEntry(ctx context.Context, params *DescribeAccessEntryInput, optFns ...func(*Options)) (*DescribeAccessEntryOutput, error) { + if params == nil { + params = &DescribeAccessEntryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAccessEntry", params, optFns, c.addOperationDescribeAccessEntryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAccessEntryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAccessEntryInput struct { + + // The name of your cluster. + // + // This member is required. + ClusterName *string + + // The ARN of the IAM principal for the AccessEntry . + // + // This member is required. + PrincipalArn *string + + noSmithyDocumentSerde +} + +type DescribeAccessEntryOutput struct { + + // Information about the access entry. + AccessEntry *types.AccessEntry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAccessEntryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAccessEntry{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAccessEntry{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAccessEntry"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeAccessEntryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccessEntry(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeAccessEntry(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeAccessEntry", + } +} diff --git a/service/eks/api_op_DescribeAddon.go b/service/eks/api_op_DescribeAddon.go index 206ec8b7b18..faaeda621ce 100644 --- a/service/eks/api_op_DescribeAddon.go +++ b/service/eks/api_op_DescribeAddon.go @@ -42,7 +42,7 @@ type DescribeAddonInput struct { // This member is required. AddonName *string - // The name of the cluster. + // The name of your cluster. // // This member is required. ClusterName *string diff --git a/service/eks/api_op_DescribeAddonConfiguration.go b/service/eks/api_op_DescribeAddonConfiguration.go index 3370369c34a..5391a318f4f 100644 --- a/service/eks/api_op_DescribeAddonConfiguration.go +++ b/service/eks/api_op_DescribeAddonConfiguration.go @@ -29,9 +29,8 @@ func (c *Client) DescribeAddonConfiguration(ctx context.Context, params *Describ type DescribeAddonConfigurationInput struct { - // The name of the add-on. The name must match one of the names that - // DescribeAddonVersions (https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html) - // returns. + // The name of the add-on. The name must match one of the names returned by + // DescribeAddonVersions . // // This member is required. AddonName *string @@ -56,8 +55,8 @@ type DescribeAddonConfigurationOutput struct { // . AddonVersion *string - // A JSON schema that's used to validate the configuration values that you provide - // when an addon is created or updated. + // A JSON schema that's used to validate the configuration values you provide when + // an add-on is created or updated. ConfigurationSchema *string // Metadata pertaining to the operation's result. diff --git a/service/eks/api_op_DescribeAddonVersions.go b/service/eks/api_op_DescribeAddonVersions.go index 8425f21c240..ea1678640eb 100644 --- a/service/eks/api_op_DescribeAddonVersions.go +++ b/service/eks/api_op_DescribeAddonVersions.go @@ -40,15 +40,20 @@ type DescribeAddonVersionsInput struct { // The Kubernetes versions that you can use the add-on with. KubernetesVersion *string - // The maximum number of results to return. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. MaxResults *int32 - // The nextToken value returned from a previous paginated - // DescribeAddonVersionsRequest where maxResults was used and the results exceeded - // the value of that parameter. Pagination continues from the end of the previous - // results that returned the nextToken value. This token should be treated as an - // opaque identifier that is used only to retrieve the next items in a list and not - // for other programmatic purposes. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string // The owner of the add-on. For valid owners , don't specify a value for this @@ -173,7 +178,12 @@ var _ DescribeAddonVersionsAPIClient = (*Client)(nil) // DescribeAddonVersionsPaginatorOptions is the paginator options for // DescribeAddonVersions type DescribeAddonVersionsPaginatorOptions struct { - // The maximum number of results to return. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/eks/api_op_DescribeCluster.go b/service/eks/api_op_DescribeCluster.go index b23912ac53a..6a97e9dc655 100644 --- a/service/eks/api_op_DescribeCluster.go +++ b/service/eks/api_op_DescribeCluster.go @@ -17,10 +17,10 @@ import ( "time" ) -// Returns descriptive information about an Amazon EKS cluster. The API server -// endpoint and certificate authority data returned by this operation are required -// for kubelet and kubectl to communicate with your Kubernetes API server. For -// more information, see Create a kubeconfig for Amazon EKS (https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html) +// Describes an Amazon EKS cluster. The API server endpoint and certificate +// authority data returned by this operation are required for kubelet and kubectl +// to communicate with your Kubernetes API server. For more information, see +// Creating or updating a kubeconfig file for an Amazon EKS cluster (https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html) // . The API server endpoint and certificate authority data aren't available until // the cluster reaches the ACTIVE state. func (c *Client) DescribeCluster(ctx context.Context, params *DescribeClusterInput, optFns ...func(*Options)) (*DescribeClusterOutput, error) { @@ -40,7 +40,7 @@ func (c *Client) DescribeCluster(ctx context.Context, params *DescribeClusterInp type DescribeClusterInput struct { - // The name of the cluster to describe. + // The name of your cluster. // // This member is required. Name *string diff --git a/service/eks/api_op_DescribeFargateProfile.go b/service/eks/api_op_DescribeFargateProfile.go index 3a07024ae04..adfb98d4e12 100644 --- a/service/eks/api_op_DescribeFargateProfile.go +++ b/service/eks/api_op_DescribeFargateProfile.go @@ -17,7 +17,7 @@ import ( "time" ) -// Returns descriptive information about an Fargate profile. +// Describes an Fargate profile. func (c *Client) DescribeFargateProfile(ctx context.Context, params *DescribeFargateProfileInput, optFns ...func(*Options)) (*DescribeFargateProfileOutput, error) { if params == nil { params = &DescribeFargateProfileInput{} @@ -35,7 +35,7 @@ func (c *Client) DescribeFargateProfile(ctx context.Context, params *DescribeFar type DescribeFargateProfileInput struct { - // The name of the Amazon EKS cluster associated with the Fargate profile. + // The name of your cluster. // // This member is required. ClusterName *string diff --git a/service/eks/api_op_DescribeIdentityProviderConfig.go b/service/eks/api_op_DescribeIdentityProviderConfig.go index 9058c2eee38..6e6a9e1ca84 100644 --- a/service/eks/api_op_DescribeIdentityProviderConfig.go +++ b/service/eks/api_op_DescribeIdentityProviderConfig.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns descriptive information about an identity provider configuration. +// Describes an identity provider configuration. func (c *Client) DescribeIdentityProviderConfig(ctx context.Context, params *DescribeIdentityProviderConfigInput, optFns ...func(*Options)) (*DescribeIdentityProviderConfigOutput, error) { if params == nil { params = &DescribeIdentityProviderConfigInput{} @@ -30,7 +30,7 @@ func (c *Client) DescribeIdentityProviderConfig(ctx context.Context, params *Des type DescribeIdentityProviderConfigInput struct { - // The cluster name that the identity provider configuration is associated to. + // The name of your cluster. // // This member is required. ClusterName *string diff --git a/service/eks/api_op_DescribeNodegroup.go b/service/eks/api_op_DescribeNodegroup.go index 0b4a4a716c7..813857b2756 100644 --- a/service/eks/api_op_DescribeNodegroup.go +++ b/service/eks/api_op_DescribeNodegroup.go @@ -17,7 +17,7 @@ import ( "time" ) -// Returns descriptive information about an Amazon EKS node group. +// Describes a managed node group. func (c *Client) DescribeNodegroup(ctx context.Context, params *DescribeNodegroupInput, optFns ...func(*Options)) (*DescribeNodegroupOutput, error) { if params == nil { params = &DescribeNodegroupInput{} @@ -35,7 +35,7 @@ func (c *Client) DescribeNodegroup(ctx context.Context, params *DescribeNodegrou type DescribeNodegroupInput struct { - // The name of the Amazon EKS cluster associated with the node group. + // The name of your cluster. // // This member is required. ClusterName *string diff --git a/service/eks/api_op_DescribeUpdate.go b/service/eks/api_op_DescribeUpdate.go index a0391640b05..f79937ad038 100644 --- a/service/eks/api_op_DescribeUpdate.go +++ b/service/eks/api_op_DescribeUpdate.go @@ -12,10 +12,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns descriptive information about an update against your Amazon EKS cluster -// or associated managed node group or Amazon EKS add-on. When the status of the -// update is Succeeded , the update is complete. If an update fails, the status is -// Failed , and an error detail explains the reason for the failure. +// Describes an update to an Amazon EKS resource. When the status of the update is +// Succeeded , the update is complete. If an update fails, the status is Failed , +// and an error detail explains the reason for the failure. func (c *Client) DescribeUpdate(ctx context.Context, params *DescribeUpdateInput, optFns ...func(*Options)) (*DescribeUpdateOutput, error) { if params == nil { params = &DescribeUpdateInput{} @@ -31,6 +30,7 @@ func (c *Client) DescribeUpdate(ctx context.Context, params *DescribeUpdateInput return out, nil } +// Describes an update request. type DescribeUpdateInput struct { // The name of the Amazon EKS cluster associated with the update. diff --git a/service/eks/api_op_DisassociateAccessPolicy.go b/service/eks/api_op_DisassociateAccessPolicy.go new file mode 100644 index 00000000000..0f823252fc5 --- /dev/null +++ b/service/eks/api_op_DisassociateAccessPolicy.go @@ -0,0 +1,143 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +import ( + "context" + "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" +) + +// Disassociates an access policy from an access entry. +func (c *Client) DisassociateAccessPolicy(ctx context.Context, params *DisassociateAccessPolicyInput, optFns ...func(*Options)) (*DisassociateAccessPolicyOutput, error) { + if params == nil { + params = &DisassociateAccessPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateAccessPolicy", params, optFns, c.addOperationDisassociateAccessPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateAccessPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateAccessPolicyInput struct { + + // The name of your cluster. + // + // This member is required. + ClusterName *string + + // The ARN of the policy to disassociate from the access entry. For a list of + // associated policies ARNs, use ListAssociatedAccessPolicies . + // + // This member is required. + PolicyArn *string + + // The ARN of the IAM principal for the AccessEntry . + // + // This member is required. + PrincipalArn *string + + noSmithyDocumentSerde +} + +type DisassociateAccessPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateAccessPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDisassociateAccessPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisassociateAccessPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateAccessPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDisassociateAccessPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateAccessPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateAccessPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisassociateAccessPolicy", + } +} diff --git a/service/eks/api_op_DisassociateIdentityProviderConfig.go b/service/eks/api_op_DisassociateIdentityProviderConfig.go index bdd4d2a6bf3..f1c9d4c542b 100644 --- a/service/eks/api_op_DisassociateIdentityProviderConfig.go +++ b/service/eks/api_op_DisassociateIdentityProviderConfig.go @@ -15,8 +15,7 @@ import ( // Disassociates an identity provider configuration from a cluster. If you // disassociate an identity provider from your cluster, users included in the // provider can no longer access the cluster. However, you can still access the -// cluster with IAM principals (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html) -// . +// cluster with IAM principals. func (c *Client) DisassociateIdentityProviderConfig(ctx context.Context, params *DisassociateIdentityProviderConfigInput, optFns ...func(*Options)) (*DisassociateIdentityProviderConfigOutput, error) { if params == nil { params = &DisassociateIdentityProviderConfigInput{} @@ -34,7 +33,7 @@ func (c *Client) DisassociateIdentityProviderConfig(ctx context.Context, params type DisassociateIdentityProviderConfigInput struct { - // The name of the cluster to disassociate an identity provider from. + // The name of your cluster. // // This member is required. ClusterName *string diff --git a/service/eks/api_op_ListAccessEntries.go b/service/eks/api_op_ListAccessEntries.go new file mode 100644 index 00000000000..35ae4cf8287 --- /dev/null +++ b/service/eks/api_op_ListAccessEntries.go @@ -0,0 +1,260 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +import ( + "context" + "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 access entries for your cluster. +func (c *Client) ListAccessEntries(ctx context.Context, params *ListAccessEntriesInput, optFns ...func(*Options)) (*ListAccessEntriesOutput, error) { + if params == nil { + params = &ListAccessEntriesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAccessEntries", params, optFns, c.addOperationListAccessEntriesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAccessEntriesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAccessEntriesInput struct { + + // The name of your cluster. + // + // This member is required. + ClusterName *string + + // The ARN of an AccessPolicy . When you specify an access policy ARN, only the + // access entries associated to that access policy are returned. For a list of + // available policy ARNs, use ListAccessPolicies . + AssociatedPolicyArn *string + + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. + MaxResults *int32 + + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAccessEntriesOutput struct { + + // The list of access entries that exist for the cluster. + AccessEntries []string + + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAccessEntriesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccessEntries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAccessEntries{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccessEntries"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpListAccessEntriesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessEntries(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListAccessEntriesAPIClient is a client that implements the ListAccessEntries +// operation. +type ListAccessEntriesAPIClient interface { + ListAccessEntries(context.Context, *ListAccessEntriesInput, ...func(*Options)) (*ListAccessEntriesOutput, error) +} + +var _ ListAccessEntriesAPIClient = (*Client)(nil) + +// ListAccessEntriesPaginatorOptions is the paginator options for ListAccessEntries +type ListAccessEntriesPaginatorOptions struct { + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAccessEntriesPaginator is a paginator for ListAccessEntries +type ListAccessEntriesPaginator struct { + options ListAccessEntriesPaginatorOptions + client ListAccessEntriesAPIClient + params *ListAccessEntriesInput + nextToken *string + firstPage bool +} + +// NewListAccessEntriesPaginator returns a new ListAccessEntriesPaginator +func NewListAccessEntriesPaginator(client ListAccessEntriesAPIClient, params *ListAccessEntriesInput, optFns ...func(*ListAccessEntriesPaginatorOptions)) *ListAccessEntriesPaginator { + if params == nil { + params = &ListAccessEntriesInput{} + } + + options := ListAccessEntriesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAccessEntriesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAccessEntriesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAccessEntries page. +func (p *ListAccessEntriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccessEntriesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListAccessEntries(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAccessEntries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAccessEntries", + } +} diff --git a/service/eks/api_op_ListAccessPolicies.go b/service/eks/api_op_ListAccessPolicies.go new file mode 100644 index 00000000000..64b8aec796e --- /dev/null +++ b/service/eks/api_op_ListAccessPolicies.go @@ -0,0 +1,251 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +import ( + "context" + "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/eks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the available access policies. +func (c *Client) ListAccessPolicies(ctx context.Context, params *ListAccessPoliciesInput, optFns ...func(*Options)) (*ListAccessPoliciesOutput, error) { + if params == nil { + params = &ListAccessPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAccessPolicies", params, optFns, c.addOperationListAccessPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAccessPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAccessPoliciesInput struct { + + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. + MaxResults *int32 + + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAccessPoliciesOutput struct { + + // The list of available access policies. You can't view the contents of an access + // policy using the API. To view the contents, see Access policy permissions (https://docs.aws.amazon.com/eks/latest/userguide/access-policies.html#access-policy-permissions) + // in the Amazon EKS User Guide. + AccessPolicies []types.AccessPolicy + + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAccessPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccessPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAccessPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccessPolicies"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessPolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListAccessPoliciesAPIClient is a client that implements the ListAccessPolicies +// operation. +type ListAccessPoliciesAPIClient interface { + ListAccessPolicies(context.Context, *ListAccessPoliciesInput, ...func(*Options)) (*ListAccessPoliciesOutput, error) +} + +var _ ListAccessPoliciesAPIClient = (*Client)(nil) + +// ListAccessPoliciesPaginatorOptions is the paginator options for +// ListAccessPolicies +type ListAccessPoliciesPaginatorOptions struct { + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAccessPoliciesPaginator is a paginator for ListAccessPolicies +type ListAccessPoliciesPaginator struct { + options ListAccessPoliciesPaginatorOptions + client ListAccessPoliciesAPIClient + params *ListAccessPoliciesInput + nextToken *string + firstPage bool +} + +// NewListAccessPoliciesPaginator returns a new ListAccessPoliciesPaginator +func NewListAccessPoliciesPaginator(client ListAccessPoliciesAPIClient, params *ListAccessPoliciesInput, optFns ...func(*ListAccessPoliciesPaginatorOptions)) *ListAccessPoliciesPaginator { + if params == nil { + params = &ListAccessPoliciesInput{} + } + + options := ListAccessPoliciesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAccessPoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAccessPoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAccessPolicies page. +func (p *ListAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccessPoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListAccessPolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAccessPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAccessPolicies", + } +} diff --git a/service/eks/api_op_ListAddons.go b/service/eks/api_op_ListAddons.go index b5d4c13e5dc..c32bb43540e 100644 --- a/service/eks/api_op_ListAddons.go +++ b/service/eks/api_op_ListAddons.go @@ -29,26 +29,25 @@ func (c *Client) ListAddons(ctx context.Context, params *ListAddonsInput, optFns type ListAddonsInput struct { - // The name of the cluster. + // The name of your cluster. // // This member is required. ClusterName *string - // The maximum number of add-on results returned by ListAddonsRequest in paginated - // output. When you use this parameter, ListAddonsRequest returns only maxResults - // results in a single page along with a nextToken response element. You can see - // the remaining results of the initial request by sending another - // ListAddonsRequest request with the returned nextToken value. This value can be - // between 1 and 100. If you don't use this parameter, ListAddonsRequest returns - // up to 100 results and a nextToken value, if applicable. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. MaxResults *int32 - // The nextToken value returned from a previous paginated ListAddonsRequest where - // maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. This token should be treated as an opaque identifier that is - // used only to retrieve the next items in a list and not for other programmatic - // purposes. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string noSmithyDocumentSerde @@ -160,13 +159,12 @@ var _ ListAddonsAPIClient = (*Client)(nil) // ListAddonsPaginatorOptions is the paginator options for ListAddons type ListAddonsPaginatorOptions struct { - // The maximum number of add-on results returned by ListAddonsRequest in paginated - // output. When you use this parameter, ListAddonsRequest returns only maxResults - // results in a single page along with a nextToken response element. You can see - // the remaining results of the initial request by sending another - // ListAddonsRequest request with the returned nextToken value. This value can be - // between 1 and 100. If you don't use this parameter, ListAddonsRequest returns - // up to 100 results and a nextToken value, if applicable. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/eks/api_op_ListAssociatedAccessPolicies.go b/service/eks/api_op_ListAssociatedAccessPolicies.go new file mode 100644 index 00000000000..9cfce14a64c --- /dev/null +++ b/service/eks/api_op_ListAssociatedAccessPolicies.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +import ( + "context" + "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/eks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the access policies associated with an access entry. +func (c *Client) ListAssociatedAccessPolicies(ctx context.Context, params *ListAssociatedAccessPoliciesInput, optFns ...func(*Options)) (*ListAssociatedAccessPoliciesOutput, error) { + if params == nil { + params = &ListAssociatedAccessPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAssociatedAccessPolicies", params, optFns, c.addOperationListAssociatedAccessPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAssociatedAccessPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAssociatedAccessPoliciesInput struct { + + // The name of your cluster. + // + // This member is required. + ClusterName *string + + // The ARN of the IAM principal for the AccessEntry . + // + // This member is required. + PrincipalArn *string + + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. + MaxResults *int32 + + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAssociatedAccessPoliciesOutput struct { + + // The list of access policies associated with the access entry. + AssociatedAccessPolicies []types.AssociatedAccessPolicy + + // The name of your cluster. + ClusterName *string + + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. + NextToken *string + + // The ARN of the IAM principal for the AccessEntry . + PrincipalArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAssociatedAccessPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAssociatedAccessPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAssociatedAccessPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAssociatedAccessPolicies"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpListAssociatedAccessPoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssociatedAccessPolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListAssociatedAccessPoliciesAPIClient is a client that implements the +// ListAssociatedAccessPolicies operation. +type ListAssociatedAccessPoliciesAPIClient interface { + ListAssociatedAccessPolicies(context.Context, *ListAssociatedAccessPoliciesInput, ...func(*Options)) (*ListAssociatedAccessPoliciesOutput, error) +} + +var _ ListAssociatedAccessPoliciesAPIClient = (*Client)(nil) + +// ListAssociatedAccessPoliciesPaginatorOptions is the paginator options for +// ListAssociatedAccessPolicies +type ListAssociatedAccessPoliciesPaginatorOptions struct { + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAssociatedAccessPoliciesPaginator is a paginator for +// ListAssociatedAccessPolicies +type ListAssociatedAccessPoliciesPaginator struct { + options ListAssociatedAccessPoliciesPaginatorOptions + client ListAssociatedAccessPoliciesAPIClient + params *ListAssociatedAccessPoliciesInput + nextToken *string + firstPage bool +} + +// NewListAssociatedAccessPoliciesPaginator returns a new +// ListAssociatedAccessPoliciesPaginator +func NewListAssociatedAccessPoliciesPaginator(client ListAssociatedAccessPoliciesAPIClient, params *ListAssociatedAccessPoliciesInput, optFns ...func(*ListAssociatedAccessPoliciesPaginatorOptions)) *ListAssociatedAccessPoliciesPaginator { + if params == nil { + params = &ListAssociatedAccessPoliciesInput{} + } + + options := ListAssociatedAccessPoliciesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAssociatedAccessPoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAssociatedAccessPoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAssociatedAccessPolicies page. +func (p *ListAssociatedAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAssociatedAccessPoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListAssociatedAccessPolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAssociatedAccessPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAssociatedAccessPolicies", + } +} diff --git a/service/eks/api_op_ListClusters.go b/service/eks/api_op_ListClusters.go index 81b373b02ed..b213c04f3fc 100644 --- a/service/eks/api_op_ListClusters.go +++ b/service/eks/api_op_ListClusters.go @@ -12,7 +12,7 @@ import ( ) // Lists the Amazon EKS clusters in your Amazon Web Services account in the -// specified Region. +// specified Amazon Web Services Region. func (c *Client) ListClusters(ctx context.Context, params *ListClustersInput, optFns ...func(*Options)) (*ListClustersOutput, error) { if params == nil { params = &ListClustersInput{} @@ -31,25 +31,25 @@ func (c *Client) ListClusters(ctx context.Context, params *ListClustersInput, op type ListClustersInput struct { // Indicates whether external clusters are included in the returned list. Use ' all - // ' to return connected clusters, or blank to return only Amazon EKS clusters. ' - // all ' must be in lowercase otherwise an error occurs. + // ' to return https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.html (https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.html) + // connected clusters, or blank to return only Amazon EKS clusters. ' all ' must be + // in lowercase otherwise an error occurs. Include []string - // The maximum number of cluster results returned by ListClusters in paginated - // output. When you use this parameter, ListClusters returns only maxResults - // results in a single page along with a nextToken response element. You can see - // the remaining results of the initial request by sending another ListClusters - // request with the returned nextToken value. This value can be between 1 and 100. - // If you don't use this parameter, ListClusters returns up to 100 results and a - // nextToken value if applicable. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. MaxResults *int32 - // The nextToken value returned from a previous paginated ListClusters request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. This token should be treated as an opaque identifier that is - // used only to retrieve the next items in a list and not for other programmatic - // purposes. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string noSmithyDocumentSerde @@ -57,13 +57,16 @@ type ListClustersInput struct { type ListClustersOutput struct { - // A list of all of the clusters for your account in the specified Region. + // A list of all of the clusters for your account in the specified Amazon Web + // Services Region. Clusters []string - // The nextToken value to include in a future ListClusters request. When the - // results of a ListClusters request exceed maxResults , you can use this value to - // retrieve the next page of results. This value is null when there are no more - // results to return. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string // Metadata pertaining to the operation's result. @@ -157,13 +160,12 @@ var _ ListClustersAPIClient = (*Client)(nil) // ListClustersPaginatorOptions is the paginator options for ListClusters type ListClustersPaginatorOptions struct { - // The maximum number of cluster results returned by ListClusters in paginated - // output. When you use this parameter, ListClusters returns only maxResults - // results in a single page along with a nextToken response element. You can see - // the remaining results of the initial request by sending another ListClusters - // request with the returned nextToken value. This value can be between 1 and 100. - // If you don't use this parameter, ListClusters returns up to 100 results and a - // nextToken value if applicable. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/eks/api_op_ListFargateProfiles.go b/service/eks/api_op_ListFargateProfiles.go index 288ad8ee0c3..6da00c17d85 100644 --- a/service/eks/api_op_ListFargateProfiles.go +++ b/service/eks/api_op_ListFargateProfiles.go @@ -12,7 +12,7 @@ import ( ) // Lists the Fargate profiles associated with the specified cluster in your Amazon -// Web Services account in the specified Region. +// Web Services account in the specified Amazon Web Services Region. func (c *Client) ListFargateProfiles(ctx context.Context, params *ListFargateProfilesInput, optFns ...func(*Options)) (*ListFargateProfilesOutput, error) { if params == nil { params = &ListFargateProfilesInput{} @@ -30,26 +30,25 @@ func (c *Client) ListFargateProfiles(ctx context.Context, params *ListFargatePro type ListFargateProfilesInput struct { - // The name of the Amazon EKS cluster that you would like to list Fargate profiles - // in. + // The name of your cluster. // // This member is required. ClusterName *string - // The maximum number of Fargate profile results returned by ListFargateProfiles - // in paginated output. When you use this parameter, ListFargateProfiles returns - // only maxResults results in a single page along with a nextToken response - // element. You can see the remaining results of the initial request by sending - // another ListFargateProfiles request with the returned nextToken value. This - // value can be between 1 and 100. If you don't use this parameter, - // ListFargateProfiles returns up to 100 results and a nextToken value if - // applicable. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. MaxResults *int32 - // The nextToken value returned from a previous paginated ListFargateProfiles - // request where maxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the nextToken value. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string noSmithyDocumentSerde @@ -60,10 +59,12 @@ type ListFargateProfilesOutput struct { // A list of all of the Fargate profiles associated with the specified cluster. FargateProfileNames []string - // The nextToken value to include in a future ListFargateProfiles request. When - // the results of a ListFargateProfiles request exceed maxResults , you can use - // this value to retrieve the next page of results. This value is null when there - // are no more results to return. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string // Metadata pertaining to the operation's result. @@ -162,14 +163,12 @@ var _ ListFargateProfilesAPIClient = (*Client)(nil) // ListFargateProfilesPaginatorOptions is the paginator options for // ListFargateProfiles type ListFargateProfilesPaginatorOptions struct { - // The maximum number of Fargate profile results returned by ListFargateProfiles - // in paginated output. When you use this parameter, ListFargateProfiles returns - // only maxResults results in a single page along with a nextToken response - // element. You can see the remaining results of the initial request by sending - // another ListFargateProfiles request with the returned nextToken value. This - // value can be between 1 and 100. If you don't use this parameter, - // ListFargateProfiles returns up to 100 results and a nextToken value if - // applicable. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/eks/api_op_ListIdentityProviderConfigs.go b/service/eks/api_op_ListIdentityProviderConfigs.go index 55acd7f7b6d..1910ec4412f 100644 --- a/service/eks/api_op_ListIdentityProviderConfigs.go +++ b/service/eks/api_op_ListIdentityProviderConfigs.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// A list of identity provider configurations. +// Lists the identity provider configurations for your cluster. func (c *Client) ListIdentityProviderConfigs(ctx context.Context, params *ListIdentityProviderConfigsInput, optFns ...func(*Options)) (*ListIdentityProviderConfigsOutput, error) { if params == nil { params = &ListIdentityProviderConfigsInput{} @@ -30,25 +30,25 @@ func (c *Client) ListIdentityProviderConfigs(ctx context.Context, params *ListId type ListIdentityProviderConfigsInput struct { - // The cluster name that you want to list identity provider configurations for. + // The name of your cluster. // // This member is required. ClusterName *string - // The maximum number of identity provider configurations returned by - // ListIdentityProviderConfigs in paginated output. When you use this parameter, - // ListIdentityProviderConfigs returns only maxResults results in a single page - // along with a nextToken response element. You can see the remaining results of - // the initial request by sending another ListIdentityProviderConfigs request with + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with // the returned nextToken value. This value can be between 1 and 100. If you don't - // use this parameter, ListIdentityProviderConfigs returns up to 100 results and a - // nextToken value, if applicable. + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. MaxResults *int32 - // The nextToken value returned from a previous paginated - // IdentityProviderConfigsRequest where maxResults was used and the results - // exceeded the value of that parameter. Pagination continues from the end of the - // previous results that returned the nextToken value. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string noSmithyDocumentSerde @@ -161,14 +161,12 @@ var _ ListIdentityProviderConfigsAPIClient = (*Client)(nil) // ListIdentityProviderConfigsPaginatorOptions is the paginator options for // ListIdentityProviderConfigs type ListIdentityProviderConfigsPaginatorOptions struct { - // The maximum number of identity provider configurations returned by - // ListIdentityProviderConfigs in paginated output. When you use this parameter, - // ListIdentityProviderConfigs returns only maxResults results in a single page - // along with a nextToken response element. You can see the remaining results of - // the initial request by sending another ListIdentityProviderConfigs request with + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with // the returned nextToken value. This value can be between 1 and 100. If you don't - // use this parameter, ListIdentityProviderConfigs returns up to 100 results and a - // nextToken value, if applicable. + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/eks/api_op_ListNodegroups.go b/service/eks/api_op_ListNodegroups.go index 5bdf95e6650..d4d793d4831 100644 --- a/service/eks/api_op_ListNodegroups.go +++ b/service/eks/api_op_ListNodegroups.go @@ -11,9 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the Amazon EKS managed node groups associated with the specified cluster -// in your Amazon Web Services account in the specified Region. Self-managed node -// groups are not listed. +// Lists the managed node groups associated with the specified cluster in your +// Amazon Web Services account in the specified Amazon Web Services Region. +// Self-managed node groups aren't listed. func (c *Client) ListNodegroups(ctx context.Context, params *ListNodegroupsInput, optFns ...func(*Options)) (*ListNodegroupsOutput, error) { if params == nil { params = &ListNodegroupsInput{} @@ -31,24 +31,25 @@ func (c *Client) ListNodegroups(ctx context.Context, params *ListNodegroupsInput type ListNodegroupsInput struct { - // The name of the Amazon EKS cluster that you would like to list node groups in. + // The name of your cluster. // // This member is required. ClusterName *string - // The maximum number of node group results returned by ListNodegroups in - // paginated output. When you use this parameter, ListNodegroups returns only - // maxResults results in a single page along with a nextToken response element. - // You can see the remaining results of the initial request by sending another - // ListNodegroups request with the returned nextToken value. This value can be - // between 1 and 100. If you don't use this parameter, ListNodegroups returns up - // to 100 results and a nextToken value if applicable. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. MaxResults *int32 - // The nextToken value returned from a previous paginated ListNodegroups request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string noSmithyDocumentSerde @@ -56,10 +57,12 @@ type ListNodegroupsInput struct { type ListNodegroupsOutput struct { - // The nextToken value to include in a future ListNodegroups request. When the - // results of a ListNodegroups request exceed maxResults , you can use this value - // to retrieve the next page of results. This value is null when there are no more - // results to return. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string // A list of all of the node groups associated with the specified cluster. @@ -160,13 +163,12 @@ var _ ListNodegroupsAPIClient = (*Client)(nil) // ListNodegroupsPaginatorOptions is the paginator options for ListNodegroups type ListNodegroupsPaginatorOptions struct { - // The maximum number of node group results returned by ListNodegroups in - // paginated output. When you use this parameter, ListNodegroups returns only - // maxResults results in a single page along with a nextToken response element. - // You can see the remaining results of the initial request by sending another - // ListNodegroups request with the returned nextToken value. This value can be - // between 1 and 100. If you don't use this parameter, ListNodegroups returns up - // to 100 results and a nextToken value if applicable. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/eks/api_op_ListTagsForResource.go b/service/eks/api_op_ListTagsForResource.go index 7700db576ef..028836e8c20 100644 --- a/service/eks/api_op_ListTagsForResource.go +++ b/service/eks/api_op_ListTagsForResource.go @@ -29,9 +29,7 @@ func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForRes type ListTagsForResourceInput struct { - // The Amazon Resource Name (ARN) that identifies the resource for which to list - // the tags. Currently, the supported resources are Amazon EKS clusters and managed - // node groups. + // The Amazon Resource Name (ARN) that identifies the resource to list tags for. // // This member is required. ResourceArn *string diff --git a/service/eks/api_op_ListUpdates.go b/service/eks/api_op_ListUpdates.go index 1ffa83f89e7..93f60a62bfc 100644 --- a/service/eks/api_op_ListUpdates.go +++ b/service/eks/api_op_ListUpdates.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the updates associated with an Amazon EKS cluster or managed node group -// in your Amazon Web Services account, in the specified Region. +// Lists the updates associated with an Amazon EKS resource in your Amazon Web +// Services account, in the specified Amazon Web Services Region. func (c *Client) ListUpdates(ctx context.Context, params *ListUpdatesInput, optFns ...func(*Options)) (*ListUpdatesOutput, error) { if params == nil { params = &ListUpdatesInput{} @@ -38,19 +38,20 @@ type ListUpdatesInput struct { // The names of the installed add-ons that have available updates. AddonName *string - // The maximum number of update results returned by ListUpdates in paginated - // output. When you use this parameter, ListUpdates returns only maxResults - // results in a single page along with a nextToken response element. You can see - // the remaining results of the initial request by sending another ListUpdates - // request with the returned nextToken value. This value can be between 1 and 100. - // If you don't use this parameter, ListUpdates returns up to 100 results and a - // nextToken value if applicable. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. MaxResults *int32 - // The nextToken value returned from a previous paginated ListUpdates request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string // The name of the Amazon EKS managed node group to list updates for. @@ -61,10 +62,12 @@ type ListUpdatesInput struct { type ListUpdatesOutput struct { - // The nextToken value to include in a future ListUpdates request. When the - // results of a ListUpdates request exceed maxResults , you can use this value to - // retrieve the next page of results. This value is null when there are no more - // results to return. + // The nextToken value returned from a previous paginated request, where maxResults + // was used and the results exceeded the value of that parameter. Pagination + // continues from the end of the previous results that returned the nextToken + // value. This value is null when there are no more results to return. This token + // should be treated as an opaque identifier that is used only to retrieve the next + // items in a list and not for other programmatic purposes. NextToken *string // A list of all the updates for the specified cluster and Region. @@ -164,13 +167,12 @@ var _ ListUpdatesAPIClient = (*Client)(nil) // ListUpdatesPaginatorOptions is the paginator options for ListUpdates type ListUpdatesPaginatorOptions struct { - // The maximum number of update results returned by ListUpdates in paginated - // output. When you use this parameter, ListUpdates returns only maxResults - // results in a single page along with a nextToken response element. You can see - // the remaining results of the initial request by sending another ListUpdates - // request with the returned nextToken value. This value can be between 1 and 100. - // If you don't use this parameter, ListUpdates returns up to 100 results and a - // nextToken value if applicable. + // The maximum number of results, returned in paginated output. You receive + // maxResults in a single page, along with a nextToken response element. You can + // see the remaining results of the initial request by sending another request with + // the returned nextToken value. This value can be between 1 and 100. If you don't + // use this parameter, 100 results and a nextToken value, if applicable, are + // returned. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/eks/api_op_RegisterCluster.go b/service/eks/api_op_RegisterCluster.go index 4d2e4221acf..ee8181d7acd 100644 --- a/service/eks/api_op_RegisterCluster.go +++ b/service/eks/api_op_RegisterCluster.go @@ -19,9 +19,9 @@ import ( // plane. Second, a Manifest (https://amazon-eks.s3.us-west-2.amazonaws.com/eks-connector/manifests/eks-connector/latest/eks-connector.yaml) // containing the activationID and activationCode must be applied to the // Kubernetes cluster through it's native provider to provide visibility. After the -// Manifest is updated and applied, then the connected cluster is visible to the -// Amazon EKS control plane. If the Manifest is not applied within three days, then -// the connected cluster will no longer be visible and must be deregistered. See +// manifest is updated and applied, the connected cluster is visible to the Amazon +// EKS control plane. If the manifest isn't applied within three days, the +// connected cluster will no longer be visible and must be deregistered using // DeregisterCluster . func (c *Client) RegisterCluster(ctx context.Context, params *RegisterClusterInput, optFns ...func(*Options)) (*RegisterClusterOutput, error) { if params == nil { @@ -46,19 +46,18 @@ type RegisterClusterInput struct { // This member is required. ConnectorConfig *types.ConnectorConfigRequest - // Define a unique name for this cluster for your Region. + // A unique name for this cluster in your Amazon Web Services Region. // // This member is required. Name *string - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string - // The metadata that you apply to the cluster to assist with categorization and - // organization. Each tag consists of a key and an optional value, both of which - // you define. Cluster tags do not propagate to any other resources associated with - // the cluster. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string noSmithyDocumentSerde diff --git a/service/eks/api_op_TagResource.go b/service/eks/api_op_TagResource.go index 500d3a59645..89ab186e2a8 100644 --- a/service/eks/api_op_TagResource.go +++ b/service/eks/api_op_TagResource.go @@ -11,13 +11,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Associates the specified tags to a resource with the specified resourceArn . If -// existing tags on a resource are not specified in the request parameters, they -// are not changed. When a resource is deleted, the tags associated with that -// resource are deleted as well. Tags that you create for Amazon EKS resources do -// not propagate to any other resources associated with the cluster. For example, -// if you tag a cluster with this operation, that tag does not automatically -// propagate to the subnets and nodes associated with the cluster. +// Associates the specified tags to an Amazon EKS resource with the specified +// resourceArn . If existing tags on a resource are not specified in the request +// parameters, they aren't changed. When a resource is deleted, the tags associated +// with that resource are also deleted. Tags that you create for Amazon EKS +// resources don't propagate to any other resources associated with the cluster. +// For example, if you tag a cluster with this operation, that tag doesn't +// automatically propagate to the subnets and nodes associated with the cluster. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} @@ -35,13 +35,14 @@ func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optF type TagResourceInput struct { - // The Amazon Resource Name (ARN) of the resource to which to add tags. Currently, - // the supported resources are Amazon EKS clusters and managed node groups. + // The Amazon Resource Name (ARN) of the resource to add tags to. // // This member is required. ResourceArn *string - // The tags to add to the resource. A tag is an array of key-value pairs. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. // // This member is required. Tags map[string]string diff --git a/service/eks/api_op_UntagResource.go b/service/eks/api_op_UntagResource.go index 86b13e29b2e..bd056041d0d 100644 --- a/service/eks/api_op_UntagResource.go +++ b/service/eks/api_op_UntagResource.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes specified tags from a resource. +// Deletes specified tags from an Amazon EKS resource. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} @@ -29,14 +29,12 @@ func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, type UntagResourceInput struct { - // The Amazon Resource Name (ARN) of the resource from which to delete tags. - // Currently, the supported resources are Amazon EKS clusters and managed node - // groups. + // The Amazon Resource Name (ARN) of the resource to delete tags from. // // This member is required. ResourceArn *string - // The keys of the tags to be removed. + // The keys of the tags to remove. // // This member is required. TagKeys []string diff --git a/service/eks/api_op_UpdateAccessEntry.go b/service/eks/api_op_UpdateAccessEntry.go new file mode 100644 index 00000000000..1f4711cc2b8 --- /dev/null +++ b/service/eks/api_op_UpdateAccessEntry.go @@ -0,0 +1,206 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +import ( + "context" + "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/eks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an access entry. +func (c *Client) UpdateAccessEntry(ctx context.Context, params *UpdateAccessEntryInput, optFns ...func(*Options)) (*UpdateAccessEntryOutput, error) { + if params == nil { + params = &UpdateAccessEntryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAccessEntry", params, optFns, c.addOperationUpdateAccessEntryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAccessEntryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAccessEntryInput struct { + + // The name of your cluster. + // + // This member is required. + ClusterName *string + + // The ARN of the IAM principal for the AccessEntry . + // + // This member is required. + PrincipalArn *string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientRequestToken *string + + // The value for name that you've specified for kind: Group as a subject in a + // Kubernetes RoleBinding or ClusterRoleBinding object. Amazon EKS doesn't confirm + // that the value for name exists in any bindings on your cluster. You can specify + // one or more names. Kubernetes authorizes the principalArn of the access entry + // to access any cluster objects that you've specified in a Kubernetes Role or + // ClusterRole object that is also specified in a binding's roleRef . For more + // information about creating Kubernetes RoleBinding , ClusterRoleBinding , Role , + // or ClusterRole objects, see Using RBAC Authorization in the Kubernetes + // documentation (https://kubernetes.io/docs/reference/access-authn-authz/rbac/) . + // If you want Amazon EKS to authorize the principalArn (instead of, or in + // addition to Kubernetes authorizing the principalArn ), you can associate one or + // more access policies to the access entry using AssociateAccessPolicy . If you + // associate any access policies, the principalARN has all permissions assigned in + // the associated access policies and all permissions in any Kubernetes Role or + // ClusterRole objects that the group names are bound to. + KubernetesGroups []string + + // The username to authenticate to Kubernetes with. We recommend not specifying a + // username and letting Amazon EKS specify it for you. For more information about + // the value Amazon EKS specifies for you, or constraints before specifying your + // own username, see Creating access entries (https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html#creating-access-entries) + // in the Amazon EKS User Guide. + Username *string + + noSmithyDocumentSerde +} + +type UpdateAccessEntryOutput struct { + + // The ARN of the IAM principal for the AccessEntry . + AccessEntry *types.AccessEntry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAccessEntryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAccessEntry{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAccessEntry{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAccessEntry"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opUpdateAccessEntryMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateAccessEntryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccessEntry(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpUpdateAccessEntry struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateAccessEntry) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*UpdateAccessEntryInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateAccessEntryInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opUpdateAccessEntryMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateAccessEntry{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateAccessEntry(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateAccessEntry", + } +} diff --git a/service/eks/api_op_UpdateAddon.go b/service/eks/api_op_UpdateAddon.go index e1b1da46eee..be5b8df1f15 100644 --- a/service/eks/api_op_UpdateAddon.go +++ b/service/eks/api_op_UpdateAddon.go @@ -37,7 +37,7 @@ type UpdateAddonInput struct { // This member is required. AddonName *string - // The name of the cluster. + // The name of your cluster. // // This member is required. ClusterName *string @@ -47,13 +47,13 @@ type UpdateAddonInput struct { // . AddonVersion *string - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string // The set of configuration values for the add-on that's created. The values that - // you provide are validated against the schema in DescribeAddonConfiguration (https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonConfiguration.html) - // . + // you provide are validated against the schema returned by + // DescribeAddonConfiguration . ConfigurationValues *string // How to resolve field value conflicts for an Amazon EKS add-on if you've changed diff --git a/service/eks/api_op_UpdateClusterConfig.go b/service/eks/api_op_UpdateClusterConfig.go index e7b097b57d4..b8fde7c75c8 100644 --- a/service/eks/api_op_UpdateClusterConfig.go +++ b/service/eks/api_op_UpdateClusterConfig.go @@ -14,11 +14,11 @@ import ( // Updates an Amazon EKS cluster configuration. Your cluster continues to function // during the update. The response output includes an update ID that you can use to -// track the status of your cluster update with the DescribeUpdate API operation. -// You can use this API operation to enable or disable exporting the Kubernetes -// control plane logs for your cluster to CloudWatch Logs. By default, cluster -// control plane logs aren't exported to CloudWatch Logs. For more information, see -// Amazon EKS Cluster Control Plane Logs (https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html) +// track the status of your cluster update with DescribeUpdate "/>. You can use +// this API operation to enable or disable exporting the Kubernetes control plane +// logs for your cluster to CloudWatch Logs. By default, cluster control plane logs +// aren't exported to CloudWatch Logs. For more information, see Amazon EKS +// Cluster control plane logs (https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html) // in the Amazon EKS User Guide . CloudWatch Logs ingestion, archive storage, and // data scanning rates apply to exported control plane logs. For more information, // see CloudWatch Pricing (http://aws.amazon.com/cloudwatch/pricing/) . You can @@ -58,8 +58,11 @@ type UpdateClusterConfigInput struct { // This member is required. Name *string - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // The access configuration for the cluster. + AccessConfig *types.UpdateAccessConfigRequest + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string // Enable or disable exporting the Kubernetes control plane logs for your cluster diff --git a/service/eks/api_op_UpdateClusterVersion.go b/service/eks/api_op_UpdateClusterVersion.go index 34c06e37c1f..566de61724e 100644 --- a/service/eks/api_op_UpdateClusterVersion.go +++ b/service/eks/api_op_UpdateClusterVersion.go @@ -49,8 +49,8 @@ type UpdateClusterVersionInput struct { // This member is required. Version *string - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string noSmithyDocumentSerde diff --git a/service/eks/api_op_UpdateNodegroupConfig.go b/service/eks/api_op_UpdateNodegroupConfig.go index ae62748fcb0..77d828f3594 100644 --- a/service/eks/api_op_UpdateNodegroupConfig.go +++ b/service/eks/api_op_UpdateNodegroupConfig.go @@ -34,7 +34,7 @@ func (c *Client) UpdateNodegroupConfig(ctx context.Context, params *UpdateNodegr type UpdateNodegroupConfigInput struct { - // The name of the Amazon EKS cluster that the managed node group resides in. + // The name of your cluster. // // This member is required. ClusterName *string @@ -44,12 +44,11 @@ type UpdateNodegroupConfigInput struct { // This member is required. NodegroupName *string - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string - // The Kubernetes labels to be applied to the nodes in the node group after the - // update. + // The Kubernetes labels to apply to the nodes in the node group after the update. Labels *types.UpdateLabelsPayload // The scaling configuration details for the Auto Scaling group after the update. diff --git a/service/eks/api_op_UpdateNodegroupVersion.go b/service/eks/api_op_UpdateNodegroupVersion.go index b5ea590da64..d8c36d6154d 100644 --- a/service/eks/api_op_UpdateNodegroupVersion.go +++ b/service/eks/api_op_UpdateNodegroupVersion.go @@ -28,10 +28,10 @@ import ( // Amazon EKS optimized Windows AMI versions (https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html) // in the Amazon EKS User Guide. You cannot roll back a node group to an earlier // Kubernetes version or AMI version. When a node in a managed node group is -// terminated due to a scaling action or update, the pods in that node are drained +// terminated due to a scaling action or update, every Pod on that node is drained // first. Amazon EKS attempts to drain the nodes gracefully and will fail if it is // unable to do so. You can force the update if Amazon EKS is unable to drain the -// nodes as a result of a pod disruption budget issue. +// nodes as a result of a Pod disruption budget issue. func (c *Client) UpdateNodegroupVersion(ctx context.Context, params *UpdateNodegroupVersionInput, optFns ...func(*Options)) (*UpdateNodegroupVersionOutput, error) { if params == nil { params = &UpdateNodegroupVersionInput{} @@ -49,8 +49,7 @@ func (c *Client) UpdateNodegroupVersion(ctx context.Context, params *UpdateNodeg type UpdateNodegroupVersionInput struct { - // The name of the Amazon EKS cluster that is associated with the managed node - // group to update. + // The name of your cluster. // // This member is required. ClusterName *string @@ -60,14 +59,14 @@ type UpdateNodegroupVersionInput struct { // This member is required. NodegroupName *string - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string - // Force the update if the existing node group's pods are unable to be drained due - // to a pod disruption budget issue. If an update fails because pods could not be + // Force the update if any Pod on the existing node group can't be drained due to + // a Pod disruption budget issue. If an update fails because all Pods can't be // drained, you can force the update after it fails to terminate the old node - // whether or not any pods are running on the node. + // whether or not any Pod is running on the node. Force bool // An object representing a node group's launch template specification. You can diff --git a/service/eks/api_op_UpdatePodIdentityAssociation.go b/service/eks/api_op_UpdatePodIdentityAssociation.go index 9f7c910f988..6e29a7555ae 100644 --- a/service/eks/api_op_UpdatePodIdentityAssociation.go +++ b/service/eks/api_op_UpdatePodIdentityAssociation.go @@ -14,7 +14,7 @@ import ( // Updates a EKS Pod Identity association. Only the IAM role can be changed; an // association can't be moved between clusters, namespaces, or service accounts. If -// you need to edit the namespace or service account, you need to remove the +// you need to edit the namespace or service account, you need to delete the // association and then create a new association with your desired settings. func (c *Client) UpdatePodIdentityAssociation(ctx context.Context, params *UpdatePodIdentityAssociationInput, optFns ...func(*Options)) (*UpdatePodIdentityAssociationOutput, error) { if params == nil { @@ -43,8 +43,8 @@ type UpdatePodIdentityAssociationInput struct { // This member is required. ClusterName *string - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string // The new IAM role to change the diff --git a/service/eks/deserializers.go b/service/eks/deserializers.go index 9c567d633cb..75505e3ddee 100644 --- a/service/eks/deserializers.go +++ b/service/eks/deserializers.go @@ -19,14 +19,14 @@ import ( "strings" ) -type awsRestjson1_deserializeOpAssociateEncryptionConfig struct { +type awsRestjson1_deserializeOpAssociateAccessPolicy struct { } -func (*awsRestjson1_deserializeOpAssociateEncryptionConfig) ID() string { +func (*awsRestjson1_deserializeOpAssociateAccessPolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAssociateEncryptionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAssociateAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -40,9 +40,9 @@ func (m *awsRestjson1_deserializeOpAssociateEncryptionConfig) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAssociateEncryptionConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAssociateAccessPolicy(response, &metadata) } - output := &AssociateEncryptionConfigOutput{} + output := &AssociateAccessPolicyOutput{} out.Result = output var buff [1024]byte @@ -63,7 +63,7 @@ func (m *awsRestjson1_deserializeOpAssociateEncryptionConfig) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentAssociateEncryptionConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAssociateAccessPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -76,7 +76,7 @@ func (m *awsRestjson1_deserializeOpAssociateEncryptionConfig) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorAssociateEncryptionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAssociateAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -117,18 +117,12 @@ func awsRestjson1_deserializeOpErrorAssociateEncryptionConfig(response *smithyht } switch { - case strings.EqualFold("ClientException", errorCode): - return awsRestjson1_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -145,7 +139,7 @@ func awsRestjson1_deserializeOpErrorAssociateEncryptionConfig(response *smithyht } } -func awsRestjson1_deserializeOpDocumentAssociateEncryptionConfigOutput(v **AssociateEncryptionConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAssociateAccessPolicyOutput(v **AssociateAccessPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -158,20 +152,38 @@ func awsRestjson1_deserializeOpDocumentAssociateEncryptionConfigOutput(v **Assoc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *AssociateEncryptionConfigOutput + var sv *AssociateAccessPolicyOutput if *v == nil { - sv = &AssociateEncryptionConfigOutput{} + sv = &AssociateAccessPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "update": - if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil { + case "associatedAccessPolicy": + if err := awsRestjson1_deserializeDocumentAssociatedAccessPolicy(&sv.AssociatedAccessPolicy, value); err != nil { return err } + case "clusterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClusterName = ptr.String(jtv) + } + + case "principalArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PrincipalArn = ptr.String(jtv) + } + default: _, _ = key, value @@ -181,14 +193,14 @@ func awsRestjson1_deserializeOpDocumentAssociateEncryptionConfigOutput(v **Assoc return nil } -type awsRestjson1_deserializeOpAssociateIdentityProviderConfig struct { +type awsRestjson1_deserializeOpAssociateEncryptionConfig struct { } -func (*awsRestjson1_deserializeOpAssociateIdentityProviderConfig) ID() string { +func (*awsRestjson1_deserializeOpAssociateEncryptionConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAssociateIdentityProviderConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAssociateEncryptionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -202,9 +214,9 @@ func (m *awsRestjson1_deserializeOpAssociateIdentityProviderConfig) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAssociateIdentityProviderConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAssociateEncryptionConfig(response, &metadata) } - output := &AssociateIdentityProviderConfigOutput{} + output := &AssociateEncryptionConfigOutput{} out.Result = output var buff [1024]byte @@ -225,7 +237,7 @@ func (m *awsRestjson1_deserializeOpAssociateIdentityProviderConfig) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentAssociateIdentityProviderConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAssociateEncryptionConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -238,7 +250,7 @@ func (m *awsRestjson1_deserializeOpAssociateIdentityProviderConfig) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorAssociateIdentityProviderConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAssociateEncryptionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -307,7 +319,7 @@ func awsRestjson1_deserializeOpErrorAssociateIdentityProviderConfig(response *sm } } -func awsRestjson1_deserializeOpDocumentAssociateIdentityProviderConfigOutput(v **AssociateIdentityProviderConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAssociateEncryptionConfigOutput(v **AssociateEncryptionConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -320,20 +332,15 @@ func awsRestjson1_deserializeOpDocumentAssociateIdentityProviderConfigOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *AssociateIdentityProviderConfigOutput + var sv *AssociateEncryptionConfigOutput if *v == nil { - sv = &AssociateIdentityProviderConfigOutput{} + sv = &AssociateEncryptionConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { - return err - } - case "update": if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil { return err @@ -348,14 +355,14 @@ func awsRestjson1_deserializeOpDocumentAssociateIdentityProviderConfigOutput(v * return nil } -type awsRestjson1_deserializeOpCreateAddon struct { +type awsRestjson1_deserializeOpAssociateIdentityProviderConfig struct { } -func (*awsRestjson1_deserializeOpCreateAddon) ID() string { +func (*awsRestjson1_deserializeOpAssociateIdentityProviderConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateAddon) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAssociateIdentityProviderConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -369,9 +376,9 @@ func (m *awsRestjson1_deserializeOpCreateAddon) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateAddon(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAssociateIdentityProviderConfig(response, &metadata) } - output := &CreateAddonOutput{} + output := &AssociateIdentityProviderConfigOutput{} out.Result = output var buff [1024]byte @@ -392,7 +399,7 @@ func (m *awsRestjson1_deserializeOpCreateAddon) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateAddonOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAssociateIdentityProviderConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -405,7 +412,7 @@ func (m *awsRestjson1_deserializeOpCreateAddon) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateAddon(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAssociateIdentityProviderConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -474,7 +481,7 @@ func awsRestjson1_deserializeOpErrorCreateAddon(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentCreateAddonOutput(v **CreateAddonOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAssociateIdentityProviderConfigOutput(v **AssociateIdentityProviderConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -487,17 +494,22 @@ func awsRestjson1_deserializeOpDocumentCreateAddonOutput(v **CreateAddonOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateAddonOutput + var sv *AssociateIdentityProviderConfigOutput if *v == nil { - sv = &CreateAddonOutput{} + sv = &AssociateIdentityProviderConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "addon": - if err := awsRestjson1_deserializeDocumentAddon(&sv.Addon, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "update": + if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil { return err } @@ -510,14 +522,14 @@ func awsRestjson1_deserializeOpDocumentCreateAddonOutput(v **CreateAddonOutput, return nil } -type awsRestjson1_deserializeOpCreateCluster struct { +type awsRestjson1_deserializeOpCreateAccessEntry struct { } -func (*awsRestjson1_deserializeOpCreateCluster) ID() string { +func (*awsRestjson1_deserializeOpCreateAccessEntry) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateAccessEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -531,9 +543,9 @@ func (m *awsRestjson1_deserializeOpCreateCluster) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateCluster(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateAccessEntry(response, &metadata) } - output := &CreateClusterOutput{} + output := &CreateAccessEntryOutput{} out.Result = output var buff [1024]byte @@ -554,7 +566,7 @@ func (m *awsRestjson1_deserializeOpCreateCluster) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateClusterOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateAccessEntryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -567,7 +579,7 @@ func (m *awsRestjson1_deserializeOpCreateCluster) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateAccessEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -608,27 +620,24 @@ func awsRestjson1_deserializeOpErrorCreateCluster(response *smithyhttp.Response, } switch { - case strings.EqualFold("ClientException", errorCode): - return awsRestjson1_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("UnsupportedAvailabilityZoneException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedAvailabilityZoneException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -639,7 +648,7 @@ func awsRestjson1_deserializeOpErrorCreateCluster(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentCreateClusterOutput(v **CreateClusterOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateAccessEntryOutput(v **CreateAccessEntryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -652,17 +661,17 @@ func awsRestjson1_deserializeOpDocumentCreateClusterOutput(v **CreateClusterOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateClusterOutput + var sv *CreateAccessEntryOutput if *v == nil { - sv = &CreateClusterOutput{} + sv = &CreateAccessEntryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "cluster": - if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil { + case "accessEntry": + if err := awsRestjson1_deserializeDocumentAccessEntry(&sv.AccessEntry, value); err != nil { return err } @@ -675,14 +684,14 @@ func awsRestjson1_deserializeOpDocumentCreateClusterOutput(v **CreateClusterOutp return nil } -type awsRestjson1_deserializeOpCreateEksAnywhereSubscription struct { +type awsRestjson1_deserializeOpCreateAddon struct { } -func (*awsRestjson1_deserializeOpCreateEksAnywhereSubscription) ID() string { +func (*awsRestjson1_deserializeOpCreateAddon) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateEksAnywhereSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateAddon) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -696,9 +705,9 @@ func (m *awsRestjson1_deserializeOpCreateEksAnywhereSubscription) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateEksAnywhereSubscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateAddon(response, &metadata) } - output := &CreateEksAnywhereSubscriptionOutput{} + output := &CreateAddonOutput{} out.Result = output var buff [1024]byte @@ -719,7 +728,7 @@ func (m *awsRestjson1_deserializeOpCreateEksAnywhereSubscription) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateEksAnywhereSubscriptionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateAddonOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -732,7 +741,7 @@ func (m *awsRestjson1_deserializeOpCreateEksAnywhereSubscription) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateEksAnywhereSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateAddon(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -779,15 +788,18 @@ func awsRestjson1_deserializeOpErrorCreateEksAnywhereSubscription(response *smit case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -798,7 +810,7 @@ func awsRestjson1_deserializeOpErrorCreateEksAnywhereSubscription(response *smit } } -func awsRestjson1_deserializeOpDocumentCreateEksAnywhereSubscriptionOutput(v **CreateEksAnywhereSubscriptionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateAddonOutput(v **CreateAddonOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -811,17 +823,17 @@ func awsRestjson1_deserializeOpDocumentCreateEksAnywhereSubscriptionOutput(v **C return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateEksAnywhereSubscriptionOutput + var sv *CreateAddonOutput if *v == nil { - sv = &CreateEksAnywhereSubscriptionOutput{} + sv = &CreateAddonOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "subscription": - if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&sv.Subscription, value); err != nil { + case "addon": + if err := awsRestjson1_deserializeDocumentAddon(&sv.Addon, value); err != nil { return err } @@ -834,14 +846,14 @@ func awsRestjson1_deserializeOpDocumentCreateEksAnywhereSubscriptionOutput(v **C return nil } -type awsRestjson1_deserializeOpCreateFargateProfile struct { +type awsRestjson1_deserializeOpCreateCluster struct { } -func (*awsRestjson1_deserializeOpCreateFargateProfile) ID() string { +func (*awsRestjson1_deserializeOpCreateCluster) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateFargateProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -855,9 +867,9 @@ func (m *awsRestjson1_deserializeOpCreateFargateProfile) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateFargateProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateCluster(response, &metadata) } - output := &CreateFargateProfileOutput{} + output := &CreateClusterOutput{} out.Result = output var buff [1024]byte @@ -878,7 +890,7 @@ func (m *awsRestjson1_deserializeOpCreateFargateProfile) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateFargateProfileOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateClusterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -891,7 +903,7 @@ func (m *awsRestjson1_deserializeOpCreateFargateProfile) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateFargateProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -938,8 +950,8 @@ func awsRestjson1_deserializeOpErrorCreateFargateProfile(response *smithyhttp.Re case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) @@ -947,6 +959,9 @@ func awsRestjson1_deserializeOpErrorCreateFargateProfile(response *smithyhttp.Re case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("UnsupportedAvailabilityZoneException", errorCode): return awsRestjson1_deserializeErrorUnsupportedAvailabilityZoneException(response, errorBody) @@ -960,7 +975,7 @@ func awsRestjson1_deserializeOpErrorCreateFargateProfile(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentCreateFargateProfileOutput(v **CreateFargateProfileOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateClusterOutput(v **CreateClusterOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -973,17 +988,17 @@ func awsRestjson1_deserializeOpDocumentCreateFargateProfileOutput(v **CreateFarg return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateFargateProfileOutput + var sv *CreateClusterOutput if *v == nil { - sv = &CreateFargateProfileOutput{} + sv = &CreateClusterOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "fargateProfile": - if err := awsRestjson1_deserializeDocumentFargateProfile(&sv.FargateProfile, value); err != nil { + case "cluster": + if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil { return err } @@ -996,14 +1011,14 @@ func awsRestjson1_deserializeOpDocumentCreateFargateProfileOutput(v **CreateFarg return nil } -type awsRestjson1_deserializeOpCreateNodegroup struct { +type awsRestjson1_deserializeOpCreateEksAnywhereSubscription struct { } -func (*awsRestjson1_deserializeOpCreateNodegroup) ID() string { +func (*awsRestjson1_deserializeOpCreateEksAnywhereSubscription) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateNodegroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateEksAnywhereSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1017,9 +1032,9 @@ func (m *awsRestjson1_deserializeOpCreateNodegroup) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateNodegroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateEksAnywhereSubscription(response, &metadata) } - output := &CreateNodegroupOutput{} + output := &CreateEksAnywhereSubscriptionOutput{} out.Result = output var buff [1024]byte @@ -1040,7 +1055,7 @@ func (m *awsRestjson1_deserializeOpCreateNodegroup) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateNodegroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateEksAnywhereSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1053,7 +1068,7 @@ func (m *awsRestjson1_deserializeOpCreateNodegroup) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateNodegroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateEksAnywhereSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1100,12 +1115,6 @@ func awsRestjson1_deserializeOpErrorCreateNodegroup(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) @@ -1125,7 +1134,7 @@ func awsRestjson1_deserializeOpErrorCreateNodegroup(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentCreateNodegroupOutput(v **CreateNodegroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateEksAnywhereSubscriptionOutput(v **CreateEksAnywhereSubscriptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1138,17 +1147,17 @@ func awsRestjson1_deserializeOpDocumentCreateNodegroupOutput(v **CreateNodegroup return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateNodegroupOutput + var sv *CreateEksAnywhereSubscriptionOutput if *v == nil { - sv = &CreateNodegroupOutput{} + sv = &CreateEksAnywhereSubscriptionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nodegroup": - if err := awsRestjson1_deserializeDocumentNodegroup(&sv.Nodegroup, value); err != nil { + case "subscription": + if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&sv.Subscription, value); err != nil { return err } @@ -1161,14 +1170,14 @@ func awsRestjson1_deserializeOpDocumentCreateNodegroupOutput(v **CreateNodegroup return nil } -type awsRestjson1_deserializeOpCreatePodIdentityAssociation struct { +type awsRestjson1_deserializeOpCreateFargateProfile struct { } -func (*awsRestjson1_deserializeOpCreatePodIdentityAssociation) ID() string { +func (*awsRestjson1_deserializeOpCreateFargateProfile) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreatePodIdentityAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateFargateProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1182,9 +1191,9 @@ func (m *awsRestjson1_deserializeOpCreatePodIdentityAssociation) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreatePodIdentityAssociation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateFargateProfile(response, &metadata) } - output := &CreatePodIdentityAssociationOutput{} + output := &CreateFargateProfileOutput{} out.Result = output var buff [1024]byte @@ -1205,7 +1214,7 @@ func (m *awsRestjson1_deserializeOpCreatePodIdentityAssociation) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreatePodIdentityAssociationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateFargateProfileOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1218,7 +1227,7 @@ func (m *awsRestjson1_deserializeOpCreatePodIdentityAssociation) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreatePodIdentityAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateFargateProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1259,24 +1268,24 @@ func awsRestjson1_deserializeOpErrorCreatePodIdentityAssociation(response *smith } switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("UnsupportedAvailabilityZoneException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedAvailabilityZoneException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1287,7 +1296,7 @@ func awsRestjson1_deserializeOpErrorCreatePodIdentityAssociation(response *smith } } -func awsRestjson1_deserializeOpDocumentCreatePodIdentityAssociationOutput(v **CreatePodIdentityAssociationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateFargateProfileOutput(v **CreateFargateProfileOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1300,17 +1309,17 @@ func awsRestjson1_deserializeOpDocumentCreatePodIdentityAssociationOutput(v **Cr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreatePodIdentityAssociationOutput + var sv *CreateFargateProfileOutput if *v == nil { - sv = &CreatePodIdentityAssociationOutput{} + sv = &CreateFargateProfileOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "association": - if err := awsRestjson1_deserializeDocumentPodIdentityAssociation(&sv.Association, value); err != nil { + case "fargateProfile": + if err := awsRestjson1_deserializeDocumentFargateProfile(&sv.FargateProfile, value); err != nil { return err } @@ -1323,14 +1332,14 @@ func awsRestjson1_deserializeOpDocumentCreatePodIdentityAssociationOutput(v **Cr return nil } -type awsRestjson1_deserializeOpDeleteAddon struct { +type awsRestjson1_deserializeOpCreateNodegroup struct { } -func (*awsRestjson1_deserializeOpDeleteAddon) ID() string { +func (*awsRestjson1_deserializeOpCreateNodegroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAddon) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateNodegroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1344,9 +1353,9 @@ func (m *awsRestjson1_deserializeOpDeleteAddon) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAddon(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateNodegroup(response, &metadata) } - output := &DeleteAddonOutput{} + output := &CreateNodegroupOutput{} out.Result = output var buff [1024]byte @@ -1367,7 +1376,7 @@ func (m *awsRestjson1_deserializeOpDeleteAddon) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteAddonOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateNodegroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1380,7 +1389,7 @@ func (m *awsRestjson1_deserializeOpDeleteAddon) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAddon(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateNodegroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1430,12 +1439,18 @@ func awsRestjson1_deserializeOpErrorDeleteAddon(response *smithyhttp.Response, m case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1446,7 +1461,7 @@ func awsRestjson1_deserializeOpErrorDeleteAddon(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentDeleteAddonOutput(v **DeleteAddonOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateNodegroupOutput(v **CreateNodegroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1459,17 +1474,17 @@ func awsRestjson1_deserializeOpDocumentDeleteAddonOutput(v **DeleteAddonOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteAddonOutput + var sv *CreateNodegroupOutput if *v == nil { - sv = &DeleteAddonOutput{} + sv = &CreateNodegroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "addon": - if err := awsRestjson1_deserializeDocumentAddon(&sv.Addon, value); err != nil { + case "nodegroup": + if err := awsRestjson1_deserializeDocumentNodegroup(&sv.Nodegroup, value); err != nil { return err } @@ -1482,14 +1497,14 @@ func awsRestjson1_deserializeOpDocumentDeleteAddonOutput(v **DeleteAddonOutput, return nil } -type awsRestjson1_deserializeOpDeleteCluster struct { +type awsRestjson1_deserializeOpCreatePodIdentityAssociation struct { } -func (*awsRestjson1_deserializeOpDeleteCluster) ID() string { +func (*awsRestjson1_deserializeOpCreatePodIdentityAssociation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreatePodIdentityAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1503,9 +1518,9 @@ func (m *awsRestjson1_deserializeOpDeleteCluster) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteCluster(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreatePodIdentityAssociation(response, &metadata) } - output := &DeleteClusterOutput{} + output := &CreatePodIdentityAssociationOutput{} out.Result = output var buff [1024]byte @@ -1526,7 +1541,7 @@ func (m *awsRestjson1_deserializeOpDeleteCluster) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteClusterOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreatePodIdentityAssociationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1539,7 +1554,7 @@ func (m *awsRestjson1_deserializeOpDeleteCluster) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreatePodIdentityAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1580,21 +1595,24 @@ func awsRestjson1_deserializeOpErrorDeleteCluster(response *smithyhttp.Response, } switch { - case strings.EqualFold("ClientException", errorCode): - return awsRestjson1_deserializeErrorClientException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1605,7 +1623,7 @@ func awsRestjson1_deserializeOpErrorDeleteCluster(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentDeleteClusterOutput(v **DeleteClusterOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreatePodIdentityAssociationOutput(v **CreatePodIdentityAssociationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1618,17 +1636,17 @@ func awsRestjson1_deserializeOpDocumentDeleteClusterOutput(v **DeleteClusterOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteClusterOutput + var sv *CreatePodIdentityAssociationOutput if *v == nil { - sv = &DeleteClusterOutput{} + sv = &CreatePodIdentityAssociationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "cluster": - if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil { + case "association": + if err := awsRestjson1_deserializeDocumentPodIdentityAssociation(&sv.Association, value); err != nil { return err } @@ -1641,14 +1659,14 @@ func awsRestjson1_deserializeOpDocumentDeleteClusterOutput(v **DeleteClusterOutp return nil } -type awsRestjson1_deserializeOpDeleteEksAnywhereSubscription struct { +type awsRestjson1_deserializeOpDeleteAccessEntry struct { } -func (*awsRestjson1_deserializeOpDeleteEksAnywhereSubscription) ID() string { +func (*awsRestjson1_deserializeOpDeleteAccessEntry) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteEksAnywhereSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteAccessEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1662,43 +1680,15 @@ func (m *awsRestjson1_deserializeOpDeleteEksAnywhereSubscription) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteEksAnywhereSubscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteAccessEntry(response, &metadata) } - output := &DeleteEksAnywhereSubscriptionOutput{} + output := &DeleteAccessEntryOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, 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 out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDeleteEksAnywhereSubscriptionOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteEksAnywhereSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteAccessEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1739,9 +1729,6 @@ func awsRestjson1_deserializeOpErrorDeleteEksAnywhereSubscription(response *smit } switch { - case strings.EqualFold("ClientException", errorCode): - return awsRestjson1_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -1761,50 +1748,14 @@ func awsRestjson1_deserializeOpErrorDeleteEksAnywhereSubscription(response *smit } } -func awsRestjson1_deserializeOpDocumentDeleteEksAnywhereSubscriptionOutput(v **DeleteEksAnywhereSubscriptionOutput, 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 *DeleteEksAnywhereSubscriptionOutput - if *v == nil { - sv = &DeleteEksAnywhereSubscriptionOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "subscription": - if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&sv.Subscription, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDeleteFargateProfile struct { +type awsRestjson1_deserializeOpDeleteAddon struct { } -func (*awsRestjson1_deserializeOpDeleteFargateProfile) ID() string { +func (*awsRestjson1_deserializeOpDeleteAddon) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteFargateProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteAddon) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1818,9 +1769,9 @@ func (m *awsRestjson1_deserializeOpDeleteFargateProfile) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteFargateProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteAddon(response, &metadata) } - output := &DeleteFargateProfileOutput{} + output := &DeleteAddonOutput{} out.Result = output var buff [1024]byte @@ -1841,7 +1792,7 @@ func (m *awsRestjson1_deserializeOpDeleteFargateProfile) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteFargateProfileOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteAddonOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1854,7 +1805,7 @@ func (m *awsRestjson1_deserializeOpDeleteFargateProfile) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteFargateProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteAddon(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1901,6 +1852,9 @@ func awsRestjson1_deserializeOpErrorDeleteFargateProfile(response *smithyhttp.Re case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -1917,7 +1871,7 @@ func awsRestjson1_deserializeOpErrorDeleteFargateProfile(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentDeleteFargateProfileOutput(v **DeleteFargateProfileOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteAddonOutput(v **DeleteAddonOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1930,17 +1884,17 @@ func awsRestjson1_deserializeOpDocumentDeleteFargateProfileOutput(v **DeleteFarg return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteFargateProfileOutput + var sv *DeleteAddonOutput if *v == nil { - sv = &DeleteFargateProfileOutput{} + sv = &DeleteAddonOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "fargateProfile": - if err := awsRestjson1_deserializeDocumentFargateProfile(&sv.FargateProfile, value); err != nil { + case "addon": + if err := awsRestjson1_deserializeDocumentAddon(&sv.Addon, value); err != nil { return err } @@ -1953,14 +1907,14 @@ func awsRestjson1_deserializeOpDocumentDeleteFargateProfileOutput(v **DeleteFarg return nil } -type awsRestjson1_deserializeOpDeleteNodegroup struct { +type awsRestjson1_deserializeOpDeleteCluster struct { } -func (*awsRestjson1_deserializeOpDeleteNodegroup) ID() string { +func (*awsRestjson1_deserializeOpDeleteCluster) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteNodegroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1974,9 +1928,9 @@ func (m *awsRestjson1_deserializeOpDeleteNodegroup) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteNodegroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteCluster(response, &metadata) } - output := &DeleteNodegroupOutput{} + output := &DeleteClusterOutput{} out.Result = output var buff [1024]byte @@ -1997,7 +1951,7 @@ func (m *awsRestjson1_deserializeOpDeleteNodegroup) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteNodegroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteClusterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2010,7 +1964,7 @@ func (m *awsRestjson1_deserializeOpDeleteNodegroup) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteNodegroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2054,9 +2008,6 @@ func awsRestjson1_deserializeOpErrorDeleteNodegroup(response *smithyhttp.Respons case strings.EqualFold("ClientException", errorCode): return awsRestjson1_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) @@ -2079,7 +2030,7 @@ func awsRestjson1_deserializeOpErrorDeleteNodegroup(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentDeleteNodegroupOutput(v **DeleteNodegroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteClusterOutput(v **DeleteClusterOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2092,17 +2043,17 @@ func awsRestjson1_deserializeOpDocumentDeleteNodegroupOutput(v **DeleteNodegroup return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteNodegroupOutput + var sv *DeleteClusterOutput if *v == nil { - sv = &DeleteNodegroupOutput{} + sv = &DeleteClusterOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nodegroup": - if err := awsRestjson1_deserializeDocumentNodegroup(&sv.Nodegroup, value); err != nil { + case "cluster": + if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil { return err } @@ -2115,14 +2066,14 @@ func awsRestjson1_deserializeOpDocumentDeleteNodegroupOutput(v **DeleteNodegroup return nil } -type awsRestjson1_deserializeOpDeletePodIdentityAssociation struct { +type awsRestjson1_deserializeOpDeleteEksAnywhereSubscription struct { } -func (*awsRestjson1_deserializeOpDeletePodIdentityAssociation) ID() string { +func (*awsRestjson1_deserializeOpDeleteEksAnywhereSubscription) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeletePodIdentityAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteEksAnywhereSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2136,9 +2087,9 @@ func (m *awsRestjson1_deserializeOpDeletePodIdentityAssociation) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeletePodIdentityAssociation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteEksAnywhereSubscription(response, &metadata) } - output := &DeletePodIdentityAssociationOutput{} + output := &DeleteEksAnywhereSubscriptionOutput{} out.Result = output var buff [1024]byte @@ -2159,7 +2110,7 @@ func (m *awsRestjson1_deserializeOpDeletePodIdentityAssociation) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeletePodIdentityAssociationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteEksAnywhereSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2172,7 +2123,7 @@ func (m *awsRestjson1_deserializeOpDeletePodIdentityAssociation) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeletePodIdentityAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteEksAnywhereSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2213,8 +2164,8 @@ func awsRestjson1_deserializeOpErrorDeletePodIdentityAssociation(response *smith } switch { - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -2235,7 +2186,7 @@ func awsRestjson1_deserializeOpErrorDeletePodIdentityAssociation(response *smith } } -func awsRestjson1_deserializeOpDocumentDeletePodIdentityAssociationOutput(v **DeletePodIdentityAssociationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteEksAnywhereSubscriptionOutput(v **DeleteEksAnywhereSubscriptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2248,17 +2199,17 @@ func awsRestjson1_deserializeOpDocumentDeletePodIdentityAssociationOutput(v **De return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeletePodIdentityAssociationOutput + var sv *DeleteEksAnywhereSubscriptionOutput if *v == nil { - sv = &DeletePodIdentityAssociationOutput{} + sv = &DeleteEksAnywhereSubscriptionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "association": - if err := awsRestjson1_deserializeDocumentPodIdentityAssociation(&sv.Association, value); err != nil { + case "subscription": + if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&sv.Subscription, value); err != nil { return err } @@ -2271,14 +2222,14 @@ func awsRestjson1_deserializeOpDocumentDeletePodIdentityAssociationOutput(v **De return nil } -type awsRestjson1_deserializeOpDeregisterCluster struct { +type awsRestjson1_deserializeOpDeleteFargateProfile struct { } -func (*awsRestjson1_deserializeOpDeregisterCluster) ID() string { +func (*awsRestjson1_deserializeOpDeleteFargateProfile) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeregisterCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteFargateProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2292,9 +2243,9 @@ func (m *awsRestjson1_deserializeOpDeregisterCluster) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeregisterCluster(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteFargateProfile(response, &metadata) } - output := &DeregisterClusterOutput{} + output := &DeleteFargateProfileOutput{} out.Result = output var buff [1024]byte @@ -2315,7 +2266,7 @@ func (m *awsRestjson1_deserializeOpDeregisterCluster) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeregisterClusterOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteFargateProfileOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2328,7 +2279,7 @@ func (m *awsRestjson1_deserializeOpDeregisterCluster) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeregisterCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteFargateProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2369,14 +2320,11 @@ func awsRestjson1_deserializeOpErrorDeregisterCluster(response *smithyhttp.Respo } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ClientException", errorCode): return awsRestjson1_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2384,9 +2332,6 @@ func awsRestjson1_deserializeOpErrorDeregisterCluster(response *smithyhttp.Respo case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2397,7 +2342,7 @@ func awsRestjson1_deserializeOpErrorDeregisterCluster(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentDeregisterClusterOutput(v **DeregisterClusterOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteFargateProfileOutput(v **DeleteFargateProfileOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2410,17 +2355,17 @@ func awsRestjson1_deserializeOpDocumentDeregisterClusterOutput(v **DeregisterClu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeregisterClusterOutput + var sv *DeleteFargateProfileOutput if *v == nil { - sv = &DeregisterClusterOutput{} + sv = &DeleteFargateProfileOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "cluster": - if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil { + case "fargateProfile": + if err := awsRestjson1_deserializeDocumentFargateProfile(&sv.FargateProfile, value); err != nil { return err } @@ -2433,14 +2378,14 @@ func awsRestjson1_deserializeOpDocumentDeregisterClusterOutput(v **DeregisterClu return nil } -type awsRestjson1_deserializeOpDescribeAddon struct { +type awsRestjson1_deserializeOpDeleteNodegroup struct { } -func (*awsRestjson1_deserializeOpDescribeAddon) ID() string { +func (*awsRestjson1_deserializeOpDeleteNodegroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAddon) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteNodegroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2454,9 +2399,9 @@ func (m *awsRestjson1_deserializeOpDescribeAddon) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAddon(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteNodegroup(response, &metadata) } - output := &DescribeAddonOutput{} + output := &DeleteNodegroupOutput{} out.Result = output var buff [1024]byte @@ -2477,7 +2422,7 @@ func (m *awsRestjson1_deserializeOpDescribeAddon) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAddonOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteNodegroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2490,7 +2435,7 @@ func (m *awsRestjson1_deserializeOpDescribeAddon) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAddon(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteNodegroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2537,8 +2482,8 @@ func awsRestjson1_deserializeOpErrorDescribeAddon(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2546,6 +2491,9 @@ func awsRestjson1_deserializeOpErrorDescribeAddon(response *smithyhttp.Response, case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2556,7 +2504,7 @@ func awsRestjson1_deserializeOpErrorDescribeAddon(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentDescribeAddonOutput(v **DescribeAddonOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteNodegroupOutput(v **DeleteNodegroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2569,17 +2517,17 @@ func awsRestjson1_deserializeOpDocumentDescribeAddonOutput(v **DescribeAddonOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAddonOutput + var sv *DeleteNodegroupOutput if *v == nil { - sv = &DescribeAddonOutput{} + sv = &DeleteNodegroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "addon": - if err := awsRestjson1_deserializeDocumentAddon(&sv.Addon, value); err != nil { + case "nodegroup": + if err := awsRestjson1_deserializeDocumentNodegroup(&sv.Nodegroup, value); err != nil { return err } @@ -2592,14 +2540,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAddonOutput(v **DescribeAddonOutp return nil } -type awsRestjson1_deserializeOpDescribeAddonConfiguration struct { +type awsRestjson1_deserializeOpDeletePodIdentityAssociation struct { } -func (*awsRestjson1_deserializeOpDescribeAddonConfiguration) ID() string { +func (*awsRestjson1_deserializeOpDeletePodIdentityAssociation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAddonConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeletePodIdentityAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2613,9 +2561,9 @@ func (m *awsRestjson1_deserializeOpDescribeAddonConfiguration) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAddonConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeletePodIdentityAssociation(response, &metadata) } - output := &DescribeAddonConfigurationOutput{} + output := &DeletePodIdentityAssociationOutput{} out.Result = output var buff [1024]byte @@ -2636,7 +2584,7 @@ func (m *awsRestjson1_deserializeOpDescribeAddonConfiguration) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAddonConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeletePodIdentityAssociationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2649,7 +2597,7 @@ func (m *awsRestjson1_deserializeOpDescribeAddonConfiguration) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAddonConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeletePodIdentityAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2693,6 +2641,9 @@ func awsRestjson1_deserializeOpErrorDescribeAddonConfiguration(response *smithyh case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2709,7 +2660,7 @@ func awsRestjson1_deserializeOpErrorDescribeAddonConfiguration(response *smithyh } } -func awsRestjson1_deserializeOpDocumentDescribeAddonConfigurationOutput(v **DescribeAddonConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeletePodIdentityAssociationOutput(v **DeletePodIdentityAssociationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2722,40 +2673,18 @@ func awsRestjson1_deserializeOpDocumentDescribeAddonConfigurationOutput(v **Desc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAddonConfigurationOutput + var sv *DeletePodIdentityAssociationOutput if *v == nil { - sv = &DescribeAddonConfigurationOutput{} + sv = &DeletePodIdentityAssociationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "addonName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AddonName = ptr.String(jtv) - } - - case "addonVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AddonVersion = ptr.String(jtv) - } - - case "configurationSchema": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ConfigurationSchema = ptr.String(jtv) + case "association": + if err := awsRestjson1_deserializeDocumentPodIdentityAssociation(&sv.Association, value); err != nil { + return err } default: @@ -2767,14 +2696,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAddonConfigurationOutput(v **Desc return nil } -type awsRestjson1_deserializeOpDescribeAddonVersions struct { +type awsRestjson1_deserializeOpDeregisterCluster struct { } -func (*awsRestjson1_deserializeOpDescribeAddonVersions) ID() string { +func (*awsRestjson1_deserializeOpDeregisterCluster) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAddonVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeregisterCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2788,9 +2717,9 @@ func (m *awsRestjson1_deserializeOpDescribeAddonVersions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAddonVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeregisterCluster(response, &metadata) } - output := &DescribeAddonVersionsOutput{} + output := &DeregisterClusterOutput{} out.Result = output var buff [1024]byte @@ -2811,7 +2740,7 @@ func (m *awsRestjson1_deserializeOpDescribeAddonVersions) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAddonVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeregisterClusterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2824,7 +2753,7 @@ func (m *awsRestjson1_deserializeOpDescribeAddonVersions) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAddonVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeregisterCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2865,8 +2794,14 @@ func awsRestjson1_deserializeOpErrorDescribeAddonVersions(response *smithyhttp.R } switch { - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2874,6 +2809,9 @@ func awsRestjson1_deserializeOpErrorDescribeAddonVersions(response *smithyhttp.R case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2884,7 +2822,7 @@ func awsRestjson1_deserializeOpErrorDescribeAddonVersions(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentDescribeAddonVersionsOutput(v **DescribeAddonVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeregisterClusterOutput(v **DeregisterClusterOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2897,29 +2835,20 @@ func awsRestjson1_deserializeOpDocumentDescribeAddonVersionsOutput(v **DescribeA return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAddonVersionsOutput + var sv *DeregisterClusterOutput if *v == nil { - sv = &DescribeAddonVersionsOutput{} + sv = &DeregisterClusterOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "addons": - if err := awsRestjson1_deserializeDocumentAddons(&sv.Addons, value); err != nil { + case "cluster": + if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil { return err } - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -2929,14 +2858,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAddonVersionsOutput(v **DescribeA return nil } -type awsRestjson1_deserializeOpDescribeCluster struct { +type awsRestjson1_deserializeOpDescribeAccessEntry struct { } -func (*awsRestjson1_deserializeOpDescribeCluster) ID() string { +func (*awsRestjson1_deserializeOpDescribeAccessEntry) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAccessEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2950,9 +2879,9 @@ func (m *awsRestjson1_deserializeOpDescribeCluster) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeCluster(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAccessEntry(response, &metadata) } - output := &DescribeClusterOutput{} + output := &DescribeAccessEntryOutput{} out.Result = output var buff [1024]byte @@ -2973,7 +2902,7 @@ func (m *awsRestjson1_deserializeOpDescribeCluster) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeClusterOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAccessEntryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2986,7 +2915,7 @@ func (m *awsRestjson1_deserializeOpDescribeCluster) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAccessEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3027,8 +2956,8 @@ func awsRestjson1_deserializeOpErrorDescribeCluster(response *smithyhttp.Respons } switch { - case strings.EqualFold("ClientException", errorCode): - return awsRestjson1_deserializeErrorClientException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -3036,9 +2965,6 @@ func awsRestjson1_deserializeOpErrorDescribeCluster(response *smithyhttp.Respons case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3049,7 +2975,7 @@ func awsRestjson1_deserializeOpErrorDescribeCluster(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentDescribeClusterOutput(v **DescribeClusterOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeAccessEntryOutput(v **DescribeAccessEntryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3062,17 +2988,17 @@ func awsRestjson1_deserializeOpDocumentDescribeClusterOutput(v **DescribeCluster return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeClusterOutput + var sv *DescribeAccessEntryOutput if *v == nil { - sv = &DescribeClusterOutput{} + sv = &DescribeAccessEntryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "cluster": - if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil { + case "accessEntry": + if err := awsRestjson1_deserializeDocumentAccessEntry(&sv.AccessEntry, value); err != nil { return err } @@ -3085,14 +3011,14 @@ func awsRestjson1_deserializeOpDocumentDescribeClusterOutput(v **DescribeCluster return nil } -type awsRestjson1_deserializeOpDescribeEksAnywhereSubscription struct { +type awsRestjson1_deserializeOpDescribeAddon struct { } -func (*awsRestjson1_deserializeOpDescribeEksAnywhereSubscription) ID() string { +func (*awsRestjson1_deserializeOpDescribeAddon) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeEksAnywhereSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAddon) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3106,9 +3032,9 @@ func (m *awsRestjson1_deserializeOpDescribeEksAnywhereSubscription) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeEksAnywhereSubscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAddon(response, &metadata) } - output := &DescribeEksAnywhereSubscriptionOutput{} + output := &DescribeAddonOutput{} out.Result = output var buff [1024]byte @@ -3129,7 +3055,7 @@ func (m *awsRestjson1_deserializeOpDescribeEksAnywhereSubscription) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeEksAnywhereSubscriptionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAddonOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3142,7 +3068,7 @@ func (m *awsRestjson1_deserializeOpDescribeEksAnywhereSubscription) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeEksAnywhereSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAddon(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3186,15 +3112,18 @@ func awsRestjson1_deserializeOpErrorDescribeEksAnywhereSubscription(response *sm case strings.EqualFold("ClientException", errorCode): return awsRestjson1_deserializeErrorClientException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3205,7 +3134,7 @@ func awsRestjson1_deserializeOpErrorDescribeEksAnywhereSubscription(response *sm } } -func awsRestjson1_deserializeOpDocumentDescribeEksAnywhereSubscriptionOutput(v **DescribeEksAnywhereSubscriptionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeAddonOutput(v **DescribeAddonOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3218,17 +3147,17 @@ func awsRestjson1_deserializeOpDocumentDescribeEksAnywhereSubscriptionOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeEksAnywhereSubscriptionOutput + var sv *DescribeAddonOutput if *v == nil { - sv = &DescribeEksAnywhereSubscriptionOutput{} + sv = &DescribeAddonOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "subscription": - if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&sv.Subscription, value); err != nil { + case "addon": + if err := awsRestjson1_deserializeDocumentAddon(&sv.Addon, value); err != nil { return err } @@ -3241,14 +3170,14 @@ func awsRestjson1_deserializeOpDocumentDescribeEksAnywhereSubscriptionOutput(v * return nil } -type awsRestjson1_deserializeOpDescribeFargateProfile struct { +type awsRestjson1_deserializeOpDescribeAddonConfiguration struct { } -func (*awsRestjson1_deserializeOpDescribeFargateProfile) ID() string { +func (*awsRestjson1_deserializeOpDescribeAddonConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFargateProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAddonConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3262,9 +3191,9 @@ func (m *awsRestjson1_deserializeOpDescribeFargateProfile) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFargateProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAddonConfiguration(response, &metadata) } - output := &DescribeFargateProfileOutput{} + output := &DescribeAddonConfigurationOutput{} out.Result = output var buff [1024]byte @@ -3285,7 +3214,7 @@ func (m *awsRestjson1_deserializeOpDescribeFargateProfile) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFargateProfileOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAddonConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3298,7 +3227,7 @@ func (m *awsRestjson1_deserializeOpDescribeFargateProfile) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFargateProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAddonConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3339,9 +3268,6 @@ func awsRestjson1_deserializeOpErrorDescribeFargateProfile(response *smithyhttp. } switch { - case strings.EqualFold("ClientException", errorCode): - return awsRestjson1_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) @@ -3361,7 +3287,7 @@ func awsRestjson1_deserializeOpErrorDescribeFargateProfile(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentDescribeFargateProfileOutput(v **DescribeFargateProfileOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeAddonConfigurationOutput(v **DescribeAddonConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3374,18 +3300,40 @@ func awsRestjson1_deserializeOpDocumentDescribeFargateProfileOutput(v **Describe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFargateProfileOutput + var sv *DescribeAddonConfigurationOutput if *v == nil { - sv = &DescribeFargateProfileOutput{} + sv = &DescribeAddonConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "fargateProfile": - if err := awsRestjson1_deserializeDocumentFargateProfile(&sv.FargateProfile, value); err != nil { - return err + case "addonName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AddonName = ptr.String(jtv) + } + + case "addonVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AddonVersion = ptr.String(jtv) + } + + case "configurationSchema": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConfigurationSchema = ptr.String(jtv) } default: @@ -3397,14 +3345,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFargateProfileOutput(v **Describe return nil } -type awsRestjson1_deserializeOpDescribeIdentityProviderConfig struct { +type awsRestjson1_deserializeOpDescribeAddonVersions struct { } -func (*awsRestjson1_deserializeOpDescribeIdentityProviderConfig) ID() string { +func (*awsRestjson1_deserializeOpDescribeAddonVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeIdentityProviderConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAddonVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3418,9 +3366,9 @@ func (m *awsRestjson1_deserializeOpDescribeIdentityProviderConfig) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeIdentityProviderConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAddonVersions(response, &metadata) } - output := &DescribeIdentityProviderConfigOutput{} + output := &DescribeAddonVersionsOutput{} out.Result = output var buff [1024]byte @@ -3441,7 +3389,7 @@ func (m *awsRestjson1_deserializeOpDescribeIdentityProviderConfig) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeIdentityProviderConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAddonVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3454,7 +3402,7 @@ func (m *awsRestjson1_deserializeOpDescribeIdentityProviderConfig) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeIdentityProviderConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAddonVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3495,9 +3443,6 @@ func awsRestjson1_deserializeOpErrorDescribeIdentityProviderConfig(response *smi } switch { - case strings.EqualFold("ClientException", errorCode): - return awsRestjson1_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) @@ -3507,9 +3452,6 @@ func awsRestjson1_deserializeOpErrorDescribeIdentityProviderConfig(response *smi case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3520,7 +3462,7 @@ func awsRestjson1_deserializeOpErrorDescribeIdentityProviderConfig(response *smi } } -func awsRestjson1_deserializeOpDocumentDescribeIdentityProviderConfigOutput(v **DescribeIdentityProviderConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeAddonVersionsOutput(v **DescribeAddonVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3533,20 +3475,29 @@ func awsRestjson1_deserializeOpDocumentDescribeIdentityProviderConfigOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeIdentityProviderConfigOutput + var sv *DescribeAddonVersionsOutput if *v == nil { - sv = &DescribeIdentityProviderConfigOutput{} + sv = &DescribeAddonVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "identityProviderConfig": - if err := awsRestjson1_deserializeDocumentIdentityProviderConfigResponse(&sv.IdentityProviderConfig, value); err != nil { + case "addons": + if err := awsRestjson1_deserializeDocumentAddons(&sv.Addons, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -3556,14 +3507,14 @@ func awsRestjson1_deserializeOpDocumentDescribeIdentityProviderConfigOutput(v ** return nil } -type awsRestjson1_deserializeOpDescribeNodegroup struct { +type awsRestjson1_deserializeOpDescribeCluster struct { } -func (*awsRestjson1_deserializeOpDescribeNodegroup) ID() string { +func (*awsRestjson1_deserializeOpDescribeCluster) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeNodegroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3577,9 +3528,9 @@ func (m *awsRestjson1_deserializeOpDescribeNodegroup) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeNodegroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeCluster(response, &metadata) } - output := &DescribeNodegroupOutput{} + output := &DescribeClusterOutput{} out.Result = output var buff [1024]byte @@ -3600,7 +3551,7 @@ func (m *awsRestjson1_deserializeOpDescribeNodegroup) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeNodegroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeClusterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3613,7 +3564,7 @@ func (m *awsRestjson1_deserializeOpDescribeNodegroup) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeNodegroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3657,9 +3608,6 @@ func awsRestjson1_deserializeOpErrorDescribeNodegroup(response *smithyhttp.Respo case strings.EqualFold("ClientException", errorCode): return awsRestjson1_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -3679,7 +3627,7 @@ func awsRestjson1_deserializeOpErrorDescribeNodegroup(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentDescribeNodegroupOutput(v **DescribeNodegroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeClusterOutput(v **DescribeClusterOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3692,17 +3640,17 @@ func awsRestjson1_deserializeOpDocumentDescribeNodegroupOutput(v **DescribeNodeg return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeNodegroupOutput + var sv *DescribeClusterOutput if *v == nil { - sv = &DescribeNodegroupOutput{} + sv = &DescribeClusterOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nodegroup": - if err := awsRestjson1_deserializeDocumentNodegroup(&sv.Nodegroup, value); err != nil { + case "cluster": + if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil { return err } @@ -3715,14 +3663,14 @@ func awsRestjson1_deserializeOpDocumentDescribeNodegroupOutput(v **DescribeNodeg return nil } -type awsRestjson1_deserializeOpDescribePodIdentityAssociation struct { +type awsRestjson1_deserializeOpDescribeEksAnywhereSubscription struct { } -func (*awsRestjson1_deserializeOpDescribePodIdentityAssociation) ID() string { +func (*awsRestjson1_deserializeOpDescribeEksAnywhereSubscription) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribePodIdentityAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeEksAnywhereSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3736,9 +3684,9 @@ func (m *awsRestjson1_deserializeOpDescribePodIdentityAssociation) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribePodIdentityAssociation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeEksAnywhereSubscription(response, &metadata) } - output := &DescribePodIdentityAssociationOutput{} + output := &DescribeEksAnywhereSubscriptionOutput{} out.Result = output var buff [1024]byte @@ -3759,7 +3707,7 @@ func (m *awsRestjson1_deserializeOpDescribePodIdentityAssociation) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribePodIdentityAssociationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeEksAnywhereSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3772,7 +3720,7 @@ func (m *awsRestjson1_deserializeOpDescribePodIdentityAssociation) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribePodIdentityAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeEksAnywhereSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3813,11 +3761,8 @@ func awsRestjson1_deserializeOpErrorDescribePodIdentityAssociation(response *smi } switch { - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -3825,6 +3770,9 @@ func awsRestjson1_deserializeOpErrorDescribePodIdentityAssociation(response *smi case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3835,7 +3783,7 @@ func awsRestjson1_deserializeOpErrorDescribePodIdentityAssociation(response *smi } } -func awsRestjson1_deserializeOpDocumentDescribePodIdentityAssociationOutput(v **DescribePodIdentityAssociationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeEksAnywhereSubscriptionOutput(v **DescribeEksAnywhereSubscriptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3848,17 +3796,17 @@ func awsRestjson1_deserializeOpDocumentDescribePodIdentityAssociationOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribePodIdentityAssociationOutput + var sv *DescribeEksAnywhereSubscriptionOutput if *v == nil { - sv = &DescribePodIdentityAssociationOutput{} + sv = &DescribeEksAnywhereSubscriptionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "association": - if err := awsRestjson1_deserializeDocumentPodIdentityAssociation(&sv.Association, value); err != nil { + case "subscription": + if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&sv.Subscription, value); err != nil { return err } @@ -3871,14 +3819,14 @@ func awsRestjson1_deserializeOpDocumentDescribePodIdentityAssociationOutput(v ** return nil } -type awsRestjson1_deserializeOpDescribeUpdate struct { +type awsRestjson1_deserializeOpDescribeFargateProfile struct { } -func (*awsRestjson1_deserializeOpDescribeUpdate) ID() string { +func (*awsRestjson1_deserializeOpDescribeFargateProfile) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeUpdate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFargateProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3892,9 +3840,9 @@ func (m *awsRestjson1_deserializeOpDescribeUpdate) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeUpdate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFargateProfile(response, &metadata) } - output := &DescribeUpdateOutput{} + output := &DescribeFargateProfileOutput{} out.Result = output var buff [1024]byte @@ -3915,7 +3863,7 @@ func (m *awsRestjson1_deserializeOpDescribeUpdate) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeUpdateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeFargateProfileOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3928,7 +3876,7 @@ func (m *awsRestjson1_deserializeOpDescribeUpdate) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeUpdate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeFargateProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3991,7 +3939,7 @@ func awsRestjson1_deserializeOpErrorDescribeUpdate(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentDescribeUpdateOutput(v **DescribeUpdateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFargateProfileOutput(v **DescribeFargateProfileOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4004,17 +3952,17 @@ func awsRestjson1_deserializeOpDocumentDescribeUpdateOutput(v **DescribeUpdateOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeUpdateOutput + var sv *DescribeFargateProfileOutput if *v == nil { - sv = &DescribeUpdateOutput{} + sv = &DescribeFargateProfileOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "update": - if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil { + case "fargateProfile": + if err := awsRestjson1_deserializeDocumentFargateProfile(&sv.FargateProfile, value); err != nil { return err } @@ -4027,14 +3975,14 @@ func awsRestjson1_deserializeOpDocumentDescribeUpdateOutput(v **DescribeUpdateOu return nil } -type awsRestjson1_deserializeOpDisassociateIdentityProviderConfig struct { +type awsRestjson1_deserializeOpDescribeIdentityProviderConfig struct { } -func (*awsRestjson1_deserializeOpDisassociateIdentityProviderConfig) ID() string { +func (*awsRestjson1_deserializeOpDescribeIdentityProviderConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateIdentityProviderConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeIdentityProviderConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4048,9 +3996,9 @@ func (m *awsRestjson1_deserializeOpDisassociateIdentityProviderConfig) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateIdentityProviderConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeIdentityProviderConfig(response, &metadata) } - output := &DisassociateIdentityProviderConfigOutput{} + output := &DescribeIdentityProviderConfigOutput{} out.Result = output var buff [1024]byte @@ -4071,7 +4019,7 @@ func (m *awsRestjson1_deserializeOpDisassociateIdentityProviderConfig) HandleDes return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisassociateIdentityProviderConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeIdentityProviderConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4084,7 +4032,7 @@ func (m *awsRestjson1_deserializeOpDisassociateIdentityProviderConfig) HandleDes return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateIdentityProviderConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeIdentityProviderConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4131,18 +4079,15 @@ func awsRestjson1_deserializeOpErrorDisassociateIdentityProviderConfig(response case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4153,7 +4098,7 @@ func awsRestjson1_deserializeOpErrorDisassociateIdentityProviderConfig(response } } -func awsRestjson1_deserializeOpDocumentDisassociateIdentityProviderConfigOutput(v **DisassociateIdentityProviderConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeIdentityProviderConfigOutput(v **DescribeIdentityProviderConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4166,17 +4111,17 @@ func awsRestjson1_deserializeOpDocumentDisassociateIdentityProviderConfigOutput( return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisassociateIdentityProviderConfigOutput + var sv *DescribeIdentityProviderConfigOutput if *v == nil { - sv = &DisassociateIdentityProviderConfigOutput{} + sv = &DescribeIdentityProviderConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "update": - if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil { + case "identityProviderConfig": + if err := awsRestjson1_deserializeDocumentIdentityProviderConfigResponse(&sv.IdentityProviderConfig, value); err != nil { return err } @@ -4189,14 +4134,14 @@ func awsRestjson1_deserializeOpDocumentDisassociateIdentityProviderConfigOutput( return nil } -type awsRestjson1_deserializeOpListAddons struct { +type awsRestjson1_deserializeOpDescribeNodegroup struct { } -func (*awsRestjson1_deserializeOpListAddons) ID() string { +func (*awsRestjson1_deserializeOpDescribeNodegroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAddons) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeNodegroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4210,9 +4155,9 @@ func (m *awsRestjson1_deserializeOpListAddons) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAddons(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeNodegroup(response, &metadata) } - output := &ListAddonsOutput{} + output := &DescribeNodegroupOutput{} out.Result = output var buff [1024]byte @@ -4233,7 +4178,7 @@ func (m *awsRestjson1_deserializeOpListAddons) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAddonsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeNodegroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4246,7 +4191,7 @@ func (m *awsRestjson1_deserializeOpListAddons) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAddons(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeNodegroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4293,15 +4238,15 @@ func awsRestjson1_deserializeOpErrorListAddons(response *smithyhttp.Response, me case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4312,7 +4257,7 @@ func awsRestjson1_deserializeOpErrorListAddons(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentListAddonsOutput(v **ListAddonsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeNodegroupOutput(v **DescribeNodegroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4325,29 +4270,20 @@ func awsRestjson1_deserializeOpDocumentListAddonsOutput(v **ListAddonsOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAddonsOutput + var sv *DescribeNodegroupOutput if *v == nil { - sv = &ListAddonsOutput{} + sv = &DescribeNodegroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "addons": - if err := awsRestjson1_deserializeDocumentStringList(&sv.Addons, value); err != nil { + case "nodegroup": + if err := awsRestjson1_deserializeDocumentNodegroup(&sv.Nodegroup, value); err != nil { return err } - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -4357,14 +4293,14 @@ func awsRestjson1_deserializeOpDocumentListAddonsOutput(v **ListAddonsOutput, va return nil } -type awsRestjson1_deserializeOpListClusters struct { +type awsRestjson1_deserializeOpDescribePodIdentityAssociation struct { } -func (*awsRestjson1_deserializeOpListClusters) ID() string { +func (*awsRestjson1_deserializeOpDescribePodIdentityAssociation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListClusters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribePodIdentityAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4378,9 +4314,9 @@ func (m *awsRestjson1_deserializeOpListClusters) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListClusters(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribePodIdentityAssociation(response, &metadata) } - output := &ListClustersOutput{} + output := &DescribePodIdentityAssociationOutput{} out.Result = output var buff [1024]byte @@ -4401,7 +4337,7 @@ func (m *awsRestjson1_deserializeOpListClusters) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListClustersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribePodIdentityAssociationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4414,7 +4350,7 @@ func (m *awsRestjson1_deserializeOpListClusters) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListClusters(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribePodIdentityAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4455,18 +4391,18 @@ func awsRestjson1_deserializeOpErrorListClusters(response *smithyhttp.Response, } switch { - case strings.EqualFold("ClientException", errorCode): - return awsRestjson1_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4477,7 +4413,7 @@ func awsRestjson1_deserializeOpErrorListClusters(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListClustersOutput(v **ListClustersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribePodIdentityAssociationOutput(v **DescribePodIdentityAssociationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4490,29 +4426,20 @@ func awsRestjson1_deserializeOpDocumentListClustersOutput(v **ListClustersOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListClustersOutput + var sv *DescribePodIdentityAssociationOutput if *v == nil { - sv = &ListClustersOutput{} + sv = &DescribePodIdentityAssociationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "clusters": - if err := awsRestjson1_deserializeDocumentStringList(&sv.Clusters, value); err != nil { + case "association": + if err := awsRestjson1_deserializeDocumentPodIdentityAssociation(&sv.Association, value); err != nil { return err } - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -4522,14 +4449,14 @@ func awsRestjson1_deserializeOpDocumentListClustersOutput(v **ListClustersOutput return nil } -type awsRestjson1_deserializeOpListEksAnywhereSubscriptions struct { +type awsRestjson1_deserializeOpDescribeUpdate struct { } -func (*awsRestjson1_deserializeOpListEksAnywhereSubscriptions) ID() string { +func (*awsRestjson1_deserializeOpDescribeUpdate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEksAnywhereSubscriptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeUpdate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4543,9 +4470,9 @@ func (m *awsRestjson1_deserializeOpListEksAnywhereSubscriptions) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEksAnywhereSubscriptions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeUpdate(response, &metadata) } - output := &ListEksAnywhereSubscriptionsOutput{} + output := &DescribeUpdateOutput{} out.Result = output var buff [1024]byte @@ -4566,7 +4493,7 @@ func (m *awsRestjson1_deserializeOpListEksAnywhereSubscriptions) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEksAnywhereSubscriptionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeUpdateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4579,7 +4506,7 @@ func (m *awsRestjson1_deserializeOpListEksAnywhereSubscriptions) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEksAnywhereSubscriptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeUpdate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4626,12 +4553,12 @@ func awsRestjson1_deserializeOpErrorListEksAnywhereSubscriptions(response *smith case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4642,7 +4569,7 @@ func awsRestjson1_deserializeOpErrorListEksAnywhereSubscriptions(response *smith } } -func awsRestjson1_deserializeOpDocumentListEksAnywhereSubscriptionsOutput(v **ListEksAnywhereSubscriptionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeUpdateOutput(v **DescribeUpdateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4655,26 +4582,17 @@ func awsRestjson1_deserializeOpDocumentListEksAnywhereSubscriptionsOutput(v **Li return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEksAnywhereSubscriptionsOutput + var sv *DescribeUpdateOutput if *v == nil { - sv = &ListEksAnywhereSubscriptionsOutput{} + sv = &DescribeUpdateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "subscriptions": - if err := awsRestjson1_deserializeDocumentEksAnywhereSubscriptionList(&sv.Subscriptions, value); err != nil { + case "update": + if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil { return err } @@ -4687,14 +4605,14 @@ func awsRestjson1_deserializeOpDocumentListEksAnywhereSubscriptionsOutput(v **Li return nil } -type awsRestjson1_deserializeOpListFargateProfiles struct { +type awsRestjson1_deserializeOpDisassociateAccessPolicy struct { } -func (*awsRestjson1_deserializeOpListFargateProfiles) ID() string { +func (*awsRestjson1_deserializeOpDisassociateAccessPolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFargateProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4708,7 +4626,1257 @@ func (m *awsRestjson1_deserializeOpListFargateProfiles) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFargateProfiles(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateAccessPolicy(response, &metadata) + } + output := &DisassociateAccessPolicyOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisassociateAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDisassociateIdentityProviderConfig struct { +} + +func (*awsRestjson1_deserializeOpDisassociateIdentityProviderConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisassociateIdentityProviderConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateIdentityProviderConfig(response, &metadata) + } + output := &DisassociateIdentityProviderConfigOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDisassociateIdentityProviderConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisassociateIdentityProviderConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDisassociateIdentityProviderConfigOutput(v **DisassociateIdentityProviderConfigOutput, 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 *DisassociateIdentityProviderConfigOutput + if *v == nil { + sv = &DisassociateIdentityProviderConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "update": + if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAccessEntries struct { +} + +func (*awsRestjson1_deserializeOpListAccessEntries) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAccessEntries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListAccessEntries(response, &metadata) + } + output := &ListAccessEntriesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListAccessEntriesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAccessEntries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAccessEntriesOutput(v **ListAccessEntriesOutput, 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 *ListAccessEntriesOutput + if *v == nil { + sv = &ListAccessEntriesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessEntries": + if err := awsRestjson1_deserializeDocumentStringList(&sv.AccessEntries, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAccessPolicies struct { +} + +func (*awsRestjson1_deserializeOpListAccessPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAccessPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListAccessPolicies(response, &metadata) + } + output := &ListAccessPoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListAccessPoliciesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAccessPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAccessPoliciesOutput(v **ListAccessPoliciesOutput, 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 *ListAccessPoliciesOutput + if *v == nil { + sv = &ListAccessPoliciesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessPolicies": + if err := awsRestjson1_deserializeDocumentAccessPoliciesList(&sv.AccessPolicies, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAddons struct { +} + +func (*awsRestjson1_deserializeOpListAddons) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAddons) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListAddons(response, &metadata) + } + output := &ListAddonsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListAddonsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAddons(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAddonsOutput(v **ListAddonsOutput, 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 *ListAddonsOutput + if *v == nil { + sv = &ListAddonsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "addons": + if err := awsRestjson1_deserializeDocumentStringList(&sv.Addons, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAssociatedAccessPolicies struct { +} + +func (*awsRestjson1_deserializeOpListAssociatedAccessPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAssociatedAccessPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListAssociatedAccessPolicies(response, &metadata) + } + output := &ListAssociatedAccessPoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListAssociatedAccessPoliciesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAssociatedAccessPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAssociatedAccessPoliciesOutput(v **ListAssociatedAccessPoliciesOutput, 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 *ListAssociatedAccessPoliciesOutput + if *v == nil { + sv = &ListAssociatedAccessPoliciesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "associatedAccessPolicies": + if err := awsRestjson1_deserializeDocumentAssociatedAccessPoliciesList(&sv.AssociatedAccessPolicies, value); err != nil { + return err + } + + case "clusterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClusterName = ptr.String(jtv) + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "principalArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PrincipalArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListClusters struct { +} + +func (*awsRestjson1_deserializeOpListClusters) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListClusters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListClusters(response, &metadata) + } + output := &ListClustersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListClustersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListClusters(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListClustersOutput(v **ListClustersOutput, 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 *ListClustersOutput + if *v == nil { + sv = &ListClustersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clusters": + if err := awsRestjson1_deserializeDocumentStringList(&sv.Clusters, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListEksAnywhereSubscriptions struct { +} + +func (*awsRestjson1_deserializeOpListEksAnywhereSubscriptions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListEksAnywhereSubscriptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListEksAnywhereSubscriptions(response, &metadata) + } + output := &ListEksAnywhereSubscriptionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListEksAnywhereSubscriptionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListEksAnywhereSubscriptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListEksAnywhereSubscriptionsOutput(v **ListEksAnywhereSubscriptionsOutput, 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 *ListEksAnywhereSubscriptionsOutput + if *v == nil { + sv = &ListEksAnywhereSubscriptionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "subscriptions": + if err := awsRestjson1_deserializeDocumentEksAnywhereSubscriptionList(&sv.Subscriptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListFargateProfiles struct { +} + +func (*awsRestjson1_deserializeOpListFargateProfiles) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListFargateProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListFargateProfiles(response, &metadata) } output := &ListFargateProfilesOutput{} out.Result = output @@ -6008,6 +7176,162 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } +type awsRestjson1_deserializeOpUpdateAccessEntry struct { +} + +func (*awsRestjson1_deserializeOpUpdateAccessEntry) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateAccessEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccessEntry(response, &metadata) + } + output := &UpdateAccessEntryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateAccessEntryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateAccessEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateAccessEntryOutput(v **UpdateAccessEntryOutput, 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 *UpdateAccessEntryOutput + if *v == nil { + sv = &UpdateAccessEntryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessEntry": + if err := awsRestjson1_deserializeDocumentAccessEntry(&sv.AccessEntry, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpUpdateAddon struct { } @@ -7512,96 +8836,386 @@ func awsRestjson1_deserializeErrorServerException(response *smithyhttp.Response, return err } - err := awsRestjson1_deserializeDocumentServerException(&output, shape) + err := awsRestjson1_deserializeDocumentServerException(&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_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceUnavailableException{} + 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_deserializeDocumentServiceUnavailableException(&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_deserializeErrorUnsupportedAvailabilityZoneException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnsupportedAvailabilityZoneException{} + 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_deserializeDocumentUnsupportedAvailabilityZoneException(&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_deserializeDocumentAccessConfigResponse(v **types.AccessConfigResponse, 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.AccessConfigResponse + if *v == nil { + sv = &types.AccessConfigResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "authenticationMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AuthenticationMode to be of type string, got %T instead", value) + } + sv.AuthenticationMode = types.AuthenticationMode(jtv) + } + + case "bootstrapClusterCreatorAdminPermissions": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.BootstrapClusterCreatorAdminPermissions = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, 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.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccessEntry(v **types.AccessEntry, 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.AccessEntry + if *v == nil { + sv = &types.AccessEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessEntryArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AccessEntryArn = ptr.String(jtv) + } + + case "clusterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClusterName = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "kubernetesGroups": + if err := awsRestjson1_deserializeDocumentStringList(&sv.KubernetesGroups, value); err != nil { + return err + } + + case "modifiedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "principalArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PrincipalArn = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + case "username": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Username = ptr.String(jtv) + } + + default: + _, _ = key, value - 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 + *v = sv + return nil } -func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceUnavailableException{} - 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 +func awsRestjson1_deserializeDocumentAccessPoliciesList(v *[]types.AccessPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape) + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - 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 + var cv []types.AccessPolicy + if *v == nil { + cv = []types.AccessPolicy{} + } else { + cv = *v } - errorBody.Seek(0, io.SeekStart) + for _, value := range shape { + var col types.AccessPolicy + destAddr := &col + if err := awsRestjson1_deserializeDocumentAccessPolicy(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) - return output + } + *v = cv + return nil } -func awsRestjson1_deserializeErrorUnsupportedAvailabilityZoneException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.UnsupportedAvailabilityZoneException{} - 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 +func awsRestjson1_deserializeDocumentAccessPolicy(v **types.AccessPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - err := awsRestjson1_deserializeDocumentUnsupportedAvailabilityZoneException(&output, shape) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - 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 + var sv *types.AccessPolicy + if *v == nil { + sv = &types.AccessPolicy{} + } else { + sv = *v } - errorBody.Seek(0, io.SeekStart) + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } - return output + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeDocumentAccessScope(v **types.AccessScope, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7614,22 +9228,27 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.AccessScope if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.AccessScope{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "namespaces": + if err := awsRestjson1_deserializeDocumentStringList(&sv.Namespaces, value); err != nil { + return err + } + + case "type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected AccessScopeType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Type = types.AccessScopeType(jtv) } default: @@ -8128,6 +9747,117 @@ func awsRestjson1_deserializeDocumentAddonVersionInfoList(v *[]types.AddonVersio return nil } +func awsRestjson1_deserializeDocumentAssociatedAccessPoliciesList(v *[]types.AssociatedAccessPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AssociatedAccessPolicy + if *v == nil { + cv = []types.AssociatedAccessPolicy{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssociatedAccessPolicy + destAddr := &col + if err := awsRestjson1_deserializeDocumentAssociatedAccessPolicy(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAssociatedAccessPolicy(v **types.AssociatedAccessPolicy, 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.AssociatedAccessPolicy + if *v == nil { + sv = &types.AssociatedAccessPolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessScope": + if err := awsRestjson1_deserializeDocumentAccessScope(&sv.AccessScope, value); err != nil { + return err + } + + case "associatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.AssociatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "modifiedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "policyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PolicyArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAutoScalingGroup(v **types.AutoScalingGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8380,6 +10110,11 @@ func awsRestjson1_deserializeDocumentCluster(v **types.Cluster, value interface{ for key, value := range shape { switch key { + case "accessConfig": + if err := awsRestjson1_deserializeDocumentAccessConfigResponse(&sv.AccessConfig, value); err != nil { + return err + } + case "arn": if value != nil { jtv, ok := value.(string) diff --git a/service/eks/doc.go b/service/eks/doc.go index 36c659797b0..a7b29970001 100644 --- a/service/eks/doc.go +++ b/service/eks/doc.go @@ -5,7 +5,7 @@ // // Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes // it easy for you to run Kubernetes on Amazon Web Services without needing to -// stand up or maintain your own Kubernetes control plane. Kubernetes is an +// setup or maintain your own Kubernetes control plane. Kubernetes is an // open-source system for automating the deployment, scaling, and management of // containerized applications. Amazon EKS runs up-to-date versions of the // open-source Kubernetes software, so you can use all the existing plugins and diff --git a/service/eks/generated.json b/service/eks/generated.json index ea4edd39ab6..fb8009dcbd3 100644 --- a/service/eks/generated.json +++ b/service/eks/generated.json @@ -10,14 +10,17 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_AssociateAccessPolicy.go", "api_op_AssociateEncryptionConfig.go", "api_op_AssociateIdentityProviderConfig.go", + "api_op_CreateAccessEntry.go", "api_op_CreateAddon.go", "api_op_CreateCluster.go", "api_op_CreateEksAnywhereSubscription.go", "api_op_CreateFargateProfile.go", "api_op_CreateNodegroup.go", "api_op_CreatePodIdentityAssociation.go", + "api_op_DeleteAccessEntry.go", "api_op_DeleteAddon.go", "api_op_DeleteCluster.go", "api_op_DeleteEksAnywhereSubscription.go", @@ -25,6 +28,7 @@ "api_op_DeleteNodegroup.go", "api_op_DeletePodIdentityAssociation.go", "api_op_DeregisterCluster.go", + "api_op_DescribeAccessEntry.go", "api_op_DescribeAddon.go", "api_op_DescribeAddonConfiguration.go", "api_op_DescribeAddonVersions.go", @@ -35,8 +39,12 @@ "api_op_DescribeNodegroup.go", "api_op_DescribePodIdentityAssociation.go", "api_op_DescribeUpdate.go", + "api_op_DisassociateAccessPolicy.go", "api_op_DisassociateIdentityProviderConfig.go", + "api_op_ListAccessEntries.go", + "api_op_ListAccessPolicies.go", "api_op_ListAddons.go", + "api_op_ListAssociatedAccessPolicies.go", "api_op_ListClusters.go", "api_op_ListEksAnywhereSubscriptions.go", "api_op_ListFargateProfiles.go", @@ -48,6 +56,7 @@ "api_op_RegisterCluster.go", "api_op_TagResource.go", "api_op_UntagResource.go", + "api_op_UpdateAccessEntry.go", "api_op_UpdateAddon.go", "api_op_UpdateClusterConfig.go", "api_op_UpdateClusterVersion.go", diff --git a/service/eks/serializers.go b/service/eks/serializers.go index 781838fa6db..8d62fb75f8b 100644 --- a/service/eks/serializers.go +++ b/service/eks/serializers.go @@ -14,6 +14,110 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpAssociateAccessPolicy struct { +} + +func (*awsRestjson1_serializeOpAssociateAccessPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAssociateAccessPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssociateAccessPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}/access-policies") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAssociateAccessPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAssociateAccessPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAssociateAccessPolicyInput(v *AssociateAccessPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClusterName == nil || len(*v.ClusterName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")} + } + if v.ClusterName != nil { + if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil { + return err + } + } + + if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")} + } + if v.PrincipalArn != nil { + if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAssociateAccessPolicyInput(v *AssociateAccessPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessScope != nil { + ok := object.Key("accessScope") + if err := awsRestjson1_serializeDocumentAccessScope(v.AccessScope, ok); err != nil { + return err + } + } + + if v.PolicyArn != nil { + ok := object.Key("policyArn") + ok.String(*v.PolicyArn) + } + + return nil +} + type awsRestjson1_serializeOpAssociateEncryptionConfig struct { } @@ -211,6 +315,123 @@ func awsRestjson1_serializeOpDocumentAssociateIdentityProviderConfigInput(v *Ass return nil } +type awsRestjson1_serializeOpCreateAccessEntry struct { +} + +func (*awsRestjson1_serializeOpCreateAccessEntry) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateAccessEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateAccessEntryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateAccessEntryInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateAccessEntryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateAccessEntryInput(v *CreateAccessEntryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClusterName == nil || len(*v.ClusterName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")} + } + if v.ClusterName != nil { + if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateAccessEntryInput(v *CreateAccessEntryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("clientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.KubernetesGroups != nil { + ok := object.Key("kubernetesGroups") + if err := awsRestjson1_serializeDocumentStringList(v.KubernetesGroups, ok); err != nil { + return err + } + } + + if v.PrincipalArn != nil { + ok := object.Key("principalArn") + ok.String(*v.PrincipalArn) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + if v.Type != nil { + ok := object.Key("type") + ok.String(*v.Type) + } + + if v.Username != nil { + ok := object.Key("username") + ok.String(*v.Username) + } + + return nil +} + type awsRestjson1_serializeOpCreateAddon struct { } @@ -398,6 +619,13 @@ func awsRestjson1_serializeOpDocumentCreateClusterInput(v *CreateClusterInput, v object := value.Object() defer object.Close() + if v.AccessConfig != nil { + ok := object.Key("accessConfig") + if err := awsRestjson1_serializeDocumentCreateAccessConfigRequest(v.AccessConfig, ok); err != nil { + return err + } + } + if v.ClientRequestToken != nil { ok := object.Key("clientRequestToken") ok.String(*v.ClientRequestToken) @@ -987,6 +1215,80 @@ func awsRestjson1_serializeOpDocumentCreatePodIdentityAssociationInput(v *Create return nil } +type awsRestjson1_serializeOpDeleteAccessEntry struct { +} + +func (*awsRestjson1_serializeOpDeleteAccessEntry) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteAccessEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteAccessEntryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteAccessEntryInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteAccessEntryInput(v *DeleteAccessEntryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClusterName == nil || len(*v.ClusterName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")} + } + if v.ClusterName != nil { + if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil { + return err + } + } + + if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")} + } + if v.PrincipalArn != nil { + if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteAddon struct { } @@ -1482,14 +1784,14 @@ func awsRestjson1_serializeOpHttpBindingsDeregisterClusterInput(v *DeregisterClu return nil } -type awsRestjson1_serializeOpDescribeAddon struct { +type awsRestjson1_serializeOpDescribeAccessEntry struct { } -func (*awsRestjson1_serializeOpDescribeAddon) ID() string { +func (*awsRestjson1_serializeOpDescribeAccessEntry) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeAddon) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeAccessEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1497,13 +1799,87 @@ func (m *awsRestjson1_serializeOpDescribeAddon) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeAddonInput) + input, ok := in.Parameters.(*DescribeAccessEntryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/addons/{addonName}") + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeAccessEntryInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeAccessEntryInput(v *DescribeAccessEntryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClusterName == nil || len(*v.ClusterName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")} + } + if v.ClusterName != nil { + if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil { + return err + } + } + + if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")} + } + if v.PrincipalArn != nil { + if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeAddon struct { +} + +func (*awsRestjson1_serializeOpDescribeAddon) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeAddon) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeAddonInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/addons/{addonName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2066,11 +2442,345 @@ func awsRestjson1_serializeOpHttpBindingsDescribeNodegroupInput(v *DescribeNodeg } } - if v.NodegroupName == nil || len(*v.NodegroupName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member nodegroupName must not be empty")} + if v.NodegroupName == nil || len(*v.NodegroupName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member nodegroupName must not be empty")} + } + if v.NodegroupName != nil { + if err := encoder.SetURI("nodegroupName").String(*v.NodegroupName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribePodIdentityAssociation struct { +} + +func (*awsRestjson1_serializeOpDescribePodIdentityAssociation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribePodIdentityAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribePodIdentityAssociationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/pod-identity-associations/{associationId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribePodIdentityAssociationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribePodIdentityAssociationInput(v *DescribePodIdentityAssociationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AssociationId == nil || len(*v.AssociationId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member associationId must not be empty")} + } + if v.AssociationId != nil { + if err := encoder.SetURI("associationId").String(*v.AssociationId); err != nil { + return err + } + } + + if v.ClusterName == nil || len(*v.ClusterName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")} + } + if v.ClusterName != nil { + if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeUpdate struct { +} + +func (*awsRestjson1_serializeOpDescribeUpdate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeUpdate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeUpdateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/clusters/{name}/updates/{updateId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeUpdateInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeUpdateInput(v *DescribeUpdateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AddonName != nil { + encoder.SetQuery("addonName").String(*v.AddonName) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + if v.NodegroupName != nil { + encoder.SetQuery("nodegroupName").String(*v.NodegroupName) + } + + if v.UpdateId == nil || len(*v.UpdateId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member updateId must not be empty")} + } + if v.UpdateId != nil { + if err := encoder.SetURI("updateId").String(*v.UpdateId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDisassociateAccessPolicy struct { +} + +func (*awsRestjson1_serializeOpDisassociateAccessPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisassociateAccessPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateAccessPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}/access-policies/{policyArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDisassociateAccessPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisassociateAccessPolicyInput(v *DisassociateAccessPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClusterName == nil || len(*v.ClusterName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")} + } + if v.ClusterName != nil { + if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil { + return err + } + } + + if v.PolicyArn == nil || len(*v.PolicyArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member policyArn must not be empty")} + } + if v.PolicyArn != nil { + if err := encoder.SetURI("policyArn").String(*v.PolicyArn); err != nil { + return err + } + } + + if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")} + } + if v.PrincipalArn != nil { + if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDisassociateIdentityProviderConfig struct { +} + +func (*awsRestjson1_serializeOpDisassociateIdentityProviderConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisassociateIdentityProviderConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateIdentityProviderConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/identity-provider-configs/disassociate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDisassociateIdentityProviderConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDisassociateIdentityProviderConfigInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisassociateIdentityProviderConfigInput(v *DisassociateIdentityProviderConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClusterName == nil || len(*v.ClusterName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")} + } + if v.ClusterName != nil { + if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDisassociateIdentityProviderConfigInput(v *DisassociateIdentityProviderConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("clientRequestToken") + ok.String(*v.ClientRequestToken) } - if v.NodegroupName != nil { - if err := encoder.SetURI("nodegroupName").String(*v.NodegroupName); err != nil { + + if v.IdentityProviderConfig != nil { + ok := object.Key("identityProviderConfig") + if err := awsRestjson1_serializeDocumentIdentityProviderConfig(v.IdentityProviderConfig, ok); err != nil { return err } } @@ -2078,14 +2788,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeNodegroupInput(v *DescribeNodeg return nil } -type awsRestjson1_serializeOpDescribePodIdentityAssociation struct { +type awsRestjson1_serializeOpListAccessEntries struct { } -func (*awsRestjson1_serializeOpDescribePodIdentityAssociation) ID() string { +func (*awsRestjson1_serializeOpListAccessEntries) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribePodIdentityAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListAccessEntries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2093,13 +2803,13 @@ func (m *awsRestjson1_serializeOpDescribePodIdentityAssociation) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribePodIdentityAssociationInput) + input, ok := in.Parameters.(*ListAccessEntriesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/pod-identity-associations/{associationId}") + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2115,7 +2825,7 @@ func (m *awsRestjson1_serializeOpDescribePodIdentityAssociation) HandleSerialize return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribePodIdentityAssociationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListAccessEntriesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2126,18 +2836,13 @@ func (m *awsRestjson1_serializeOpDescribePodIdentityAssociation) HandleSerialize return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribePodIdentityAssociationInput(v *DescribePodIdentityAssociationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListAccessEntriesInput(v *ListAccessEntriesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AssociationId == nil || len(*v.AssociationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member associationId must not be empty")} - } - if v.AssociationId != nil { - if err := encoder.SetURI("associationId").String(*v.AssociationId); err != nil { - return err - } + if v.AssociatedPolicyArn != nil { + encoder.SetQuery("associatedPolicyArn").String(*v.AssociatedPolicyArn) } if v.ClusterName == nil || len(*v.ClusterName) == 0 { @@ -2149,17 +2854,25 @@ func awsRestjson1_serializeOpHttpBindingsDescribePodIdentityAssociationInput(v * } } + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + return nil } -type awsRestjson1_serializeOpDescribeUpdate struct { +type awsRestjson1_serializeOpListAccessPolicies struct { } -func (*awsRestjson1_serializeOpDescribeUpdate) ID() string { +func (*awsRestjson1_serializeOpListAccessPolicies) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeUpdate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListAccessPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2167,13 +2880,13 @@ func (m *awsRestjson1_serializeOpDescribeUpdate) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeUpdateInput) + input, ok := in.Parameters.(*ListAccessPoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/clusters/{name}/updates/{updateId}") + opPath, opQuery := httpbinding.SplitURI("/access-policies") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2189,7 +2902,7 @@ func (m *awsRestjson1_serializeOpDescribeUpdate) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeUpdateInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListAccessPoliciesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2200,48 +2913,30 @@ func (m *awsRestjson1_serializeOpDescribeUpdate) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeUpdateInput(v *DescribeUpdateInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListAccessPoliciesInput(v *ListAccessPoliciesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AddonName != nil { - encoder.SetQuery("addonName").String(*v.AddonName) - } - - if v.Name == nil || len(*v.Name) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} - } - if v.Name != nil { - if err := encoder.SetURI("name").String(*v.Name); err != nil { - return err - } - } - - if v.NodegroupName != nil { - encoder.SetQuery("nodegroupName").String(*v.NodegroupName) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.UpdateId == nil || len(*v.UpdateId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member updateId must not be empty")} - } - if v.UpdateId != nil { - if err := encoder.SetURI("updateId").String(*v.UpdateId); err != nil { - return err - } + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpDisassociateIdentityProviderConfig struct { +type awsRestjson1_serializeOpListAddons struct { } -func (*awsRestjson1_serializeOpDisassociateIdentityProviderConfig) ID() string { +func (*awsRestjson1_serializeOpListAddons) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDisassociateIdentityProviderConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListAddons) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2249,16 +2944,16 @@ func (m *awsRestjson1_serializeOpDisassociateIdentityProviderConfig) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DisassociateIdentityProviderConfigInput) + input, ok := in.Parameters.(*ListAddonsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/identity-provider-configs/disassociate") + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/addons") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2271,18 +2966,7 @@ func (m *awsRestjson1_serializeOpDisassociateIdentityProviderConfig) HandleSeria return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDisassociateIdentityProviderConfigInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentDisassociateIdentityProviderConfigInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListAddonsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2293,7 +2977,7 @@ func (m *awsRestjson1_serializeOpDisassociateIdentityProviderConfig) HandleSeria return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDisassociateIdentityProviderConfigInput(v *DisassociateIdentityProviderConfigInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListAddonsInput(v *ListAddonsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2307,36 +2991,25 @@ func awsRestjson1_serializeOpHttpBindingsDisassociateIdentityProviderConfigInput } } - return nil -} - -func awsRestjson1_serializeOpDocumentDisassociateIdentityProviderConfigInput(v *DisassociateIdentityProviderConfigInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("clientRequestToken") - ok.String(*v.ClientRequestToken) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.IdentityProviderConfig != nil { - ok := object.Key("identityProviderConfig") - if err := awsRestjson1_serializeDocumentIdentityProviderConfig(v.IdentityProviderConfig, ok); err != nil { - return err - } + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpListAddons struct { +type awsRestjson1_serializeOpListAssociatedAccessPolicies struct { } -func (*awsRestjson1_serializeOpListAddons) ID() string { +func (*awsRestjson1_serializeOpListAssociatedAccessPolicies) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListAddons) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListAssociatedAccessPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2344,13 +3017,13 @@ func (m *awsRestjson1_serializeOpListAddons) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListAddonsInput) + input, ok := in.Parameters.(*ListAssociatedAccessPoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/addons") + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}/access-policies") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2366,7 +3039,7 @@ func (m *awsRestjson1_serializeOpListAddons) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListAddonsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListAssociatedAccessPoliciesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2377,7 +3050,7 @@ func (m *awsRestjson1_serializeOpListAddons) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListAddonsInput(v *ListAddonsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListAssociatedAccessPoliciesInput(v *ListAssociatedAccessPoliciesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2399,6 +3072,15 @@ func awsRestjson1_serializeOpHttpBindingsListAddonsInput(v *ListAddonsInput, enc encoder.SetQuery("nextToken").String(*v.NextToken) } + if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")} + } + if v.PrincipalArn != nil { + if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil { + return err + } + } + return nil } @@ -3243,6 +3925,115 @@ func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInpu return nil } +type awsRestjson1_serializeOpUpdateAccessEntry struct { +} + +func (*awsRestjson1_serializeOpUpdateAccessEntry) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateAccessEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateAccessEntryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateAccessEntryInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAccessEntryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateAccessEntryInput(v *UpdateAccessEntryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClusterName == nil || len(*v.ClusterName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")} + } + if v.ClusterName != nil { + if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil { + return err + } + } + + if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")} + } + if v.PrincipalArn != nil { + if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAccessEntryInput(v *UpdateAccessEntryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("clientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.KubernetesGroups != nil { + ok := object.Key("kubernetesGroups") + if err := awsRestjson1_serializeDocumentStringList(v.KubernetesGroups, ok); err != nil { + return err + } + } + + if v.Username != nil { + ok := object.Key("username") + ok.String(*v.Username) + } + + return nil +} + type awsRestjson1_serializeOpUpdateAddon struct { } @@ -3440,6 +4231,13 @@ func awsRestjson1_serializeOpDocumentUpdateClusterConfigInput(v *UpdateClusterCo object := value.Object() defer object.Close() + if v.AccessConfig != nil { + ok := object.Key("accessConfig") + if err := awsRestjson1_serializeDocumentUpdateAccessConfigRequest(v.AccessConfig, ok); err != nil { + return err + } + } + if v.ClientRequestToken != nil { ok := object.Key("clientRequestToken") ok.String(*v.ClientRequestToken) @@ -3994,6 +4792,25 @@ func awsRestjson1_serializeOpDocumentUpdatePodIdentityAssociationInput(v *Update return nil } +func awsRestjson1_serializeDocumentAccessScope(v *types.AccessScope, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Namespaces != nil { + ok := object.Key("namespaces") + if err := awsRestjson1_serializeDocumentStringList(v.Namespaces, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + func awsRestjson1_serializeDocumentConnectorConfigRequest(v *types.ConnectorConfigRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4023,6 +4840,23 @@ func awsRestjson1_serializeDocumentControlPlanePlacementRequest(v *types.Control return nil } +func awsRestjson1_serializeDocumentCreateAccessConfigRequest(v *types.CreateAccessConfigRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AuthenticationMode) > 0 { + ok := object.Key("authenticationMode") + ok.String(string(v.AuthenticationMode)) + } + + if v.BootstrapClusterCreatorAdminPermissions != nil { + ok := object.Key("bootstrapClusterCreatorAdminPermissions") + ok.Boolean(*v.BootstrapClusterCreatorAdminPermissions) + } + + return nil +} + func awsRestjson1_serializeDocumentEksAnywhereSubscriptionTerm(v *types.EksAnywhereSubscriptionTerm, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4465,6 +5299,18 @@ func awsRestjson1_serializeDocumentTaintsList(v []types.Taint, value smithyjson. return nil } +func awsRestjson1_serializeDocumentUpdateAccessConfigRequest(v *types.UpdateAccessConfigRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AuthenticationMode) > 0 { + ok := object.Key("authenticationMode") + ok.String(string(v.AuthenticationMode)) + } + + return nil +} + func awsRestjson1_serializeDocumentUpdateLabelsPayload(v *types.UpdateLabelsPayload, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/eks/types/enums.go b/service/eks/types/enums.go index a27be80075a..2085714ad7f 100644 --- a/service/eks/types/enums.go +++ b/service/eks/types/enums.go @@ -2,6 +2,24 @@ package types +type AccessScopeType string + +// Enum values for AccessScopeType +const ( + AccessScopeTypeCluster AccessScopeType = "cluster" + AccessScopeTypeNamespace AccessScopeType = "namespace" +) + +// Values returns all known values for AccessScopeType. 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 (AccessScopeType) Values() []AccessScopeType { + return []AccessScopeType{ + "cluster", + "namespace", + } +} + type AddonIssueCode string // Enum values for AddonIssueCode @@ -100,6 +118,26 @@ func (AMITypes) Values() []AMITypes { } } +type AuthenticationMode string + +// Enum values for AuthenticationMode +const ( + AuthenticationModeApi AuthenticationMode = "API" + AuthenticationModeApiAndConfigMap AuthenticationMode = "API_AND_CONFIG_MAP" + AuthenticationModeConfigMap AuthenticationMode = "CONFIG_MAP" +) + +// Values returns all known values for AuthenticationMode. 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 (AuthenticationMode) Values() []AuthenticationMode { + return []AuthenticationMode{ + "API", + "API_AND_CONFIG_MAP", + "CONFIG_MAP", + } +} + type CapacityTypes string // Enum values for CapacityTypes @@ -601,6 +639,7 @@ const ( UpdateParamTypeConfigurationValues UpdateParamType = "ConfigurationValues" UpdateParamTypeSecurityGroups UpdateParamType = "SecurityGroups" UpdateParamTypeSubnets UpdateParamType = "Subnets" + UpdateParamTypeAuthenticationMode UpdateParamType = "AuthenticationMode" ) // Values returns all known values for UpdateParamType. Note that this can be @@ -634,6 +673,7 @@ func (UpdateParamType) Values() []UpdateParamType { "ConfigurationValues", "SecurityGroups", "Subnets", + "AuthenticationMode", } } @@ -672,6 +712,7 @@ const ( UpdateTypeAssociateEncryptionConfig UpdateType = "AssociateEncryptionConfig" UpdateTypeAddonUpdate UpdateType = "AddonUpdate" UpdateTypeVpcConfigUpdate UpdateType = "VpcConfigUpdate" + UpdateTypeAccessConfigUpdate UpdateType = "AccessConfigUpdate" ) // Values returns all known values for UpdateType. Note that this can be expanded @@ -688,5 +729,6 @@ func (UpdateType) Values() []UpdateType { "AssociateEncryptionConfig", "AddonUpdate", "VpcConfigUpdate", + "AccessConfigUpdate", } } diff --git a/service/eks/types/errors.go b/service/eks/types/errors.go index 1302b81a4ea..30a564536e6 100644 --- a/service/eks/types/errors.go +++ b/service/eks/types/errors.go @@ -251,7 +251,8 @@ func (e *ResourceLimitExceededException) ErrorFault() smithy.ErrorFault { return // The specified resource could not be found. You can view your available clusters // with ListClusters . You can view your available managed node groups with -// ListNodegroups . Amazon EKS clusters and node groups are Region-specific. +// ListNodegroups . Amazon EKS clusters and node groups are Amazon Web Services +// Region specific. type ResourceNotFoundException struct { Message *string diff --git a/service/eks/types/types.go b/service/eks/types/types.go index 4e78c3ced5b..d0b17ca4c65 100644 --- a/service/eks/types/types.go +++ b/service/eks/types/types.go @@ -7,6 +7,102 @@ import ( "time" ) +// The access configuration for the cluster. +type AccessConfigResponse struct { + + // The current authentication mode of the cluster. + AuthenticationMode AuthenticationMode + + // Specifies whether or not the cluster creator IAM principal was set as a cluster + // admin access entry during cluster creation time. + BootstrapClusterCreatorAdminPermissions *bool + + noSmithyDocumentSerde +} + +// An access entry allows an IAM principal (user or role) to access your cluster. +// Access entries can replace the need to maintain the aws-auth ConfigMap for +// authentication. For more information about access entries, see Access entries (https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html) +// in the Amazon EKS User Guide. +type AccessEntry struct { + + // The ARN of the access entry. + AccessEntryArn *string + + // The name of your cluster. + ClusterName *string + + // The Unix epoch timestamp at object creation. + CreatedAt *time.Time + + // A name that you've specified in a Kubernetes RoleBinding or ClusterRoleBinding + // object so that Kubernetes authorizes the principalARN access to cluster objects. + KubernetesGroups []string + + // The Unix epoch timestamp for the last modification to the object. + ModifiedAt *time.Time + + // The ARN of the IAM principal for the access entry. If you ever delete the IAM + // principal with this ARN, the access entry isn't automatically deleted. We + // recommend that you delete the access entry with an ARN for an IAM principal that + // you delete. If you don't delete the access entry and ever recreate the IAM + // principal, even if it has the same ARN, the access entry won't work. This is + // because even though the ARN is the same for the recreated IAM principal, the + // roleID or userID (you can see this with the Security Token Service + // GetCallerIdentity API) is different for the recreated IAM principal than it was + // for the original IAM principal. Even though you don't see the IAM principal's + // roleID or userID for an access entry, Amazon EKS stores it with the access + // entry. + PrincipalArn *string + + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. + Tags map[string]string + + // The type of the access entry. + Type *string + + // The name of a user that can authenticate to your cluster. + Username *string + + noSmithyDocumentSerde +} + +// An access policy includes permissions that allow Amazon EKS to authorize an IAM +// principal to work with Kubernetes objects on your cluster. The policies are +// managed by Amazon EKS, but they're not IAM policies. You can't view the +// permissions in the policies using the API. The permissions for many of the +// policies are similar to the Kubernetes cluster-admin , admin , edit , and view +// cluster roles. For more information about these cluster roles, see User-facing +// roles (https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) +// in the Kubernetes documentation. To view the contents of the policies, see +// Access policy permissions (https://docs.aws.amazon.com/eks/latest/userguide/access-policies.html#access-policy-permissions) +// in the Amazon EKS User Guide. +type AccessPolicy struct { + + // The ARN of the access policy. + Arn *string + + // The name of the access policy. + Name *string + + noSmithyDocumentSerde +} + +// The scope of an AccessPolicy that's associated to an AccessEntry . +type AccessScope struct { + + // A Kubernetes namespace that an access policy is scoped to. A value is required + // if you specified namespace for Type . + Namespaces []string + + // The scope type of an access policy. + Type AccessScopeType + + noSmithyDocumentSerde +} + // An Amazon EKS add-on. For more information, see Amazon EKS add-ons (https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html) // in the Amazon EKS User Guide. type Addon struct { @@ -20,13 +116,13 @@ type Addon struct { // The version of the add-on. AddonVersion *string - // The name of the cluster. + // The name of your cluster. ClusterName *string // The configuration values that you provided. ConfigurationValues *string - // The date and time that the add-on was created. + // The Unix epoch timestamp at object creation. CreatedAt *time.Time // An object that represents the health of the add-on. @@ -35,7 +131,7 @@ type Addon struct { // Information about an Amazon EKS add-on from the Amazon Web Services Marketplace. MarketplaceInformation *MarketplaceInformation - // The date and time that the add-on was last modified. + // The Unix epoch timestamp for the last modification to the object. ModifiedAt *time.Time // The owner of the add-on. @@ -45,15 +141,15 @@ type Addon struct { Publisher *string // The Amazon Resource Name (ARN) of the IAM role that's bound to the Kubernetes - // service account that the add-on uses. + // ServiceAccount object that the add-on uses. ServiceAccountRoleArn *string // The status of the add-on. Status AddonStatus - // The metadata that you apply to the add-on to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. - // Add-on tags do not propagate to any other resources associated with the cluster. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string noSmithyDocumentSerde @@ -126,6 +222,24 @@ type AddonVersionInfo struct { noSmithyDocumentSerde } +// An access policy association. +type AssociatedAccessPolicy struct { + + // The scope of the access policy. + AccessScope *AccessScope + + // The date and time the AccessPolicy was associated with an AccessEntry . + AssociatedAt *time.Time + + // The Unix epoch timestamp for the last modification to the object. + ModifiedAt *time.Time + + // The ARN of the AccessPolicy . + PolicyArn *string + + noSmithyDocumentSerde +} + // An Auto Scaling group that is associated with an Amazon EKS managed node group. type AutoScalingGroup struct { @@ -150,20 +264,23 @@ type Certificate struct { // An object representing an Amazon EKS cluster. type Cluster struct { + // The access configuration for the cluster. + AccessConfig *AccessConfigResponse + // The Amazon Resource Name (ARN) of the cluster. Arn *string // The certificate-authority-data for your cluster. CertificateAuthority *Certificate - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string // The configuration used to connect to a cluster for registration. ConnectorConfig *ConnectorConfigResponse - // The Unix epoch timestamp in seconds for when the cluster was created. + // The Unix epoch timestamp at object creation. CreatedAt *time.Time // The encryption configuration for the cluster. @@ -191,7 +308,7 @@ type Cluster struct { // The logging configuration for your cluster. Logging *Logging - // The name of the cluster. + // The name of your cluster. Name *string // An object representing the configuration of your local Amazon EKS cluster on an @@ -199,15 +316,17 @@ type Cluster struct { // Amazon Web Services cloud. OutpostConfig *OutpostConfigResponse - // The platform version of your Amazon EKS cluster. For more information, see - // Platform Versions (https://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html) + // The platform version of your Amazon EKS cluster. For more information about + // clusters deployed on the Amazon Web Services Cloud, see Platform versions (https://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html) + // in the Amazon EKS User Guide . For more information about local clusters + // deployed on an Outpost, see Amazon EKS local cluster platform versions (https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-platform-versions.html) // in the Amazon EKS User Guide . PlatformVersion *string // The VPC configuration used by the cluster control plane. Amazon EKS VPC // resources have specific requirements to work properly with Kubernetes. For more - // information, see Cluster VPC Considerations (https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) - // and Cluster Security Group Considerations (https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) + // information, see Cluster VPC considerations (https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) + // and Cluster security group considerations (https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) // in the Amazon EKS User Guide. ResourcesVpcConfig *VpcConfigResponse @@ -219,10 +338,9 @@ type Cluster struct { // The current status of the cluster. Status ClusterStatus - // The metadata that you apply to the cluster to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. - // Cluster tags do not propagate to any other resources associated with the - // cluster. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string // The Kubernetes server version for the cluster. @@ -340,6 +458,22 @@ type ControlPlanePlacementResponse struct { noSmithyDocumentSerde } +// The access configuration information for the cluster. +type CreateAccessConfigRequest struct { + + // The desired authentication mode for the cluster. If you create a cluster by + // using the EKS API, Amazon Web Services SDKs, or CloudFormation, the default is + // CONFIG_MAP . If you create the cluster by using the Amazon Web Services + // Management Console, the default value is API_AND_CONFIG_MAP . + AuthenticationMode AuthenticationMode + + // Specifies whether or not the cluster creator IAM principal was set as a cluster + // admin access entry during cluster creation time. The default value is true . + BootstrapClusterCreatorAdminPermissions *bool + + noSmithyDocumentSerde +} + // An EKS Anywhere subscription authorizing the customer to support for licensed // clusters and access to EKS Anywhere Curated Packages. type EksAnywhereSubscription struct { @@ -412,7 +546,7 @@ type EncryptionConfig struct { // Key Management Service (KMS) key. Either the ARN or the alias can be used. Provider *Provider - // Specifies the resources to be encrypted. The only supported value is "secrets". + // Specifies the resources to be encrypted. The only supported value is secrets . Resources []string noSmithyDocumentSerde @@ -428,8 +562,8 @@ type ErrorDetail struct { // associated with the cluster. // - EniLimitReached: You have reached the elastic network interface limit for // your account. - // - IpNotAvailable: A subnet associated with the cluster doesn't have any free - // IP addresses. + // - IpNotAvailable: A subnet associated with the cluster doesn't have any + // available IP addresses. // - AccessDenied: You don't have permissions to perform the specified // operation. // - OperationNotPermitted: The service role associated with the cluster doesn't @@ -449,10 +583,10 @@ type ErrorDetail struct { // An object representing an Fargate profile. type FargateProfile struct { - // The name of the Amazon EKS cluster that the Fargate profile belongs to. + // The name of your cluster. ClusterName *string - // The Unix epoch timestamp in seconds for when the Fargate profile was created. + // The Unix epoch timestamp at object creation. CreatedAt *time.Time // The full Amazon Resource Name (ARN) of the Fargate profile. @@ -461,25 +595,24 @@ type FargateProfile struct { // The name of the Fargate profile. FargateProfileName *string - // The Amazon Resource Name (ARN) of the pod execution role to use for pods that - // match the selectors in the Fargate profile. For more information, see Pod - // Execution Role (https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html) + // The Amazon Resource Name (ARN) of the Pod execution role to use for any Pod + // that matches the selectors in the Fargate profile. For more information, see Pod + // execution role (https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html) // in the Amazon EKS User Guide. PodExecutionRoleArn *string - // The selectors to match for pods to use this Fargate profile. + // The selectors to match for a Pod to use this Fargate profile. Selectors []FargateProfileSelector // The current status of the Fargate profile. Status FargateProfileStatus - // The IDs of subnets to launch pods into. + // The IDs of subnets to launch a Pod into. Subnets []string - // The metadata applied to the Fargate profile to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. - // Fargate profile tags do not propagate to any other resources associated with the - // Fargate profile, such as the pods that are scheduled with it. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string noSmithyDocumentSerde @@ -622,9 +755,9 @@ type KubernetesNetworkConfigRequest struct { // 172.16.0.0/12 , or 192.168.0.0/16 . // - Doesn't overlap with any CIDR block assigned to the VPC that you selected // for VPC. - // - Between /24 and /12. - // You can only specify a custom CIDR block when you create a cluster and can't - // change this value once the cluster is created. + // - Between /24 and /12 . + // You can only specify a custom CIDR block when you create a cluster. You can't + // change this value after the cluster is created. ServiceIpv4Cidr *string noSmithyDocumentSerde @@ -634,18 +767,18 @@ type KubernetesNetworkConfigRequest struct { // value for serviceIpv6Cidr or serviceIpv4Cidr, but not both. type KubernetesNetworkConfigResponse struct { - // The IP family used to assign Kubernetes pod and service IP addresses. The IP - // family is always ipv4 , unless you have a 1.21 or later cluster running version - // 1.10.1 or later of the Amazon VPC CNI add-on and specified ipv6 when you - // created the cluster. + // The IP family used to assign Kubernetes Pod and Service objects IP addresses. + // The IP family is always ipv4 , unless you have a 1.21 or later cluster running + // version 1.10.1 or later of the Amazon VPC CNI plugin for Kubernetes and + // specified ipv6 when you created the cluster. IpFamily IpFamily - // The CIDR block that Kubernetes pod and service IP addresses are assigned from. - // Kubernetes assigns addresses from an IPv4 CIDR block assigned to a subnet that - // the node is in. If you didn't specify a CIDR block when you created the cluster, - // then Kubernetes assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 - // CIDR blocks. If this was specified, then it was specified when the cluster was - // created and it can't be changed. + // The CIDR block that Kubernetes Pod and Service object IP addresses are assigned + // from. Kubernetes assigns addresses from an IPv4 CIDR block assigned to a subnet + // that the node is in. If you didn't specify a CIDR block when you created the + // cluster, then Kubernetes assigns addresses from either the 10.100.0.0/16 or + // 172.20.0.0/16 CIDR blocks. If this was specified, then it was specified when the + // cluster was created and it can't be changed. ServiceIpv4Cidr *string // The CIDR block that Kubernetes pod and service IP addresses are assigned from @@ -736,10 +869,10 @@ type Nodegroup struct { // The capacity type of your managed node group. CapacityType CapacityTypes - // The name of the cluster that the managed node group resides in. + // The name of your cluster. ClusterName *string - // The Unix epoch timestamp in seconds for when the managed node group was created. + // The Unix epoch timestamp at object creation. CreatedAt *time.Time // If the node group wasn't deployed with a launch template, then this is the disk @@ -765,8 +898,7 @@ type Nodegroup struct { // template that was used. LaunchTemplate *LaunchTemplateSpecification - // The Unix epoch timestamp in seconds for when the managed node group was last - // modified. + // The Unix epoch timestamp for the last modification to the object. ModifiedAt *time.Time // The IAM role associated with your node group. The Amazon EKS node kubelet @@ -807,10 +939,9 @@ type Nodegroup struct { // with your node group. Subnets []string - // The metadata applied to the node group to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. - // Node group tags do not propagate to any other resources associated with the node - // group, such as the Amazon EC2 instances or subnets. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string // The Kubernetes taints to be applied to the nodes in the node group when they @@ -860,20 +991,21 @@ type NodegroupResources struct { type NodegroupScalingConfig struct { // The current number of nodes that the managed node group should maintain. If you - // use Cluster Autoscaler, you shouldn't change the desiredSize value directly, as - // this can cause the Cluster Autoscaler to suddenly scale up or scale down. - // Whenever this parameter changes, the number of worker nodes in the node group is - // updated to the specified size. If this parameter is given a value that is - // smaller than the current number of running worker nodes, the necessary number of - // worker nodes are terminated to match the given value. When using CloudFormation, - // no action occurs if you remove this parameter from your CFN template. This - // parameter can be different from minSize in some cases, such as when starting - // with extra hosts for testing. This parameter can also be different when you want - // to start with an estimated number of needed hosts, but let Cluster Autoscaler - // reduce the number if there are too many. When Cluster Autoscaler is used, the - // desiredSize parameter is altered by Cluster Autoscaler (but can be out-of-date - // for short periods of time). Cluster Autoscaler doesn't scale a managed node - // group lower than minSize or higher than maxSize. + // use the Kubernetes Cluster Autoscaler (https://github.com/kubernetes/autoscaler#kubernetes-autoscaler) + // , you shouldn't change the desiredSize value directly, as this can cause the + // Cluster Autoscaler to suddenly scale up or scale down. Whenever this parameter + // changes, the number of worker nodes in the node group is updated to the + // specified size. If this parameter is given a value that is smaller than the + // current number of running worker nodes, the necessary number of worker nodes are + // terminated to match the given value. When using CloudFormation, no action occurs + // if you remove this parameter from your CFN template. This parameter can be + // different from minSize in some cases, such as when starting with extra hosts + // for testing. This parameter can also be different when you want to start with an + // estimated number of needed hosts, but let the Cluster Autoscaler reduce the + // number if there are too many. When the Cluster Autoscaler is used, the + // desiredSize parameter is altered by the Cluster Autoscaler (but can be + // out-of-date for short periods of time). the Cluster Autoscaler doesn't scale a + // managed node group lower than minSize or higher than maxSize . DesiredSize *int32 // The maximum number of nodes that the managed node group can scale out to. For @@ -892,13 +1024,13 @@ type NodegroupScalingConfig struct { type NodegroupUpdateConfig struct { // The maximum number of nodes unavailable at once during a version update. Nodes - // will be updated in parallel. This value or maxUnavailablePercentage is required - // to have a value.The maximum number is 100. + // are updated in parallel. This value or maxUnavailablePercentage is required to + // have a value.The maximum number is 100. MaxUnavailable *int32 // The maximum percentage of nodes unavailable during a version update. This - // percentage of nodes will be updated in parallel, up to 100 nodes at once. This - // value or maxUnavailable is required to have a value. + // percentage of nodes are updated in parallel, up to 100 nodes at once. This value + // or maxUnavailable is required to have a value. MaxUnavailablePercentage *int32 noSmithyDocumentSerde @@ -922,7 +1054,7 @@ type OidcIdentityProviderConfig struct { // authentication requests to the OIDC identity provider. ClientId *string - // The cluster that the configuration is associated to. + // The name of your cluster. ClusterName *string // The JSON web token (JWT) claim that the provider uses to return your groups. @@ -950,9 +1082,9 @@ type OidcIdentityProviderConfig struct { // The status of the OIDC identity provider. Status ConfigStatus - // The metadata to apply to the provider configuration to assist with - // categorization and organization. Each tag consists of a key and an optional - // value. You define both. + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. Tags map[string]string // The JSON Web token (JWT) claim that is used as the username. @@ -967,13 +1099,12 @@ type OidcIdentityProviderConfig struct { // An object representing an OpenID Connect (OIDC) configuration. Before // associating an OIDC identity provider to your cluster, review the considerations -// in Authenticating users for your cluster from an OpenID Connect identity -// provider (https://docs.aws.amazon.com/eks/latest/userguide/authenticate-oidc-identity-provider.html) +// in Authenticating users for your cluster from an OIDC identity provider (https://docs.aws.amazon.com/eks/latest/userguide/authenticate-oidc-identity-provider.html) // in the Amazon EKS User Guide. type OidcIdentityProviderConfigRequest struct { // This is also known as audience. The ID for the client application that makes - // authentication requests to the OpenID identity provider. + // authentication requests to the OIDC identity provider. // // This member is required. ClientId *string @@ -983,10 +1114,10 @@ type OidcIdentityProviderConfigRequest struct { // This member is required. IdentityProviderConfigName *string - // The URL of the OpenID identity provider that allows the API server to discover + // The URL of the OIDC identity provider that allows the API server to discover // public signing keys for verifying tokens. The URL must begin with https:// and - // should correspond to the iss claim in the provider's OIDC ID tokens. Per the - // OIDC standard, path components are allowed but query parameters are not. + // should correspond to the iss claim in the provider's OIDC ID tokens. Based on + // 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 . This URL should point to the level below // .well-known/openid-configuration and must be publicly accessible over the @@ -1012,7 +1143,7 @@ type OidcIdentityProviderConfigRequest struct { // The JSON Web Token (JWT) claim to use as the username. The default is sub , // which is expected to be a unique identifier of the end user. You can choose - // other claims, such as email or name , depending on the OpenID identity provider. + // other claims, such as email or name , depending on the OIDC identity provider. // Claims other than email are prefixed with the issuer URL to prevent naming // clashes with other plug-ins. UsernameClaim *string @@ -1085,8 +1216,8 @@ type OutpostConfigResponse struct { } // Amazon EKS Pod Identity associations provide the ability to manage credentials -// for your applications, similar to the way that 7EC2l instance profiles provide -// credentials to Amazon EC2 instances. +// for your applications, similar to the way that Amazon EC2 instance profiles +// provide credentials to Amazon EC2 instances. type PodIdentityAssociation struct { // The Amazon Resource Name (ARN) of the association. @@ -1118,9 +1249,10 @@ type PodIdentityAssociation struct { // IAM credentials with. ServiceAccount *string - // The metadata that you apply to a resource to assist with categorization and - // organization. Each tag consists of a key and an optional value. You define both. - // The following basic restrictions apply to tags: + // Metadata that assists with categorization and organization. Each tag consists + // of a key and an optional value. You define both. Tags don't propagate to any + // other cluster or Amazon Web Services resources. The following basic restrictions + // apply to tags: // - Maximum number of tags per resource – 50 // - For each resource, each tag key must be unique, and each tag key can have // only one value. @@ -1207,9 +1339,9 @@ type RemoteAccessConfig struct { noSmithyDocumentSerde } -// A property that allows a node to repel a set of pods. For more information, see -// Node taints on managed node groups (https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html) -// . +// A property that allows a node to repel a Pod . For more information, see Node +// taints on managed node groups (https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html) +// in the Amazon EKS User Guide. type Taint struct { // The effect of the taint. @@ -1227,7 +1359,7 @@ type Taint struct { // An object representing an asynchronous update. type Update struct { - // The Unix epoch timestamp in seconds for when the update was created. + // The Unix epoch timestamp at object creation. CreatedAt *time.Time // Any errors associated with a Failed update. @@ -1248,13 +1380,22 @@ type Update struct { noSmithyDocumentSerde } +// The access configuration information for the cluster. +type UpdateAccessConfigRequest struct { + + // The desired authentication mode for the cluster. + AuthenticationMode AuthenticationMode + + noSmithyDocumentSerde +} + // An object representing a Kubernetes label change for a managed node group. type UpdateLabelsPayload struct { - // Kubernetes labels to be added or updated. + // The Kubernetes labels to add or update. AddOrUpdateLabels map[string]string - // Kubernetes labels to be removed. + // The Kubernetes labels to remove. RemoveLabels []string noSmithyDocumentSerde @@ -1274,7 +1415,7 @@ type UpdateParam struct { // An object representing the details of an update to a taints payload. For more // information, see Node taints on managed node groups (https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html) -// . +// in the Amazon EKS User Guide. type UpdateTaintsPayload struct { // Kubernetes taints to be added or updated. @@ -1311,8 +1452,8 @@ type VpcConfigRequest struct { // The CIDR blocks that are allowed access to your cluster's public Kubernetes API // server endpoint. Communication to the endpoint from addresses outside of the // CIDR blocks that you specify is denied. The default value is 0.0.0.0/0 . If - // you've disabled private endpoint access and you have nodes or Fargate pods in - // the cluster, then ensure that you specify the necessary CIDR blocks. For more + // you've disabled private endpoint access, make sure that you specify the + // necessary CIDR blocks for every node and Fargate Pod in the cluster. For more // information, see Amazon EKS cluster endpoint access control (https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) // in the Amazon EKS User Guide . PublicAccessCidrs []string @@ -1352,19 +1493,11 @@ type VpcConfigResponse struct { // in the Amazon EKS User Guide . EndpointPrivateAccess bool - // This parameter indicates whether the Amazon EKS public API server endpoint is - // enabled. If the Amazon EKS public API server endpoint is disabled, your - // cluster's Kubernetes API server can only receive requests that originate from - // within the cluster VPC. + // Whether the public API server endpoint is enabled. EndpointPublicAccess bool // The CIDR blocks that are allowed access to your cluster's public Kubernetes API - // server endpoint. Communication to the endpoint from addresses outside of the - // listed CIDR blocks is denied. The default value is 0.0.0.0/0 . If you've - // disabled private endpoint access and you have nodes or Fargate pods in the - // cluster, then ensure that the necessary CIDR blocks are listed. For more - // information, see Amazon EKS cluster endpoint access control (https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) - // in the Amazon EKS User Guide . + // server endpoint. PublicAccessCidrs []string // The security groups associated with the cross-account elastic network diff --git a/service/eks/validators.go b/service/eks/validators.go index f92ded1acb6..09574f50bbc 100644 --- a/service/eks/validators.go +++ b/service/eks/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAssociateAccessPolicy struct { +} + +func (*validateOpAssociateAccessPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateAccessPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateAccessPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateAccessPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpAssociateEncryptionConfig struct { } @@ -50,6 +70,26 @@ func (m *validateOpAssociateIdentityProviderConfig) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpCreateAccessEntry struct { +} + +func (*validateOpCreateAccessEntry) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAccessEntryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAccessEntryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateAddon struct { } @@ -170,6 +210,26 @@ func (m *validateOpCreatePodIdentityAssociation) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpDeleteAccessEntry struct { +} + +func (*validateOpDeleteAccessEntry) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAccessEntryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAccessEntryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteAddon struct { } @@ -310,6 +370,26 @@ func (m *validateOpDeregisterCluster) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpDescribeAccessEntry struct { +} + +func (*validateOpDescribeAccessEntry) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeAccessEntryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeAccessEntryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeAddonConfiguration struct { } @@ -490,6 +570,26 @@ func (m *validateOpDescribeUpdate) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpDisassociateAccessPolicy struct { +} + +func (*validateOpDisassociateAccessPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateAccessPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateAccessPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateAccessPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDisassociateIdentityProviderConfig struct { } @@ -510,6 +610,26 @@ func (m *validateOpDisassociateIdentityProviderConfig) HandleInitialize(ctx cont return next.HandleInitialize(ctx, in) } +type validateOpListAccessEntries struct { +} + +func (*validateOpListAccessEntries) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAccessEntries) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAccessEntriesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAccessEntriesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListAddons struct { } @@ -530,6 +650,26 @@ func (m *validateOpListAddons) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpListAssociatedAccessPolicies struct { +} + +func (*validateOpListAssociatedAccessPolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAssociatedAccessPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAssociatedAccessPoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAssociatedAccessPoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListFargateProfiles struct { } @@ -710,6 +850,26 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateAccessEntry struct { +} + +func (*validateOpUpdateAccessEntry) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAccessEntryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAccessEntryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateAddon struct { } @@ -850,6 +1010,10 @@ func (m *validateOpUpdatePodIdentityAssociation) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +func addOpAssociateAccessPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateAccessPolicy{}, middleware.After) +} + func addOpAssociateEncryptionConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateEncryptionConfig{}, middleware.After) } @@ -858,6 +1022,10 @@ func addOpAssociateIdentityProviderConfigValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpAssociateIdentityProviderConfig{}, middleware.After) } +func addOpCreateAccessEntryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAccessEntry{}, middleware.After) +} + func addOpCreateAddonValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateAddon{}, middleware.After) } @@ -882,6 +1050,10 @@ func addOpCreatePodIdentityAssociationValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpCreatePodIdentityAssociation{}, middleware.After) } +func addOpDeleteAccessEntryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAccessEntry{}, middleware.After) +} + func addOpDeleteAddonValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAddon{}, middleware.After) } @@ -910,6 +1082,10 @@ func addOpDeregisterClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeregisterCluster{}, middleware.After) } +func addOpDescribeAccessEntryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeAccessEntry{}, middleware.After) +} + func addOpDescribeAddonConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeAddonConfiguration{}, middleware.After) } @@ -946,14 +1122,26 @@ func addOpDescribeUpdateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeUpdate{}, middleware.After) } +func addOpDisassociateAccessPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateAccessPolicy{}, middleware.After) +} + func addOpDisassociateIdentityProviderConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociateIdentityProviderConfig{}, middleware.After) } +func addOpListAccessEntriesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAccessEntries{}, middleware.After) +} + func addOpListAddonsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAddons{}, middleware.After) } +func addOpListAssociatedAccessPoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAssociatedAccessPolicies{}, middleware.After) +} + func addOpListFargateProfilesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListFargateProfiles{}, middleware.After) } @@ -990,6 +1178,10 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func addOpUpdateAccessEntryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAccessEntry{}, middleware.After) +} + func addOpUpdateAddonValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateAddon{}, middleware.After) } @@ -1093,6 +1285,30 @@ func validateOutpostConfigRequest(v *types.OutpostConfigRequest) error { } } +func validateOpAssociateAccessPolicyInput(v *AssociateAccessPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateAccessPolicyInput"} + if v.ClusterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterName")) + } + if v.PrincipalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) + } + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if v.AccessScope == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessScope")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpAssociateEncryptionConfigInput(v *AssociateEncryptionConfigInput) error { if v == nil { return nil @@ -1133,6 +1349,24 @@ func validateOpAssociateIdentityProviderConfigInput(v *AssociateIdentityProvider } } +func validateOpCreateAccessEntryInput(v *CreateAccessEntryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAccessEntryInput"} + if v.ClusterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterName")) + } + if v.PrincipalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateAddonInput(v *CreateAddonInput) error { if v == nil { return nil @@ -1264,6 +1498,24 @@ func validateOpCreatePodIdentityAssociationInput(v *CreatePodIdentityAssociation } } +func validateOpDeleteAccessEntryInput(v *DeleteAccessEntryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAccessEntryInput"} + if v.ClusterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterName")) + } + if v.PrincipalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteAddonInput(v *DeleteAddonInput) error { if v == nil { return nil @@ -1381,6 +1633,24 @@ func validateOpDeregisterClusterInput(v *DeregisterClusterInput) error { } } +func validateOpDescribeAccessEntryInput(v *DescribeAccessEntryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeAccessEntryInput"} + if v.ClusterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterName")) + } + if v.PrincipalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeAddonConfigurationInput(v *DescribeAddonConfigurationInput) error { if v == nil { return nil @@ -1541,6 +1811,27 @@ func validateOpDescribeUpdateInput(v *DescribeUpdateInput) error { } } +func validateOpDisassociateAccessPolicyInput(v *DisassociateAccessPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateAccessPolicyInput"} + if v.ClusterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterName")) + } + if v.PrincipalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) + } + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDisassociateIdentityProviderConfigInput(v *DisassociateIdentityProviderConfigInput) error { if v == nil { return nil @@ -1563,6 +1854,21 @@ func validateOpDisassociateIdentityProviderConfigInput(v *DisassociateIdentityPr } } +func validateOpListAccessEntriesInput(v *ListAccessEntriesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAccessEntriesInput"} + if v.ClusterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListAddonsInput(v *ListAddonsInput) error { if v == nil { return nil @@ -1578,6 +1884,24 @@ func validateOpListAddonsInput(v *ListAddonsInput) error { } } +func validateOpListAssociatedAccessPoliciesInput(v *ListAssociatedAccessPoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAssociatedAccessPoliciesInput"} + if v.ClusterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterName")) + } + if v.PrincipalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListFargateProfilesInput(v *ListFargateProfilesInput) error { if v == nil { return nil @@ -1726,6 +2050,24 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { } } +func validateOpUpdateAccessEntryInput(v *UpdateAccessEntryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAccessEntryInput"} + if v.ClusterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterName")) + } + if v.PrincipalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateAddonInput(v *UpdateAddonInput) error { if v == nil { return nil diff --git a/service/identitystore/internal/endpoints/endpoints.go b/service/identitystore/internal/endpoints/endpoints.go index 59c0c424a6e..a452f7d5cc6 100644 --- a/service/identitystore/internal/endpoints/endpoints.go +++ b/service/identitystore/internal/endpoints/endpoints.go @@ -193,6 +193,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/service/quicksight/api_op_CreateGroup.go b/service/quicksight/api_op_CreateGroup.go index 0f8363b801f..41de9b22559 100644 --- a/service/quicksight/api_op_CreateGroup.go +++ b/service/quicksight/api_op_CreateGroup.go @@ -14,8 +14,9 @@ import ( // Use the CreateGroup operation to create a group in Amazon QuickSight. You can // create up to 10,000 groups in a namespace. If you want to create more than -// 10,000 groups in a namespace, contact AWS Support. The permissions resource is -// arn:aws:quicksight:::group/default/ . The response is a group object. +// 10,000 groups in a namespace, contact Amazon Web Services Support. The +// permissions resource is arn:aws:quicksight:::group/default/ . The response is a +// group object. func (c *Client) CreateGroup(ctx context.Context, params *CreateGroupInput, optFns ...func(*Options)) (*CreateGroupOutput, error) { if params == nil { params = &CreateGroupInput{} diff --git a/service/route53resolver/api_op_CreateOutpostResolver.go b/service/route53resolver/api_op_CreateOutpostResolver.go index 19e474b8210..e2effa0e15a 100644 --- a/service/route53resolver/api_op_CreateOutpostResolver.go +++ b/service/route53resolver/api_op_CreateOutpostResolver.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates an Route 53 Resolver on an Outpost. +// Creates a Route 53 Resolver on an Outpost. func (c *Client) CreateOutpostResolver(ctx context.Context, params *CreateOutpostResolverInput, optFns ...func(*Options)) (*CreateOutpostResolverOutput, error) { if params == nil { params = &CreateOutpostResolverInput{} diff --git a/service/route53resolver/api_op_CreateResolverEndpoint.go b/service/route53resolver/api_op_CreateResolverEndpoint.go index 7d0b361dbba..7e88a64e59b 100644 --- a/service/route53resolver/api_op_CreateResolverEndpoint.go +++ b/service/route53resolver/api_op_CreateResolverEndpoint.go @@ -53,7 +53,8 @@ type CreateResolverEndpointInput struct { // The subnets and IP addresses in your VPC that DNS queries originate from (for // outbound endpoints) or that you forward DNS queries to (for inbound endpoints). - // The subnet ID uniquely identifies a VPC. + // The subnet ID uniquely identifies a VPC. Even though the minimum is 1, Route 53 + // requires that you create at least two. // // This member is required. IpAddresses []types.IpAddressRequest @@ -80,6 +81,22 @@ type CreateResolverEndpointInput struct { // OutpostArn . PreferredInstanceType *string + // The protocols you want to use for the endpoint. DoH-FIPS is applicable for + // inbound endpoints only. For an inbound endpoint you can apply the protocols as + // follows: + // - Do53 and DoH in combination. + // - Do53 and DoH-FIPS in combination. + // - Do53 alone. + // - DoH alone. + // - DoH-FIPS alone. + // - None, which is treated as Do53. + // For an outbound endpoint you can apply the protocols as follows: + // - Do53 and DoH in combination. + // - Do53 alone. + // - DoH alone. + // - None, which is treated as Do53. + Protocols []types.Protocol + // For the endpoint type you can choose either IPv4, IPv6, or dual-stack. A // dual-stack endpoint means that it will resolve via both IPv4 and IPv6. This // endpoint type is applied to all IP addresses. diff --git a/service/route53resolver/api_op_CreateResolverRule.go b/service/route53resolver/api_op_CreateResolverRule.go index a1b81b7e4cd..b46160112ff 100644 --- a/service/route53resolver/api_op_CreateResolverRule.go +++ b/service/route53resolver/api_op_CreateResolverRule.go @@ -39,14 +39,6 @@ type CreateResolverRuleInput struct { // This member is required. CreatorRequestId *string - // DNS queries for this domain name are forwarded to the IP addresses that you - // specify in TargetIps . If a query matches multiple Resolver rules (example.com - // and www.example.com), outbound DNS queries are routed using the Resolver rule - // that contains the most specific domain name (www.example.com). - // - // This member is required. - DomainName *string - // When you want to forward DNS queries for specified domain name to resolvers on // your network, specify FORWARD . When you have a forwarding rule to forward DNS // queries for a domain to your network and you want Resolver to process queries @@ -59,6 +51,12 @@ type CreateResolverRuleInput struct { // This member is required. RuleType types.RuleTypeOption + // DNS queries for this domain name are forwarded to the IP addresses that you + // specify in TargetIps . If a query matches multiple Resolver rules (example.com + // and www.example.com), outbound DNS queries are routed using the Resolver rule + // that contains the most specific domain name (www.example.com). + DomainName *string + // A friendly name that lets you easily find a rule in the Resolver dashboard in // the Route 53 console. Name *string diff --git a/service/route53resolver/api_op_ListResolverDnssecConfigs.go b/service/route53resolver/api_op_ListResolverDnssecConfigs.go index dc2d09a01a4..035f68ef90e 100644 --- a/service/route53resolver/api_op_ListResolverDnssecConfigs.go +++ b/service/route53resolver/api_op_ListResolverDnssecConfigs.go @@ -62,7 +62,8 @@ type ListResolverDnssecConfigsOutput struct { // An array that contains one ResolverDnssecConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ResolverDnssecConfig.html) // element for each configuration for DNSSEC validation that is associated with the - // current Amazon Web Services account. + // current Amazon Web Services account. It doesn't contain disabled DNSSEC + // configurations for the resource. ResolverDnssecConfigs []types.ResolverDnssecConfig // Metadata pertaining to the operation's result. diff --git a/service/route53resolver/api_op_UpdateResolverEndpoint.go b/service/route53resolver/api_op_UpdateResolverEndpoint.go index 0a0966ee68a..f5ca5c6c7e9 100644 --- a/service/route53resolver/api_op_UpdateResolverEndpoint.go +++ b/service/route53resolver/api_op_UpdateResolverEndpoint.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the name, or enpoint type for an inbound or an outbound Resolver +// Updates the name, or endpoint type for an inbound or an outbound Resolver // endpoint. You can only update between IPV4 and DUALSTACK, IPV6 endpoint type // can't be updated to other type. func (c *Client) UpdateResolverEndpoint(ctx context.Context, params *UpdateResolverEndpointInput, optFns ...func(*Options)) (*UpdateResolverEndpointOutput, error) { @@ -40,6 +40,28 @@ type UpdateResolverEndpointInput struct { // The name of the Resolver endpoint that you want to update. Name *string + // The protocols you want to use for the endpoint. DoH-FIPS is applicable for + // inbound endpoints only. For an inbound endpoint you can apply the protocols as + // follows: + // - Do53 and DoH in combination. + // - Do53 and DoH-FIPS in combination. + // - Do53 alone. + // - DoH alone. + // - DoH-FIPS alone. + // - None, which is treated as Do53. + // For an outbound endpoint you can apply the protocols as follows: + // - Do53 and DoH in combination. + // - Do53 alone. + // - DoH alone. + // - None, which is treated as Do53. + // You can't change the protocol of an inbound endpoint directly from only Do53 to + // only DoH, or DoH-FIPS. This is to prevent a sudden disruption to incoming + // traffic that relies on Do53. To change the protocol from Do53 to DoH, or + // DoH-FIPS, you must first enable both Do53 and DoH, or Do53 and DoH-FIPS, to make + // sure that all incoming traffic has transferred to using the DoH protocol, or + // DoH-FIPS, and then remove the Do53. + Protocols []types.Protocol + // Specifies the endpoint type for what type of IP address the endpoint uses to // forward DNS queries. Updating to IPV6 type isn't currently supported. ResolverEndpointType types.ResolverEndpointType diff --git a/service/route53resolver/deserializers.go b/service/route53resolver/deserializers.go index 6fbb8f4cbf8..a43b1d56ccb 100644 --- a/service/route53resolver/deserializers.go +++ b/service/route53resolver/deserializers.go @@ -1136,6 +1136,9 @@ func awsAwsjson11_deserializeOpErrorCreateResolverEndpoint(response *smithyhttp. } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) @@ -1397,6 +1400,9 @@ func awsAwsjson11_deserializeOpErrorCreateResolverRule(response *smithyhttp.Resp } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) @@ -8351,6 +8357,9 @@ func awsAwsjson11_deserializeOpErrorUpdateResolverEndpoint(response *smithyhttp. } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) @@ -8474,6 +8483,9 @@ func awsAwsjson11_deserializeOpErrorUpdateResolverRule(response *smithyhttp.Resp } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) @@ -10775,6 +10787,42 @@ func awsAwsjson11_deserializeDocumentOutpostResolverList(v *[]types.OutpostResol return nil } +func awsAwsjson11_deserializeDocumentProtocolList(v *[]types.Protocol, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Protocol + if *v == nil { + cv = []types.Protocol{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Protocol + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Protocol to be of type string, got %T instead", value) + } + col = types.Protocol(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentResolverConfig(v **types.ResolverConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11102,6 +11150,11 @@ func awsAwsjson11_deserializeDocumentResolverEndpoint(v **types.ResolverEndpoint sv.PreferredInstanceType = ptr.String(jtv) } + case "Protocols": + if err := awsAwsjson11_deserializeDocumentProtocolList(&sv.Protocols, value); err != nil { + return err + } + case "ResolverEndpointType": if value != nil { jtv, ok := value.(string) @@ -12178,6 +12231,15 @@ func awsAwsjson11_deserializeDocumentTargetAddress(v **types.TargetAddress, valu sv.Port = ptr.Int32(int32(i64)) } + case "Protocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Protocol to be of type string, got %T instead", value) + } + sv.Protocol = types.Protocol(jtv) + } + default: _, _ = key, value diff --git a/service/route53resolver/endpoints.go b/service/route53resolver/endpoints.go index 322f9e11933..5681279e1de 100644 --- a/service/route53resolver/endpoints.go +++ b/service/route53resolver/endpoints.go @@ -366,7 +366,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { if _Region == "us-gov-east-1" { uriString := "https://route53resolver.us-gov-east-1.amazonaws.com" diff --git a/service/route53resolver/serializers.go b/service/route53resolver/serializers.go index 68167a294fa..80992a9fb1e 100644 --- a/service/route53resolver/serializers.go +++ b/service/route53resolver/serializers.go @@ -3870,6 +3870,17 @@ func awsAwsjson11_serializeDocumentIpAddressUpdate(v *types.IpAddressUpdate, val return nil } +func awsAwsjson11_serializeDocumentProtocolList(v []types.Protocol, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsAwsjson11_serializeDocumentResolverRuleConfig(v *types.ResolverRuleConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3965,6 +3976,11 @@ func awsAwsjson11_serializeDocumentTargetAddress(v *types.TargetAddress, value s ok.Integer(*v.Port) } + if len(v.Protocol) > 0 { + ok := object.Key("Protocol") + ok.String(string(v.Protocol)) + } + return nil } @@ -4293,6 +4309,13 @@ func awsAwsjson11_serializeOpDocumentCreateResolverEndpointInput(v *CreateResolv ok.String(*v.PreferredInstanceType) } + if v.Protocols != nil { + ok := object.Key("Protocols") + if err := awsAwsjson11_serializeDocumentProtocolList(v.Protocols, ok); err != nil { + return err + } + } + if len(v.ResolverEndpointType) > 0 { ok := object.Key("ResolverEndpointType") ok.String(string(v.ResolverEndpointType)) @@ -5414,6 +5437,13 @@ func awsAwsjson11_serializeOpDocumentUpdateResolverEndpointInput(v *UpdateResolv ok.String(*v.Name) } + if v.Protocols != nil { + ok := object.Key("Protocols") + if err := awsAwsjson11_serializeDocumentProtocolList(v.Protocols, ok); err != nil { + return err + } + } + if v.ResolverEndpointId != nil { ok := object.Key("ResolverEndpointId") ok.String(*v.ResolverEndpointId) diff --git a/service/route53resolver/types/enums.go b/service/route53resolver/types/enums.go index 6840af9c396..d08d7235348 100644 --- a/service/route53resolver/types/enums.go +++ b/service/route53resolver/types/enums.go @@ -285,6 +285,26 @@ func (OutpostResolverStatus) Values() []OutpostResolverStatus { } } +type Protocol string + +// Enum values for Protocol +const ( + ProtocolDoh Protocol = "DoH" + ProtocolDo53 Protocol = "Do53" + ProtocolDohfips Protocol = "DoH-FIPS" +) + +// Values returns all known values for Protocol. 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 (Protocol) Values() []Protocol { + return []Protocol{ + "DoH", + "Do53", + "DoH-FIPS", + } +} + type ResolverAutodefinedReverseStatus string // Enum values for ResolverAutodefinedReverseStatus diff --git a/service/route53resolver/types/errors.go b/service/route53resolver/types/errors.go index 92a7d69295a..20d87349919 100644 --- a/service/route53resolver/types/errors.go +++ b/service/route53resolver/types/errors.go @@ -438,8 +438,8 @@ func (e *UnknownResourceException) ErrorCode() string { } func (e *UnknownResourceException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// You have provided an invalid command. Supported values are ADD , REMOVE , or -// REPLACE a domain. +// You have provided an invalid command. If you ran the UpdateFirewallDomains +// request. supported values are ADD , REMOVE , or REPLACE a domain. type ValidationException struct { Message *string diff --git a/service/route53resolver/types/types.go b/service/route53resolver/types/types.go index 6c5d7f49d43..dfa1050b70e 100644 --- a/service/route53resolver/types/types.go +++ b/service/route53resolver/types/types.go @@ -658,6 +658,21 @@ type ResolverEndpoint struct { // The Amazon EC2 instance type. PreferredInstanceType *string + // Protocols used for the endpoint. DoH-FIPS is applicable for inbound endpoints + // only. For an inbound endpoint you can apply the protocols as follows: + // - Do53 and DoH in combination. + // - Do53 and DoH-FIPS in combination. + // - Do53 alone. + // - DoH alone. + // - DoH-FIPS alone. + // - None, which is treated as Do53. + // For an outbound endpoint you can apply the protocols as follows: + // - Do53 and DoH in combination. + // - Do53 alone. + // - DoH alone. + // - None, which is treated as Do53. + Protocols []Protocol + // The Resolver endpoint IP address type. ResolverEndpointType ResolverEndpointType @@ -970,6 +985,21 @@ type TargetAddress struct { // The port at Ip that you want to forward DNS queries to. Port *int32 + // The protocols for the Resolver endpoints. DoH-FIPS is applicable for inbound + // endpoints only. For an inbound endpoint you can apply the protocols as follows: + // - Do53 and DoH in combination. + // - Do53 and DoH-FIPS in combination. + // - Do53 alone. + // - DoH alone. + // - DoH-FIPS alone. + // - None, which is treated as Do53. + // For an outbound endpoint you can apply the protocols as follows: + // - Do53 and DoH in combination. + // - Do53 alone. + // - DoH alone. + // - None, which is treated as Do53. + Protocol Protocol + noSmithyDocumentSerde } diff --git a/service/route53resolver/validators.go b/service/route53resolver/validators.go index 7c3893fad48..20edcc2f293 100644 --- a/service/route53resolver/validators.go +++ b/service/route53resolver/validators.go @@ -1717,9 +1717,6 @@ func validateOpCreateResolverRuleInput(v *CreateResolverRuleInput) error { if len(v.RuleType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("RuleType")) } - if v.DomainName == nil { - invalidParams.Add(smithy.NewErrParamRequired("DomainName")) - } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) diff --git a/service/s3/internal/endpoints/endpoints.go b/service/s3/internal/endpoints/endpoints.go index c7e5f6d2b26..9f44baac892 100644 --- a/service/s3/internal/endpoints/endpoints.go +++ b/service/s3/internal/endpoints/endpoints.go @@ -632,15 +632,61 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-iso-east-1", + }: endpoints.Endpoint{ + Hostname: "s3-fips.us-iso-east-1.c2s.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-iso-west-1", + }: endpoints.Endpoint{ + Hostname: "s3-fips.us-iso-west-1.c2s.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-iso-east-1", }: endpoints.Endpoint{ Protocols: []string{"http", "https"}, SignatureVersions: []string{"s3v4"}, }, + endpoints.EndpointKey{ + Region: "us-iso-east-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "s3-fips.dualstack.us-iso-east-1.c2s.ic.gov", + Protocols: []string{"http", "https"}, + SignatureVersions: []string{"s3v4"}, + }, + endpoints.EndpointKey{ + Region: "us-iso-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "s3-fips.us-iso-east-1.c2s.ic.gov", + Protocols: []string{"http", "https"}, + SignatureVersions: []string{"s3v4"}, + }, endpoints.EndpointKey{ Region: "us-iso-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "s3-fips.dualstack.us-iso-west-1.c2s.ic.gov", + }, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "s3-fips.us-iso-west-1.c2s.ic.gov", + }, }, }, { @@ -664,9 +710,30 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-isob-east-1", + }: endpoints.Endpoint{ + Hostname: "s3-fips.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-isob-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-east-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "s3-fips.dualstack.us-isob-east-1.sc2s.sgov.gov", + }, + endpoints.EndpointKey{ + Region: "us-isob-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "s3-fips.us-isob-east-1.sc2s.sgov.gov", + }, }, }, { diff --git a/service/s3control/internal/endpoints/s3/endpoints.go b/service/s3control/internal/endpoints/s3/endpoints.go index 694c175bb5e..61089461c29 100644 --- a/service/s3control/internal/endpoints/s3/endpoints.go +++ b/service/s3control/internal/endpoints/s3/endpoints.go @@ -630,15 +630,61 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-iso-east-1", + }: endpoints.Endpoint{ + Hostname: "s3-fips.us-iso-east-1.c2s.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-iso-west-1", + }: endpoints.Endpoint{ + Hostname: "s3-fips.us-iso-west-1.c2s.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-iso-east-1", }: endpoints.Endpoint{ Protocols: []string{"http", "https"}, SignatureVersions: []string{"s3v4"}, }, + endpoints.EndpointKey{ + Region: "us-iso-east-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "s3-fips.dualstack.us-iso-east-1.c2s.ic.gov", + Protocols: []string{"http", "https"}, + SignatureVersions: []string{"s3v4"}, + }, + endpoints.EndpointKey{ + Region: "us-iso-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "s3-fips.us-iso-east-1.c2s.ic.gov", + Protocols: []string{"http", "https"}, + SignatureVersions: []string{"s3v4"}, + }, endpoints.EndpointKey{ Region: "us-iso-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "s3-fips.dualstack.us-iso-west-1.c2s.ic.gov", + }, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "s3-fips.us-iso-west-1.c2s.ic.gov", + }, }, }, { @@ -662,9 +708,30 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-isob-east-1", + }: endpoints.Endpoint{ + Hostname: "s3-fips.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-isob-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-east-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "s3-fips.dualstack.us-isob-east-1.sc2s.sgov.gov", + }, + endpoints.EndpointKey{ + Region: "us-isob-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "s3-fips.us-isob-east-1.sc2s.sgov.gov", + }, }, }, {