repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the name and/or the path of the specified IAM group. You should // understand the implications of changing a group's path or name. For more // information, see Renaming users and groups (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html) // in the IAM User Guide. The person making the request (the principal), must have // permission to change the role group with the old name and the new name. For // example, to change the group named Managers to MGRs , the principal must have a // policy that allows them to update both groups. If the principal has permission // to update the Managers group, but not the MGRs group, then the update fails. // For more information about permissions, see Access management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) // . func (c *Client) UpdateGroup(ctx context.Context, params *UpdateGroupInput, optFns ...func(*Options)) (*UpdateGroupOutput, error) { if params == nil { params = &UpdateGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateGroup", params, optFns, c.addOperationUpdateGroupMiddlewares) if err != nil { return nil, err } out := result.(*UpdateGroupOutput) out.ResultMetadata = metadata return out, nil } type UpdateGroupInput struct { // Name of the IAM group to update. If you're changing the name of the group, this // is the original name. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) // ) a string of characters consisting of upper and lowercase alphanumeric // characters with no spaces. You can also include any of the following characters: // _+=,.@- // // This member is required. GroupName *string // New name for the IAM group. Only include this if changing the group's name. IAM // user, group, role, and policy names must be unique within the account. Names are // not distinguished by case. For example, you cannot create resources named both // "MyResource" and "myresource". NewGroupName *string // New path for the IAM group. Only include this if changing the group's path. // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) // ) a string of characters consisting of either a forward slash (/) by itself or a // string that must begin and end with forward slashes. In addition, it can contain // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), // including most punctuation characters, digits, and upper and lowercased letters. NewPath *string noSmithyDocumentSerde } type UpdateGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateGroup{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGroup(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateGroup", } }
147
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Changes the password for the specified IAM user. You can use the CLI, the // Amazon Web Services API, or the Users page in the IAM console to change the // password for any IAM user. Use ChangePassword to change your own password in // the My Security Credentials page in the Amazon Web Services Management Console. // For more information about modifying passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) // in the IAM User Guide. func (c *Client) UpdateLoginProfile(ctx context.Context, params *UpdateLoginProfileInput, optFns ...func(*Options)) (*UpdateLoginProfileOutput, error) { if params == nil { params = &UpdateLoginProfileInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateLoginProfile", params, optFns, c.addOperationUpdateLoginProfileMiddlewares) if err != nil { return nil, err } out := result.(*UpdateLoginProfileOutput) out.ResultMetadata = metadata return out, nil } type UpdateLoginProfileInput struct { // The name of the user whose password you want to update. This parameter allows // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of // characters consisting of upper and lowercase alphanumeric characters with no // spaces. You can also include any of the following characters: _+=,.@- // // This member is required. UserName *string // The new password for the specified IAM user. The regex pattern (http://wikipedia.org/wiki/regex) // used to validate this parameter is a string of characters consisting of the // following: // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // However, the format can be further restricted by the account administrator by // setting a password policy on the Amazon Web Services account. For more // information, see UpdateAccountPasswordPolicy . Password *string // Allows this new password to be used only once by requiring the specified IAM // user to set a new password on next sign-in. PasswordResetRequired *bool noSmithyDocumentSerde } type UpdateLoginProfileOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateLoginProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateLoginProfile{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateLoginProfile{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateLoginProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLoginProfile(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateLoginProfile(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateLoginProfile", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Replaces the existing list of server certificate thumbprints associated with an // OpenID Connect (OIDC) provider resource object with a new list of thumbprints. // The list that you pass with this operation completely replaces the existing list // of thumbprints. (The lists are not merged.) Typically, you need to update a // thumbprint only when the identity provider certificate changes, which occurs // rarely. However, if the provider's certificate does change, any attempt to // assume an IAM role that specifies the OIDC provider as a principal fails until // the certificate thumbprint is updated. Amazon Web Services secures communication // with some OIDC identity providers (IdPs) through our library of trusted // certificate authorities (CAs) instead of using a certificate thumbprint to // verify your IdP server certificate. These OIDC IdPs include Google, Auth0, and // those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. // In these cases, your legacy thumbprint remains in your configuration, but is no // longer used for validation. Trust for the OIDC provider is derived from the // provider certificate and is validated by the thumbprint. Therefore, it is best // to limit access to the UpdateOpenIDConnectProviderThumbprint operation to // highly privileged users. func (c *Client) UpdateOpenIDConnectProviderThumbprint(ctx context.Context, params *UpdateOpenIDConnectProviderThumbprintInput, optFns ...func(*Options)) (*UpdateOpenIDConnectProviderThumbprintOutput, error) { if params == nil { params = &UpdateOpenIDConnectProviderThumbprintInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateOpenIDConnectProviderThumbprint", params, optFns, c.addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares) if err != nil { return nil, err } out := result.(*UpdateOpenIDConnectProviderThumbprintOutput) out.ResultMetadata = metadata return out, nil } type UpdateOpenIDConnectProviderThumbprintInput struct { // The Amazon Resource Name (ARN) of the IAM OIDC provider resource object for // which you want to update the thumbprint. You can get a list of OIDC provider // ARNs by using the ListOpenIDConnectProviders operation. For more information // about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. // // This member is required. OpenIDConnectProviderArn *string // A list of certificate thumbprints that are associated with the specified IAM // OpenID Connect provider. For more information, see CreateOpenIDConnectProvider . // // This member is required. ThumbprintList []string noSmithyDocumentSerde } type UpdateOpenIDConnectProviderThumbprintOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateOpenIDConnectProviderThumbprint{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateOpenIDConnectProviderThumbprintValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOpenIDConnectProviderThumbprint(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateOpenIDConnectProviderThumbprint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateOpenIDConnectProviderThumbprint", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the description or maximum session duration setting of a role. func (c *Client) UpdateRole(ctx context.Context, params *UpdateRoleInput, optFns ...func(*Options)) (*UpdateRoleOutput, error) { if params == nil { params = &UpdateRoleInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRole", params, optFns, c.addOperationUpdateRoleMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRoleOutput) out.ResultMetadata = metadata return out, nil } type UpdateRoleInput struct { // The name of the role that you want to modify. // // This member is required. RoleName *string // The new description that you want to apply to the specified role. Description *string // The maximum session duration (in seconds) that you want to set for the // specified role. If you do not specify a value for this setting, the default // value of one hour is applied. This setting can have a value from 1 hour to 12 // hours. Anyone who assumes the role from the CLI or API can use the // DurationSeconds API parameter or the duration-seconds CLI parameter to request // a longer session. The MaxSessionDuration setting determines the maximum // duration that can be requested using the DurationSeconds parameter. If users // don't specify a value for the DurationSeconds parameter, their security // credentials are valid for one hour by default. This applies when you use the // AssumeRole* API operations or the assume-role* CLI operations but does not // apply when you use those operations to create a console URL. For more // information, see Using IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) // in the IAM User Guide. MaxSessionDuration *int32 noSmithyDocumentSerde } type UpdateRoleOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateRole{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateRole{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRoleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRole(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateRole", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Use UpdateRole instead. Modifies only the description of a role. This operation // performs the same function as the Description parameter in the UpdateRole // operation. func (c *Client) UpdateRoleDescription(ctx context.Context, params *UpdateRoleDescriptionInput, optFns ...func(*Options)) (*UpdateRoleDescriptionOutput, error) { if params == nil { params = &UpdateRoleDescriptionInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRoleDescription", params, optFns, c.addOperationUpdateRoleDescriptionMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRoleDescriptionOutput) out.ResultMetadata = metadata return out, nil } type UpdateRoleDescriptionInput struct { // The new description that you want to apply to the specified role. // // This member is required. Description *string // The name of the role that you want to modify. // // This member is required. RoleName *string noSmithyDocumentSerde } type UpdateRoleDescriptionOutput struct { // A structure that contains details about the modified role. Role *types.Role // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRoleDescriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateRoleDescription{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateRoleDescription{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRoleDescriptionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRoleDescription(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateRoleDescription(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateRoleDescription", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the metadata document for an existing SAML provider resource object. // This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) // . func (c *Client) UpdateSAMLProvider(ctx context.Context, params *UpdateSAMLProviderInput, optFns ...func(*Options)) (*UpdateSAMLProviderOutput, error) { if params == nil { params = &UpdateSAMLProviderInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateSAMLProvider", params, optFns, c.addOperationUpdateSAMLProviderMiddlewares) if err != nil { return nil, err } out := result.(*UpdateSAMLProviderOutput) out.ResultMetadata = metadata return out, nil } type UpdateSAMLProviderInput struct { // An XML document generated by an identity provider (IdP) that supports SAML 2.0. // The document includes the issuer's name, expiration information, and keys that // can be used to validate the SAML authentication response (assertions) that are // received from the IdP. You must generate the metadata document using the // identity management software that is used as your organization's IdP. // // This member is required. SAMLMetadataDocument *string // The Amazon Resource Name (ARN) of the SAML provider to update. For more // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. // // This member is required. SAMLProviderArn *string noSmithyDocumentSerde } // Contains the response to a successful UpdateSAMLProvider request. type UpdateSAMLProviderOutput struct { // The Amazon Resource Name (ARN) of the SAML provider that was updated. SAMLProviderArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateSAMLProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateSAMLProvider{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateSAMLProvider{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateSAMLProviderValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSAMLProvider(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateSAMLProvider(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateSAMLProvider", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the name and/or the path of the specified server certificate stored in // IAM. For more information about working with server certificates, see Working // with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) // in the IAM User Guide. This topic also includes a list of Amazon Web Services // services that can use the server certificates that you manage with IAM. You // should understand the implications of changing a server certificate's path or // name. For more information, see Renaming a server certificate (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#RenamingServerCerts) // in the IAM User Guide. The person making the request (the principal), must have // permission to change the server certificate with the old name and the new name. // For example, to change the certificate named ProductionCert to ProdCert , the // principal must have a policy that allows them to update both certificates. If // the principal has permission to update the ProductionCert group, but not the // ProdCert certificate, then the update fails. For more information about // permissions, see Access management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) // in the IAM User Guide. func (c *Client) UpdateServerCertificate(ctx context.Context, params *UpdateServerCertificateInput, optFns ...func(*Options)) (*UpdateServerCertificateOutput, error) { if params == nil { params = &UpdateServerCertificateInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateServerCertificate", params, optFns, c.addOperationUpdateServerCertificateMiddlewares) if err != nil { return nil, err } out := result.(*UpdateServerCertificateOutput) out.ResultMetadata = metadata return out, nil } type UpdateServerCertificateInput struct { // The name of the server certificate that you want to update. This parameter // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string // of characters consisting of upper and lowercase alphanumeric characters with no // spaces. You can also include any of the following characters: _+=,.@- // // This member is required. ServerCertificateName *string // The new path for the server certificate. Include this only if you are updating // the server certificate's path. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) // ) a string of characters consisting of either a forward slash (/) by itself or a // string that must begin and end with forward slashes. In addition, it can contain // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), // including most punctuation characters, digits, and upper and lowercased letters. NewPath *string // The new name for the server certificate. Include this only if you are updating // the server certificate's name. The name of the certificate cannot contain any // spaces. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) // ) a string of characters consisting of upper and lowercase alphanumeric // characters with no spaces. You can also include any of the following characters: // _+=,.@- NewServerCertificateName *string noSmithyDocumentSerde } type UpdateServerCertificateOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateServerCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateServerCertificate{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateServerCertificate{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateServerCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServerCertificate(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateServerCertificate(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateServerCertificate", } }
153
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Sets the status of a service-specific credential to Active or Inactive . // Service-specific credentials that are inactive cannot be used for authentication // to the service. This operation can be used to disable a user's service-specific // credential as part of a credential rotation work flow. func (c *Client) UpdateServiceSpecificCredential(ctx context.Context, params *UpdateServiceSpecificCredentialInput, optFns ...func(*Options)) (*UpdateServiceSpecificCredentialOutput, error) { if params == nil { params = &UpdateServiceSpecificCredentialInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateServiceSpecificCredential", params, optFns, c.addOperationUpdateServiceSpecificCredentialMiddlewares) if err != nil { return nil, err } out := result.(*UpdateServiceSpecificCredentialOutput) out.ResultMetadata = metadata return out, nil } type UpdateServiceSpecificCredentialInput struct { // The unique identifier of the service-specific credential. This parameter allows // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of // characters that can consist of any upper or lowercased letter or digit. // // This member is required. ServiceSpecificCredentialId *string // The status to be assigned to the service-specific credential. // // This member is required. Status types.StatusType // The name of the IAM user associated with the service-specific credential. If // you do not specify this value, then the operation assumes the user whose // credentials are used to call the operation. This parameter allows (through its // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters // consisting of upper and lowercase alphanumeric characters with no spaces. You // can also include any of the following characters: _+=,.@- UserName *string noSmithyDocumentSerde } type UpdateServiceSpecificCredentialOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateServiceSpecificCredentialMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateServiceSpecificCredential{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateServiceSpecificCredential{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServiceSpecificCredential(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateServiceSpecificCredential(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateServiceSpecificCredential", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Changes the status of the specified user signing certificate from active to // disabled, or vice versa. This operation can be used to disable an IAM user's // signing certificate as part of a certificate rotation work flow. If the UserName // field is not specified, the user name is determined implicitly based on the // Amazon Web Services access key ID used to sign the request. This operation works // for access keys under the Amazon Web Services account. Consequently, you can use // this operation to manage Amazon Web Services account root user credentials even // if the Amazon Web Services account has no associated users. func (c *Client) UpdateSigningCertificate(ctx context.Context, params *UpdateSigningCertificateInput, optFns ...func(*Options)) (*UpdateSigningCertificateOutput, error) { if params == nil { params = &UpdateSigningCertificateInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateSigningCertificate", params, optFns, c.addOperationUpdateSigningCertificateMiddlewares) if err != nil { return nil, err } out := result.(*UpdateSigningCertificateOutput) out.ResultMetadata = metadata return out, nil } type UpdateSigningCertificateInput struct { // The ID of the signing certificate you want to update. This parameter allows // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of // characters that can consist of any upper or lowercased letter or digit. // // This member is required. CertificateId *string // The status you want to assign to the certificate. Active means that the // certificate can be used for programmatic calls to Amazon Web Services Inactive // means that the certificate cannot be used. // // This member is required. Status types.StatusType // The name of the IAM user the signing certificate belongs to. This parameter // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string // of characters consisting of upper and lowercase alphanumeric characters with no // spaces. You can also include any of the following characters: _+=,.@- UserName *string noSmithyDocumentSerde } type UpdateSigningCertificateOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateSigningCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateSigningCertificate{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateSigningCertificate{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateSigningCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSigningCertificate(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateSigningCertificate(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateSigningCertificate", } }
143
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Sets the status of an IAM user's SSH public key to active or inactive. SSH // public keys that are inactive cannot be used for authentication. This operation // can be used to disable a user's SSH public key as part of a key rotation work // flow. The SSH public key affected by this operation is used only for // authenticating the associated IAM user to an CodeCommit repository. For more // information about using SSH keys to authenticate to an CodeCommit repository, // see Set up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) // in the CodeCommit User Guide. func (c *Client) UpdateSSHPublicKey(ctx context.Context, params *UpdateSSHPublicKeyInput, optFns ...func(*Options)) (*UpdateSSHPublicKeyOutput, error) { if params == nil { params = &UpdateSSHPublicKeyInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateSSHPublicKey", params, optFns, c.addOperationUpdateSSHPublicKeyMiddlewares) if err != nil { return nil, err } out := result.(*UpdateSSHPublicKeyOutput) out.ResultMetadata = metadata return out, nil } type UpdateSSHPublicKeyInput struct { // The unique identifier for the SSH public key. This parameter allows (through // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters // that can consist of any upper or lowercased letter or digit. // // This member is required. SSHPublicKeyId *string // The status to assign to the SSH public key. Active means that the key can be // used for authentication with an CodeCommit repository. Inactive means that the // key cannot be used. // // This member is required. Status types.StatusType // The name of the IAM user associated with the SSH public key. This parameter // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string // of characters consisting of upper and lowercase alphanumeric characters with no // spaces. You can also include any of the following characters: _+=,.@- // // This member is required. UserName *string noSmithyDocumentSerde } type UpdateSSHPublicKeyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateSSHPublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateSSHPublicKey{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateSSHPublicKey{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateSSHPublicKeyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSSHPublicKey(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateSSHPublicKey(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateSSHPublicKey", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the name and/or the path of the specified IAM user. You should // understand the implications of changing an IAM user's path or name. For more // information, see Renaming an IAM user (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_renaming) // and Renaming an IAM group (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_rename.html) // in the IAM User Guide. To change a user name, the requester must have // appropriate permissions on both the source object and the target object. For // example, to change Bob to Robert, the entity making the request must have // permission on Bob and Robert, or must have permission on all (*). For more // information about permissions, see Permissions and policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/PermissionsAndPolicies.html) // . func (c *Client) UpdateUser(ctx context.Context, params *UpdateUserInput, optFns ...func(*Options)) (*UpdateUserOutput, error) { if params == nil { params = &UpdateUserInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateUser", params, optFns, c.addOperationUpdateUserMiddlewares) if err != nil { return nil, err } out := result.(*UpdateUserOutput) out.ResultMetadata = metadata return out, nil } type UpdateUserInput struct { // Name of the user to update. If you're changing the name of the user, this is // the original user name. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) // ) a string of characters consisting of upper and lowercase alphanumeric // characters with no spaces. You can also include any of the following characters: // _+=,.@- // // This member is required. UserName *string // New path for the IAM user. Include this parameter only if you're changing the // user's path. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) // ) a string of characters consisting of either a forward slash (/) by itself or a // string that must begin and end with forward slashes. In addition, it can contain // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), // including most punctuation characters, digits, and upper and lowercased letters. NewPath *string // New name for the user. Include this parameter only if you're changing the // user's name. IAM user, group, role, and policy names must be unique within the // account. Names are not distinguished by case. For example, you cannot create // resources named both "MyResource" and "myresource". NewUserName *string noSmithyDocumentSerde } type UpdateUserOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateUser{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateUser{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateUser(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UpdateUser", } }
147
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Uploads a server certificate entity for the Amazon Web Services account. The // server certificate entity includes a public key certificate, a private key, and // an optional certificate chain, which should all be PEM-encoded. We recommend // that you use Certificate Manager (https://docs.aws.amazon.com/acm/) to // provision, manage, and deploy your server certificates. With ACM you can request // a certificate, deploy it to Amazon Web Services resources, and let ACM handle // certificate renewals for you. Certificates provided by ACM are free. For more // information about using ACM, see the Certificate Manager User Guide (https://docs.aws.amazon.com/acm/latest/userguide/) // . For more information about working with server certificates, see Working with // server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) // in the IAM User Guide. This topic includes a list of Amazon Web Services // services that can use the server certificates that you manage with IAM. For // information about the number of server certificates you can upload, see IAM and // STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) // in the IAM User Guide. Because the body of the public key certificate, private // key, and the certificate chain can be large, you should use POST rather than GET // when calling UploadServerCertificate . For information about setting up // signatures and authorization through the API, see Signing Amazon Web Services // API requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) // in the Amazon Web Services General Reference. For general information about // using the Query API with IAM, see Calling the API by making HTTP query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/programming.html) // in the IAM User Guide. func (c *Client) UploadServerCertificate(ctx context.Context, params *UploadServerCertificateInput, optFns ...func(*Options)) (*UploadServerCertificateOutput, error) { if params == nil { params = &UploadServerCertificateInput{} } result, metadata, err := c.invokeOperation(ctx, "UploadServerCertificate", params, optFns, c.addOperationUploadServerCertificateMiddlewares) if err != nil { return nil, err } out := result.(*UploadServerCertificateOutput) out.ResultMetadata = metadata return out, nil } type UploadServerCertificateInput struct { // The contents of the public key certificate in PEM-encoded format. The regex // pattern (http://wikipedia.org/wiki/regex) used to validate this parameter is a // string of characters consisting of the following: // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // // This member is required. CertificateBody *string // The contents of the private key in PEM-encoded format. The regex pattern (http://wikipedia.org/wiki/regex) // used to validate this parameter is a string of characters consisting of the // following: // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // // This member is required. PrivateKey *string // The name for the server certificate. Do not include the path in this value. The // name of the certificate cannot contain any spaces. This parameter allows // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of // characters consisting of upper and lowercase alphanumeric characters with no // spaces. You can also include any of the following characters: _+=,.@- // // This member is required. ServerCertificateName *string // The contents of the certificate chain. This is typically a concatenation of the // PEM-encoded public key certificates of the chain. The regex pattern (http://wikipedia.org/wiki/regex) // used to validate this parameter is a string of characters consisting of the // following: // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) CertificateChain *string // The path for the server certificate. For more information about paths, see IAM // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. This parameter is optional. If it is not included, it // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) // ) a string of characters consisting of either a forward slash (/) by itself or a // string that must begin and end with forward slashes. In addition, it can contain // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), // including most punctuation characters, digits, and upper and lowercased letters. // If you are uploading a server certificate specifically for use with Amazon // CloudFront distributions, you must specify a path using the path parameter. The // path must begin with /cloudfront and must include a trailing slash (for // example, /cloudfront/test/ ). Path *string // A list of tags that you want to attach to the new IAM server certificate // resource. Each tag consists of a key name and an associated value. For more // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. If any one of the tags is invalid or if you exceed the // allowed maximum number of tags, then the entire request fails and the resource // is not created. Tags []types.Tag noSmithyDocumentSerde } // Contains the response to a successful UploadServerCertificate request. type UploadServerCertificateOutput struct { // The meta information of the uploaded server certificate without its certificate // body, certificate chain, and private key. ServerCertificateMetadata *types.ServerCertificateMetadata // A list of tags that are attached to the new IAM server certificate. The // returned list of tags is sorted by tag key. For more information about tagging, // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. Tags []types.Tag // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUploadServerCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUploadServerCertificate{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUploadServerCertificate{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUploadServerCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadServerCertificate(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUploadServerCertificate(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UploadServerCertificate", } }
218
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Uploads an X.509 signing certificate and associates it with the specified IAM // user. Some Amazon Web Services services require you to use certificates to // validate requests that are signed with a corresponding private key. When you // upload the certificate, its default status is Active . For information about // when you would use an X.509 signing certificate, see Managing server // certificates in IAM (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) // in the IAM User Guide. If the UserName is not specified, the IAM user name is // determined implicitly based on the Amazon Web Services access key ID used to // sign the request. This operation works for access keys under the Amazon Web // Services account. Consequently, you can use this operation to manage Amazon Web // Services account root user credentials even if the Amazon Web Services account // has no associated users. Because the body of an X.509 certificate can be large, // you should use POST rather than GET when calling UploadSigningCertificate . For // information about setting up signatures and authorization through the API, see // Signing Amazon Web Services API requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) // in the Amazon Web Services General Reference. For general information about // using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) // in the IAM User Guide. func (c *Client) UploadSigningCertificate(ctx context.Context, params *UploadSigningCertificateInput, optFns ...func(*Options)) (*UploadSigningCertificateOutput, error) { if params == nil { params = &UploadSigningCertificateInput{} } result, metadata, err := c.invokeOperation(ctx, "UploadSigningCertificate", params, optFns, c.addOperationUploadSigningCertificateMiddlewares) if err != nil { return nil, err } out := result.(*UploadSigningCertificateOutput) out.ResultMetadata = metadata return out, nil } type UploadSigningCertificateInput struct { // The contents of the signing certificate. The regex pattern (http://wikipedia.org/wiki/regex) // used to validate this parameter is a string of characters consisting of the // following: // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // // This member is required. CertificateBody *string // The name of the user the signing certificate is for. This parameter allows // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of // characters consisting of upper and lowercase alphanumeric characters with no // spaces. You can also include any of the following characters: _+=,.@- UserName *string noSmithyDocumentSerde } // Contains the response to a successful UploadSigningCertificate request. type UploadSigningCertificateOutput struct { // Information about the certificate. // // This member is required. Certificate *types.SigningCertificate // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUploadSigningCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUploadSigningCertificate{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUploadSigningCertificate{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUploadSigningCertificateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadSigningCertificate(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUploadSigningCertificate(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UploadSigningCertificate", } }
159
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Uploads an SSH public key and associates it with the specified IAM user. The // SSH public key uploaded by this operation can be used only for authenticating // the associated IAM user to an CodeCommit repository. For more information about // using SSH keys to authenticate to an CodeCommit repository, see Set up // CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) // in the CodeCommit User Guide. func (c *Client) UploadSSHPublicKey(ctx context.Context, params *UploadSSHPublicKeyInput, optFns ...func(*Options)) (*UploadSSHPublicKeyOutput, error) { if params == nil { params = &UploadSSHPublicKeyInput{} } result, metadata, err := c.invokeOperation(ctx, "UploadSSHPublicKey", params, optFns, c.addOperationUploadSSHPublicKeyMiddlewares) if err != nil { return nil, err } out := result.(*UploadSSHPublicKeyOutput) out.ResultMetadata = metadata return out, nil } type UploadSSHPublicKeyInput struct { // The SSH public key. The public key must be encoded in ssh-rsa format or PEM // format. The minimum bit-length of the public key is 2048 bits. For example, you // can generate a 2048-bit key, and the resulting PEM file is 1679 bytes long. The // regex pattern (http://wikipedia.org/wiki/regex) used to validate this parameter // is a string of characters consisting of the following: // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // // This member is required. SSHPublicKeyBody *string // The name of the IAM user to associate the SSH public key with. This parameter // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string // of characters consisting of upper and lowercase alphanumeric characters with no // spaces. You can also include any of the following characters: _+=,.@- // // This member is required. UserName *string noSmithyDocumentSerde } // Contains the response to a successful UploadSSHPublicKey request. type UploadSSHPublicKeyOutput struct { // Contains information about the SSH public key. SSHPublicKey *types.SSHPublicKey // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUploadSSHPublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpUploadSSHPublicKey{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUploadSSHPublicKey{}, middleware.After) if err != nil { return err } if err = 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUploadSSHPublicKeyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadSSHPublicKey(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUploadSSHPublicKey(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "iam", OperationName: "UploadSSHPublicKey", } }
149
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package iam provides the API client, operations, and parameter types for AWS // Identity and Access Management. // // Identity and Access Management Identity and Access Management (IAM) is a web // service for securely controlling access to Amazon Web Services services. With // IAM, you can centrally manage users, security credentials such as access keys, // and permissions that control which Amazon Web Services resources users and // applications can access. For more information about IAM, see Identity and // Access Management (IAM) (http://aws.amazon.com/iam/) and the Identity and // Access Management User Guide (https://docs.aws.amazon.com/IAM/latest/UserGuide/) // . package iam
15
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "iam" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package iam // goModuleVersion is the tagged release for this module const goModuleVersion = "1.21.0"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/query" "github.com/aws/aws-sdk-go-v2/service/iam/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) type awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider struct { } func (*awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AddClientIDToOpenIDConnectProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("AddClientIDToOpenIDConnectProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentAddClientIDToOpenIDConnectProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpAddRoleToInstanceProfile struct { } func (*awsAwsquery_serializeOpAddRoleToInstanceProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpAddRoleToInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AddRoleToInstanceProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("AddRoleToInstanceProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentAddRoleToInstanceProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpAddUserToGroup struct { } func (*awsAwsquery_serializeOpAddUserToGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpAddUserToGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AddUserToGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("AddUserToGroup") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentAddUserToGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpAttachGroupPolicy struct { } func (*awsAwsquery_serializeOpAttachGroupPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpAttachGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AttachGroupPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("AttachGroupPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentAttachGroupPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpAttachRolePolicy struct { } func (*awsAwsquery_serializeOpAttachRolePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpAttachRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AttachRolePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("AttachRolePolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentAttachRolePolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpAttachUserPolicy struct { } func (*awsAwsquery_serializeOpAttachUserPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpAttachUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AttachUserPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("AttachUserPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentAttachUserPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpChangePassword struct { } func (*awsAwsquery_serializeOpChangePassword) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpChangePassword) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ChangePasswordInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ChangePassword") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentChangePasswordInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateAccessKey struct { } func (*awsAwsquery_serializeOpCreateAccessKey) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateAccessKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateAccessKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateAccessKey") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateAccessKeyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateAccountAlias struct { } func (*awsAwsquery_serializeOpCreateAccountAlias) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateAccountAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateAccountAliasInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateAccountAlias") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateAccountAliasInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateGroup struct { } func (*awsAwsquery_serializeOpCreateGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateGroup") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateInstanceProfile struct { } func (*awsAwsquery_serializeOpCreateInstanceProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateInstanceProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateInstanceProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateInstanceProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateLoginProfile struct { } func (*awsAwsquery_serializeOpCreateLoginProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateLoginProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateLoginProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateLoginProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateOpenIDConnectProvider struct { } func (*awsAwsquery_serializeOpCreateOpenIDConnectProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateOpenIDConnectProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateOpenIDConnectProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateOpenIDConnectProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreatePolicy struct { } func (*awsAwsquery_serializeOpCreatePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreatePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreatePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreatePolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreatePolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreatePolicyVersion struct { } func (*awsAwsquery_serializeOpCreatePolicyVersion) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreatePolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreatePolicyVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreatePolicyVersion") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreatePolicyVersionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateRole struct { } func (*awsAwsquery_serializeOpCreateRole) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateRole") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateRoleInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateSAMLProvider struct { } func (*awsAwsquery_serializeOpCreateSAMLProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateSAMLProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateSAMLProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateSAMLProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateServiceLinkedRole struct { } func (*awsAwsquery_serializeOpCreateServiceLinkedRole) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateServiceLinkedRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateServiceLinkedRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateServiceLinkedRole") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateServiceLinkedRoleInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateServiceSpecificCredential struct { } func (*awsAwsquery_serializeOpCreateServiceSpecificCredential) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateServiceSpecificCredentialInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateServiceSpecificCredential") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateServiceSpecificCredentialInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateUser struct { } func (*awsAwsquery_serializeOpCreateUser) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateUser") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateUserInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateVirtualMFADevice struct { } func (*awsAwsquery_serializeOpCreateVirtualMFADevice) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateVirtualMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateVirtualMFADeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateVirtualMFADevice") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentCreateVirtualMFADeviceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeactivateMFADevice struct { } func (*awsAwsquery_serializeOpDeactivateMFADevice) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeactivateMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeactivateMFADeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeactivateMFADevice") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeactivateMFADeviceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteAccessKey struct { } func (*awsAwsquery_serializeOpDeleteAccessKey) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteAccessKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteAccessKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteAccessKey") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteAccessKeyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteAccountAlias struct { } func (*awsAwsquery_serializeOpDeleteAccountAlias) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteAccountAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteAccountAliasInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteAccountAlias") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteAccountAliasInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteAccountPasswordPolicy struct { } func (*awsAwsquery_serializeOpDeleteAccountPasswordPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteAccountPasswordPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteAccountPasswordPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteAccountPasswordPolicy") body.Key("Version").String("2010-05-08") err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteGroup struct { } func (*awsAwsquery_serializeOpDeleteGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteGroup") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteGroupPolicy struct { } func (*awsAwsquery_serializeOpDeleteGroupPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteGroupPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteGroupPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteGroupPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteInstanceProfile struct { } func (*awsAwsquery_serializeOpDeleteInstanceProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteInstanceProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteInstanceProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteInstanceProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteLoginProfile struct { } func (*awsAwsquery_serializeOpDeleteLoginProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteLoginProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteLoginProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteLoginProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteOpenIDConnectProvider struct { } func (*awsAwsquery_serializeOpDeleteOpenIDConnectProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteOpenIDConnectProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteOpenIDConnectProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteOpenIDConnectProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeletePolicy struct { } func (*awsAwsquery_serializeOpDeletePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeletePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeletePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeletePolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeletePolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeletePolicyVersion struct { } func (*awsAwsquery_serializeOpDeletePolicyVersion) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeletePolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeletePolicyVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeletePolicyVersion") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeletePolicyVersionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteRole struct { } func (*awsAwsquery_serializeOpDeleteRole) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteRole") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteRoleInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteRolePermissionsBoundary struct { } func (*awsAwsquery_serializeOpDeleteRolePermissionsBoundary) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteRolePermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteRolePermissionsBoundaryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteRolePermissionsBoundary") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteRolePermissionsBoundaryInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteRolePolicy struct { } func (*awsAwsquery_serializeOpDeleteRolePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteRolePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteRolePolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteRolePolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteSAMLProvider struct { } func (*awsAwsquery_serializeOpDeleteSAMLProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteSAMLProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteSAMLProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteSAMLProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteServerCertificate struct { } func (*awsAwsquery_serializeOpDeleteServerCertificate) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteServerCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteServerCertificate") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteServerCertificateInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteServiceLinkedRole struct { } func (*awsAwsquery_serializeOpDeleteServiceLinkedRole) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteServiceLinkedRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteServiceLinkedRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteServiceLinkedRole") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteServiceLinkedRoleInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteServiceSpecificCredential struct { } func (*awsAwsquery_serializeOpDeleteServiceSpecificCredential) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteServiceSpecificCredentialInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteServiceSpecificCredential") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteServiceSpecificCredentialInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteSigningCertificate struct { } func (*awsAwsquery_serializeOpDeleteSigningCertificate) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteSigningCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteSigningCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteSigningCertificate") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteSigningCertificateInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteSSHPublicKey struct { } func (*awsAwsquery_serializeOpDeleteSSHPublicKey) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteSSHPublicKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteSSHPublicKey") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteSSHPublicKeyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteUser struct { } func (*awsAwsquery_serializeOpDeleteUser) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteUser") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteUserInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteUserPermissionsBoundary struct { } func (*awsAwsquery_serializeOpDeleteUserPermissionsBoundary) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteUserPermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteUserPermissionsBoundaryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteUserPermissionsBoundary") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteUserPermissionsBoundaryInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteUserPolicy struct { } func (*awsAwsquery_serializeOpDeleteUserPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteUserPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteUserPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteUserPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteVirtualMFADevice struct { } func (*awsAwsquery_serializeOpDeleteVirtualMFADevice) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteVirtualMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteVirtualMFADeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteVirtualMFADevice") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDeleteVirtualMFADeviceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDetachGroupPolicy struct { } func (*awsAwsquery_serializeOpDetachGroupPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDetachGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DetachGroupPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DetachGroupPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDetachGroupPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDetachRolePolicy struct { } func (*awsAwsquery_serializeOpDetachRolePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDetachRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DetachRolePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DetachRolePolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDetachRolePolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDetachUserPolicy struct { } func (*awsAwsquery_serializeOpDetachUserPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDetachUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DetachUserPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DetachUserPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentDetachUserPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpEnableMFADevice struct { } func (*awsAwsquery_serializeOpEnableMFADevice) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpEnableMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*EnableMFADeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("EnableMFADevice") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentEnableMFADeviceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGenerateCredentialReport struct { } func (*awsAwsquery_serializeOpGenerateCredentialReport) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGenerateCredentialReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GenerateCredentialReportInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GenerateCredentialReport") body.Key("Version").String("2010-05-08") err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGenerateOrganizationsAccessReport struct { } func (*awsAwsquery_serializeOpGenerateOrganizationsAccessReport) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGenerateOrganizationsAccessReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GenerateOrganizationsAccessReportInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GenerateOrganizationsAccessReport") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGenerateOrganizationsAccessReportInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGenerateServiceLastAccessedDetails struct { } func (*awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GenerateServiceLastAccessedDetailsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GenerateServiceLastAccessedDetails") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGenerateServiceLastAccessedDetailsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetAccessKeyLastUsed struct { } func (*awsAwsquery_serializeOpGetAccessKeyLastUsed) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetAccessKeyLastUsed) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetAccessKeyLastUsedInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetAccessKeyLastUsed") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetAccessKeyLastUsedInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetAccountAuthorizationDetails struct { } func (*awsAwsquery_serializeOpGetAccountAuthorizationDetails) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetAccountAuthorizationDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetAccountAuthorizationDetailsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetAccountAuthorizationDetails") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetAccountAuthorizationDetailsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetAccountPasswordPolicy struct { } func (*awsAwsquery_serializeOpGetAccountPasswordPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetAccountPasswordPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetAccountPasswordPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetAccountPasswordPolicy") body.Key("Version").String("2010-05-08") err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetAccountSummary struct { } func (*awsAwsquery_serializeOpGetAccountSummary) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetAccountSummary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetAccountSummaryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetAccountSummary") body.Key("Version").String("2010-05-08") err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetContextKeysForCustomPolicy struct { } func (*awsAwsquery_serializeOpGetContextKeysForCustomPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetContextKeysForCustomPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetContextKeysForCustomPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetContextKeysForCustomPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetContextKeysForCustomPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy struct { } func (*awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetContextKeysForPrincipalPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetContextKeysForPrincipalPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetContextKeysForPrincipalPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetCredentialReport struct { } func (*awsAwsquery_serializeOpGetCredentialReport) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetCredentialReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetCredentialReportInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetCredentialReport") body.Key("Version").String("2010-05-08") err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetGroup struct { } func (*awsAwsquery_serializeOpGetGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetGroup") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetGroupPolicy struct { } func (*awsAwsquery_serializeOpGetGroupPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetGroupPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetGroupPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetGroupPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetInstanceProfile struct { } func (*awsAwsquery_serializeOpGetInstanceProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetInstanceProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetInstanceProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetInstanceProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetLoginProfile struct { } func (*awsAwsquery_serializeOpGetLoginProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetLoginProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetLoginProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetLoginProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetMFADevice struct { } func (*awsAwsquery_serializeOpGetMFADevice) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetMFADeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetMFADevice") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetMFADeviceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetOpenIDConnectProvider struct { } func (*awsAwsquery_serializeOpGetOpenIDConnectProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetOpenIDConnectProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetOpenIDConnectProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetOpenIDConnectProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetOrganizationsAccessReport struct { } func (*awsAwsquery_serializeOpGetOrganizationsAccessReport) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetOrganizationsAccessReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetOrganizationsAccessReportInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetOrganizationsAccessReport") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetOrganizationsAccessReportInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetPolicy struct { } func (*awsAwsquery_serializeOpGetPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetPolicyVersion struct { } func (*awsAwsquery_serializeOpGetPolicyVersion) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetPolicyVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetPolicyVersion") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetPolicyVersionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetRole struct { } func (*awsAwsquery_serializeOpGetRole) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetRole") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetRoleInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetRolePolicy struct { } func (*awsAwsquery_serializeOpGetRolePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetRolePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetRolePolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetRolePolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetSAMLProvider struct { } func (*awsAwsquery_serializeOpGetSAMLProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetSAMLProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetSAMLProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetSAMLProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetServerCertificate struct { } func (*awsAwsquery_serializeOpGetServerCertificate) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetServerCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetServerCertificate") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetServerCertificateInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetServiceLastAccessedDetails struct { } func (*awsAwsquery_serializeOpGetServiceLastAccessedDetails) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetServiceLastAccessedDetailsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetServiceLastAccessedDetails") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetServiceLastAccessedDetailsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities struct { } func (*awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetServiceLastAccessedDetailsWithEntitiesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetServiceLastAccessedDetailsWithEntities") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetServiceLastAccessedDetailsWithEntitiesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus struct { } func (*awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetServiceLinkedRoleDeletionStatusInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetServiceLinkedRoleDeletionStatus") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetServiceLinkedRoleDeletionStatusInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetSSHPublicKey struct { } func (*awsAwsquery_serializeOpGetSSHPublicKey) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetSSHPublicKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetSSHPublicKey") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetSSHPublicKeyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetUser struct { } func (*awsAwsquery_serializeOpGetUser) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetUser") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetUserInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpGetUserPolicy struct { } func (*awsAwsquery_serializeOpGetUserPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpGetUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetUserPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("GetUserPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentGetUserPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListAccessKeys struct { } func (*awsAwsquery_serializeOpListAccessKeys) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListAccessKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListAccessKeysInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListAccessKeys") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListAccessKeysInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListAccountAliases struct { } func (*awsAwsquery_serializeOpListAccountAliases) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListAccountAliases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListAccountAliasesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListAccountAliases") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListAccountAliasesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListAttachedGroupPolicies struct { } func (*awsAwsquery_serializeOpListAttachedGroupPolicies) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListAttachedGroupPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListAttachedGroupPoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListAttachedGroupPolicies") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListAttachedGroupPoliciesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListAttachedRolePolicies struct { } func (*awsAwsquery_serializeOpListAttachedRolePolicies) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListAttachedRolePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListAttachedRolePoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListAttachedRolePolicies") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListAttachedRolePoliciesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListAttachedUserPolicies struct { } func (*awsAwsquery_serializeOpListAttachedUserPolicies) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListAttachedUserPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListAttachedUserPoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListAttachedUserPolicies") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListAttachedUserPoliciesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListEntitiesForPolicy struct { } func (*awsAwsquery_serializeOpListEntitiesForPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListEntitiesForPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListEntitiesForPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListEntitiesForPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListEntitiesForPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListGroupPolicies struct { } func (*awsAwsquery_serializeOpListGroupPolicies) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListGroupPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListGroupPoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListGroupPolicies") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListGroupPoliciesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListGroups struct { } func (*awsAwsquery_serializeOpListGroups) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListGroups") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListGroupsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListGroupsForUser struct { } func (*awsAwsquery_serializeOpListGroupsForUser) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListGroupsForUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListGroupsForUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListGroupsForUser") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListGroupsForUserInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListInstanceProfiles struct { } func (*awsAwsquery_serializeOpListInstanceProfiles) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListInstanceProfiles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListInstanceProfilesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListInstanceProfiles") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListInstanceProfilesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListInstanceProfilesForRole struct { } func (*awsAwsquery_serializeOpListInstanceProfilesForRole) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListInstanceProfilesForRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListInstanceProfilesForRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListInstanceProfilesForRole") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListInstanceProfilesForRoleInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListInstanceProfileTags struct { } func (*awsAwsquery_serializeOpListInstanceProfileTags) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListInstanceProfileTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListInstanceProfileTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListInstanceProfileTags") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListInstanceProfileTagsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListMFADevices struct { } func (*awsAwsquery_serializeOpListMFADevices) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListMFADevices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListMFADevicesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListMFADevices") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListMFADevicesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListMFADeviceTags struct { } func (*awsAwsquery_serializeOpListMFADeviceTags) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListMFADeviceTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListMFADeviceTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListMFADeviceTags") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListMFADeviceTagsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListOpenIDConnectProviders struct { } func (*awsAwsquery_serializeOpListOpenIDConnectProviders) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListOpenIDConnectProviders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListOpenIDConnectProvidersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListOpenIDConnectProviders") body.Key("Version").String("2010-05-08") err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListOpenIDConnectProviderTags struct { } func (*awsAwsquery_serializeOpListOpenIDConnectProviderTags) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListOpenIDConnectProviderTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListOpenIDConnectProviderTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListOpenIDConnectProviderTags") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListOpenIDConnectProviderTagsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListPolicies struct { } func (*awsAwsquery_serializeOpListPolicies) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListPoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListPolicies") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListPoliciesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListPoliciesGrantingServiceAccess struct { } func (*awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListPoliciesGrantingServiceAccessInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListPoliciesGrantingServiceAccess") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListPoliciesGrantingServiceAccessInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListPolicyTags struct { } func (*awsAwsquery_serializeOpListPolicyTags) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListPolicyTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListPolicyTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListPolicyTags") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListPolicyTagsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListPolicyVersions struct { } func (*awsAwsquery_serializeOpListPolicyVersions) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListPolicyVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListPolicyVersionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListPolicyVersions") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListPolicyVersionsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListRolePolicies struct { } func (*awsAwsquery_serializeOpListRolePolicies) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListRolePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListRolePoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListRolePolicies") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListRolePoliciesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListRoles struct { } func (*awsAwsquery_serializeOpListRoles) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListRoles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListRolesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListRoles") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListRolesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListRoleTags struct { } func (*awsAwsquery_serializeOpListRoleTags) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListRoleTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListRoleTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListRoleTags") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListRoleTagsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListSAMLProviders struct { } func (*awsAwsquery_serializeOpListSAMLProviders) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListSAMLProviders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListSAMLProvidersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListSAMLProviders") body.Key("Version").String("2010-05-08") err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListSAMLProviderTags struct { } func (*awsAwsquery_serializeOpListSAMLProviderTags) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListSAMLProviderTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListSAMLProviderTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListSAMLProviderTags") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListSAMLProviderTagsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListServerCertificates struct { } func (*awsAwsquery_serializeOpListServerCertificates) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListServerCertificates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListServerCertificatesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListServerCertificates") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListServerCertificatesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListServerCertificateTags struct { } func (*awsAwsquery_serializeOpListServerCertificateTags) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListServerCertificateTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListServerCertificateTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListServerCertificateTags") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListServerCertificateTagsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListServiceSpecificCredentials struct { } func (*awsAwsquery_serializeOpListServiceSpecificCredentials) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListServiceSpecificCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListServiceSpecificCredentialsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListServiceSpecificCredentials") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListServiceSpecificCredentialsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListSigningCertificates struct { } func (*awsAwsquery_serializeOpListSigningCertificates) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListSigningCertificates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListSigningCertificatesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListSigningCertificates") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListSigningCertificatesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListSSHPublicKeys struct { } func (*awsAwsquery_serializeOpListSSHPublicKeys) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListSSHPublicKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListSSHPublicKeysInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListSSHPublicKeys") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListSSHPublicKeysInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListUserPolicies struct { } func (*awsAwsquery_serializeOpListUserPolicies) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListUserPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListUserPoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListUserPolicies") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListUserPoliciesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListUsers struct { } func (*awsAwsquery_serializeOpListUsers) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListUsersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListUsers") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListUsersInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListUserTags struct { } func (*awsAwsquery_serializeOpListUserTags) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListUserTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListUserTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListUserTags") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListUserTagsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListVirtualMFADevices struct { } func (*awsAwsquery_serializeOpListVirtualMFADevices) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListVirtualMFADevices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListVirtualMFADevicesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListVirtualMFADevices") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentListVirtualMFADevicesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpPutGroupPolicy struct { } func (*awsAwsquery_serializeOpPutGroupPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpPutGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PutGroupPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("PutGroupPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentPutGroupPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpPutRolePermissionsBoundary struct { } func (*awsAwsquery_serializeOpPutRolePermissionsBoundary) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpPutRolePermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PutRolePermissionsBoundaryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("PutRolePermissionsBoundary") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentPutRolePermissionsBoundaryInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpPutRolePolicy struct { } func (*awsAwsquery_serializeOpPutRolePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpPutRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PutRolePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("PutRolePolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentPutRolePolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpPutUserPermissionsBoundary struct { } func (*awsAwsquery_serializeOpPutUserPermissionsBoundary) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpPutUserPermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PutUserPermissionsBoundaryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("PutUserPermissionsBoundary") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentPutUserPermissionsBoundaryInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpPutUserPolicy struct { } func (*awsAwsquery_serializeOpPutUserPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpPutUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PutUserPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("PutUserPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentPutUserPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider struct { } func (*awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RemoveClientIDFromOpenIDConnectProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("RemoveClientIDFromOpenIDConnectProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentRemoveClientIDFromOpenIDConnectProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpRemoveRoleFromInstanceProfile struct { } func (*awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RemoveRoleFromInstanceProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("RemoveRoleFromInstanceProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentRemoveRoleFromInstanceProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpRemoveUserFromGroup struct { } func (*awsAwsquery_serializeOpRemoveUserFromGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpRemoveUserFromGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RemoveUserFromGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("RemoveUserFromGroup") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentRemoveUserFromGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpResetServiceSpecificCredential struct { } func (*awsAwsquery_serializeOpResetServiceSpecificCredential) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpResetServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ResetServiceSpecificCredentialInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ResetServiceSpecificCredential") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentResetServiceSpecificCredentialInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpResyncMFADevice struct { } func (*awsAwsquery_serializeOpResyncMFADevice) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpResyncMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ResyncMFADeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ResyncMFADevice") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentResyncMFADeviceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpSetDefaultPolicyVersion struct { } func (*awsAwsquery_serializeOpSetDefaultPolicyVersion) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpSetDefaultPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*SetDefaultPolicyVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("SetDefaultPolicyVersion") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentSetDefaultPolicyVersionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpSetSecurityTokenServicePreferences struct { } func (*awsAwsquery_serializeOpSetSecurityTokenServicePreferences) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpSetSecurityTokenServicePreferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*SetSecurityTokenServicePreferencesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("SetSecurityTokenServicePreferences") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentSetSecurityTokenServicePreferencesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpSimulateCustomPolicy struct { } func (*awsAwsquery_serializeOpSimulateCustomPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpSimulateCustomPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*SimulateCustomPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("SimulateCustomPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentSimulateCustomPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpSimulatePrincipalPolicy struct { } func (*awsAwsquery_serializeOpSimulatePrincipalPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpSimulatePrincipalPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*SimulatePrincipalPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("SimulatePrincipalPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentSimulatePrincipalPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpTagInstanceProfile struct { } func (*awsAwsquery_serializeOpTagInstanceProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpTagInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagInstanceProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("TagInstanceProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentTagInstanceProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpTagMFADevice struct { } func (*awsAwsquery_serializeOpTagMFADevice) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpTagMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagMFADeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("TagMFADevice") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentTagMFADeviceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpTagOpenIDConnectProvider struct { } func (*awsAwsquery_serializeOpTagOpenIDConnectProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpTagOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagOpenIDConnectProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("TagOpenIDConnectProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentTagOpenIDConnectProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpTagPolicy struct { } func (*awsAwsquery_serializeOpTagPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpTagPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("TagPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentTagPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpTagRole struct { } func (*awsAwsquery_serializeOpTagRole) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpTagRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("TagRole") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentTagRoleInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpTagSAMLProvider struct { } func (*awsAwsquery_serializeOpTagSAMLProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpTagSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagSAMLProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("TagSAMLProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentTagSAMLProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpTagServerCertificate struct { } func (*awsAwsquery_serializeOpTagServerCertificate) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpTagServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagServerCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("TagServerCertificate") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentTagServerCertificateInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpTagUser struct { } func (*awsAwsquery_serializeOpTagUser) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpTagUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("TagUser") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentTagUserInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUntagInstanceProfile struct { } func (*awsAwsquery_serializeOpUntagInstanceProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUntagInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagInstanceProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UntagInstanceProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUntagInstanceProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUntagMFADevice struct { } func (*awsAwsquery_serializeOpUntagMFADevice) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUntagMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagMFADeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UntagMFADevice") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUntagMFADeviceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUntagOpenIDConnectProvider struct { } func (*awsAwsquery_serializeOpUntagOpenIDConnectProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUntagOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagOpenIDConnectProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UntagOpenIDConnectProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUntagOpenIDConnectProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUntagPolicy struct { } func (*awsAwsquery_serializeOpUntagPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUntagPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UntagPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUntagPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUntagRole struct { } func (*awsAwsquery_serializeOpUntagRole) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUntagRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UntagRole") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUntagRoleInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUntagSAMLProvider struct { } func (*awsAwsquery_serializeOpUntagSAMLProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUntagSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagSAMLProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UntagSAMLProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUntagSAMLProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUntagServerCertificate struct { } func (*awsAwsquery_serializeOpUntagServerCertificate) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUntagServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagServerCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UntagServerCertificate") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUntagServerCertificateInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUntagUser struct { } func (*awsAwsquery_serializeOpUntagUser) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUntagUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UntagUser") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUntagUserInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateAccessKey struct { } func (*awsAwsquery_serializeOpUpdateAccessKey) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateAccessKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateAccessKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateAccessKey") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateAccessKeyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateAccountPasswordPolicy struct { } func (*awsAwsquery_serializeOpUpdateAccountPasswordPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateAccountPasswordPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateAccountPasswordPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateAccountPasswordPolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateAccountPasswordPolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateAssumeRolePolicy struct { } func (*awsAwsquery_serializeOpUpdateAssumeRolePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateAssumeRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateAssumeRolePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateAssumeRolePolicy") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateAssumeRolePolicyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateGroup struct { } func (*awsAwsquery_serializeOpUpdateGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateGroup") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateLoginProfile struct { } func (*awsAwsquery_serializeOpUpdateLoginProfile) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateLoginProfileInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateLoginProfile") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateLoginProfileInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint struct { } func (*awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateOpenIDConnectProviderThumbprintInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateOpenIDConnectProviderThumbprint") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateOpenIDConnectProviderThumbprintInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateRole struct { } func (*awsAwsquery_serializeOpUpdateRole) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateRoleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateRole") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateRoleInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateRoleDescription struct { } func (*awsAwsquery_serializeOpUpdateRoleDescription) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateRoleDescription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateRoleDescriptionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateRoleDescription") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateRoleDescriptionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateSAMLProvider struct { } func (*awsAwsquery_serializeOpUpdateSAMLProvider) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateSAMLProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateSAMLProvider") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateSAMLProviderInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateServerCertificate struct { } func (*awsAwsquery_serializeOpUpdateServerCertificate) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateServerCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateServerCertificate") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateServerCertificateInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateServiceSpecificCredential struct { } func (*awsAwsquery_serializeOpUpdateServiceSpecificCredential) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateServiceSpecificCredentialInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateServiceSpecificCredential") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateServiceSpecificCredentialInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateSigningCertificate struct { } func (*awsAwsquery_serializeOpUpdateSigningCertificate) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateSigningCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateSigningCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateSigningCertificate") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateSigningCertificateInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateSSHPublicKey struct { } func (*awsAwsquery_serializeOpUpdateSSHPublicKey) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateSSHPublicKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateSSHPublicKey") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateSSHPublicKeyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUpdateUser struct { } func (*awsAwsquery_serializeOpUpdateUser) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUpdateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UpdateUser") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUpdateUserInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUploadServerCertificate struct { } func (*awsAwsquery_serializeOpUploadServerCertificate) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUploadServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UploadServerCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UploadServerCertificate") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUploadServerCertificateInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUploadSigningCertificate struct { } func (*awsAwsquery_serializeOpUploadSigningCertificate) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUploadSigningCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UploadSigningCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UploadSigningCertificate") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUploadSigningCertificateInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpUploadSSHPublicKey struct { } func (*awsAwsquery_serializeOpUploadSSHPublicKey) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpUploadSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UploadSSHPublicKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("UploadSSHPublicKey") body.Key("Version").String("2010-05-08") if err := awsAwsquery_serializeOpDocumentUploadSSHPublicKeyInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsquery_serializeDocumentActionNameListType(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentClientIDListType(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentContextEntry(v *types.ContextEntry, value query.Value) error { object := value.Object() _ = object if v.ContextKeyName != nil { objectKey := object.Key("ContextKeyName") objectKey.String(*v.ContextKeyName) } if len(v.ContextKeyType) > 0 { objectKey := object.Key("ContextKeyType") objectKey.String(string(v.ContextKeyType)) } if v.ContextKeyValues != nil { objectKey := object.Key("ContextKeyValues") if err := awsAwsquery_serializeDocumentContextKeyValueListType(v.ContextKeyValues, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeDocumentContextEntryListType(v []types.ContextEntry, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() if err := awsAwsquery_serializeDocumentContextEntry(&v[i], av); err != nil { return err } } return nil } func awsAwsquery_serializeDocumentContextKeyValueListType(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentEntityListType(v []types.EntityType, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsAwsquery_serializeDocumentResourceNameListType(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentServiceNamespaceListType(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentSimulationPolicyListType(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentTag(v *types.Tag, value query.Value) error { object := value.Object() _ = object if v.Key != nil { objectKey := object.Key("Key") objectKey.String(*v.Key) } if v.Value != nil { objectKey := object.Key("Value") objectKey.String(*v.Value) } return nil } func awsAwsquery_serializeDocumentTagKeyListType(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentTagListType(v []types.Tag, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() if err := awsAwsquery_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsAwsquery_serializeDocumentThumbprintListType(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeOpDocumentAddClientIDToOpenIDConnectProviderInput(v *AddClientIDToOpenIDConnectProviderInput, value query.Value) error { object := value.Object() _ = object if v.ClientID != nil { objectKey := object.Key("ClientID") objectKey.String(*v.ClientID) } if v.OpenIDConnectProviderArn != nil { objectKey := object.Key("OpenIDConnectProviderArn") objectKey.String(*v.OpenIDConnectProviderArn) } return nil } func awsAwsquery_serializeOpDocumentAddRoleToInstanceProfileInput(v *AddRoleToInstanceProfileInput, value query.Value) error { object := value.Object() _ = object if v.InstanceProfileName != nil { objectKey := object.Key("InstanceProfileName") objectKey.String(*v.InstanceProfileName) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentAddUserToGroupInput(v *AddUserToGroupInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentAttachGroupPolicyInput(v *AttachGroupPolicyInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } return nil } func awsAwsquery_serializeOpDocumentAttachRolePolicyInput(v *AttachRolePolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentAttachUserPolicyInput(v *AttachUserPolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentChangePasswordInput(v *ChangePasswordInput, value query.Value) error { object := value.Object() _ = object if v.NewPassword != nil { objectKey := object.Key("NewPassword") objectKey.String(*v.NewPassword) } if v.OldPassword != nil { objectKey := object.Key("OldPassword") objectKey.String(*v.OldPassword) } return nil } func awsAwsquery_serializeOpDocumentCreateAccessKeyInput(v *CreateAccessKeyInput, value query.Value) error { object := value.Object() _ = object if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentCreateAccountAliasInput(v *CreateAccountAliasInput, value query.Value) error { object := value.Object() _ = object if v.AccountAlias != nil { objectKey := object.Key("AccountAlias") objectKey.String(*v.AccountAlias) } return nil } func awsAwsquery_serializeOpDocumentCreateGroupInput(v *CreateGroupInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.Path != nil { objectKey := object.Key("Path") objectKey.String(*v.Path) } return nil } func awsAwsquery_serializeOpDocumentCreateInstanceProfileInput(v *CreateInstanceProfileInput, value query.Value) error { object := value.Object() _ = object if v.InstanceProfileName != nil { objectKey := object.Key("InstanceProfileName") objectKey.String(*v.InstanceProfileName) } if v.Path != nil { objectKey := object.Key("Path") objectKey.String(*v.Path) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateLoginProfileInput(v *CreateLoginProfileInput, value query.Value) error { object := value.Object() _ = object if v.Password != nil { objectKey := object.Key("Password") objectKey.String(*v.Password) } if v.PasswordResetRequired { objectKey := object.Key("PasswordResetRequired") objectKey.Boolean(v.PasswordResetRequired) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentCreateOpenIDConnectProviderInput(v *CreateOpenIDConnectProviderInput, value query.Value) error { object := value.Object() _ = object if v.ClientIDList != nil { objectKey := object.Key("ClientIDList") if err := awsAwsquery_serializeDocumentClientIDListType(v.ClientIDList, objectKey); err != nil { return err } } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } if v.ThumbprintList != nil { objectKey := object.Key("ThumbprintList") if err := awsAwsquery_serializeDocumentThumbprintListType(v.ThumbprintList, objectKey); err != nil { return err } } if v.Url != nil { objectKey := object.Key("Url") objectKey.String(*v.Url) } return nil } func awsAwsquery_serializeOpDocumentCreatePolicyInput(v *CreatePolicyInput, value query.Value) error { object := value.Object() _ = object if v.Description != nil { objectKey := object.Key("Description") objectKey.String(*v.Description) } if v.Path != nil { objectKey := object.Key("Path") objectKey.String(*v.Path) } if v.PolicyDocument != nil { objectKey := object.Key("PolicyDocument") objectKey.String(*v.PolicyDocument) } if v.PolicyName != nil { objectKey := object.Key("PolicyName") objectKey.String(*v.PolicyName) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreatePolicyVersionInput(v *CreatePolicyVersionInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if v.PolicyDocument != nil { objectKey := object.Key("PolicyDocument") objectKey.String(*v.PolicyDocument) } if v.SetAsDefault { objectKey := object.Key("SetAsDefault") objectKey.Boolean(v.SetAsDefault) } return nil } func awsAwsquery_serializeOpDocumentCreateRoleInput(v *CreateRoleInput, value query.Value) error { object := value.Object() _ = object if v.AssumeRolePolicyDocument != nil { objectKey := object.Key("AssumeRolePolicyDocument") objectKey.String(*v.AssumeRolePolicyDocument) } if v.Description != nil { objectKey := object.Key("Description") objectKey.String(*v.Description) } if v.MaxSessionDuration != nil { objectKey := object.Key("MaxSessionDuration") objectKey.Integer(*v.MaxSessionDuration) } if v.Path != nil { objectKey := object.Key("Path") objectKey.String(*v.Path) } if v.PermissionsBoundary != nil { objectKey := object.Key("PermissionsBoundary") objectKey.String(*v.PermissionsBoundary) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateSAMLProviderInput(v *CreateSAMLProviderInput, value query.Value) error { object := value.Object() _ = object if v.Name != nil { objectKey := object.Key("Name") objectKey.String(*v.Name) } if v.SAMLMetadataDocument != nil { objectKey := object.Key("SAMLMetadataDocument") objectKey.String(*v.SAMLMetadataDocument) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateServiceLinkedRoleInput(v *CreateServiceLinkedRoleInput, value query.Value) error { object := value.Object() _ = object if v.AWSServiceName != nil { objectKey := object.Key("AWSServiceName") objectKey.String(*v.AWSServiceName) } if v.CustomSuffix != nil { objectKey := object.Key("CustomSuffix") objectKey.String(*v.CustomSuffix) } if v.Description != nil { objectKey := object.Key("Description") objectKey.String(*v.Description) } return nil } func awsAwsquery_serializeOpDocumentCreateServiceSpecificCredentialInput(v *CreateServiceSpecificCredentialInput, value query.Value) error { object := value.Object() _ = object if v.ServiceName != nil { objectKey := object.Key("ServiceName") objectKey.String(*v.ServiceName) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentCreateUserInput(v *CreateUserInput, value query.Value) error { object := value.Object() _ = object if v.Path != nil { objectKey := object.Key("Path") objectKey.String(*v.Path) } if v.PermissionsBoundary != nil { objectKey := object.Key("PermissionsBoundary") objectKey.String(*v.PermissionsBoundary) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentCreateVirtualMFADeviceInput(v *CreateVirtualMFADeviceInput, value query.Value) error { object := value.Object() _ = object if v.Path != nil { objectKey := object.Key("Path") objectKey.String(*v.Path) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } if v.VirtualMFADeviceName != nil { objectKey := object.Key("VirtualMFADeviceName") objectKey.String(*v.VirtualMFADeviceName) } return nil } func awsAwsquery_serializeOpDocumentDeactivateMFADeviceInput(v *DeactivateMFADeviceInput, value query.Value) error { object := value.Object() _ = object if v.SerialNumber != nil { objectKey := object.Key("SerialNumber") objectKey.String(*v.SerialNumber) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentDeleteAccessKeyInput(v *DeleteAccessKeyInput, value query.Value) error { object := value.Object() _ = object if v.AccessKeyId != nil { objectKey := object.Key("AccessKeyId") objectKey.String(*v.AccessKeyId) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentDeleteAccountAliasInput(v *DeleteAccountAliasInput, value query.Value) error { object := value.Object() _ = object if v.AccountAlias != nil { objectKey := object.Key("AccountAlias") objectKey.String(*v.AccountAlias) } return nil } func awsAwsquery_serializeOpDocumentDeleteGroupInput(v *DeleteGroupInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } return nil } func awsAwsquery_serializeOpDocumentDeleteGroupPolicyInput(v *DeleteGroupPolicyInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.PolicyName != nil { objectKey := object.Key("PolicyName") objectKey.String(*v.PolicyName) } return nil } func awsAwsquery_serializeOpDocumentDeleteInstanceProfileInput(v *DeleteInstanceProfileInput, value query.Value) error { object := value.Object() _ = object if v.InstanceProfileName != nil { objectKey := object.Key("InstanceProfileName") objectKey.String(*v.InstanceProfileName) } return nil } func awsAwsquery_serializeOpDocumentDeleteLoginProfileInput(v *DeleteLoginProfileInput, value query.Value) error { object := value.Object() _ = object if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentDeleteOpenIDConnectProviderInput(v *DeleteOpenIDConnectProviderInput, value query.Value) error { object := value.Object() _ = object if v.OpenIDConnectProviderArn != nil { objectKey := object.Key("OpenIDConnectProviderArn") objectKey.String(*v.OpenIDConnectProviderArn) } return nil } func awsAwsquery_serializeOpDocumentDeletePolicyInput(v *DeletePolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } return nil } func awsAwsquery_serializeOpDocumentDeletePolicyVersionInput(v *DeletePolicyVersionInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if v.VersionId != nil { objectKey := object.Key("VersionId") objectKey.String(*v.VersionId) } return nil } func awsAwsquery_serializeOpDocumentDeleteRoleInput(v *DeleteRoleInput, value query.Value) error { object := value.Object() _ = object if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentDeleteRolePermissionsBoundaryInput(v *DeleteRolePermissionsBoundaryInput, value query.Value) error { object := value.Object() _ = object if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentDeleteRolePolicyInput(v *DeleteRolePolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyName != nil { objectKey := object.Key("PolicyName") objectKey.String(*v.PolicyName) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentDeleteSAMLProviderInput(v *DeleteSAMLProviderInput, value query.Value) error { object := value.Object() _ = object if v.SAMLProviderArn != nil { objectKey := object.Key("SAMLProviderArn") objectKey.String(*v.SAMLProviderArn) } return nil } func awsAwsquery_serializeOpDocumentDeleteServerCertificateInput(v *DeleteServerCertificateInput, value query.Value) error { object := value.Object() _ = object if v.ServerCertificateName != nil { objectKey := object.Key("ServerCertificateName") objectKey.String(*v.ServerCertificateName) } return nil } func awsAwsquery_serializeOpDocumentDeleteServiceLinkedRoleInput(v *DeleteServiceLinkedRoleInput, value query.Value) error { object := value.Object() _ = object if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentDeleteServiceSpecificCredentialInput(v *DeleteServiceSpecificCredentialInput, value query.Value) error { object := value.Object() _ = object if v.ServiceSpecificCredentialId != nil { objectKey := object.Key("ServiceSpecificCredentialId") objectKey.String(*v.ServiceSpecificCredentialId) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentDeleteSigningCertificateInput(v *DeleteSigningCertificateInput, value query.Value) error { object := value.Object() _ = object if v.CertificateId != nil { objectKey := object.Key("CertificateId") objectKey.String(*v.CertificateId) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentDeleteSSHPublicKeyInput(v *DeleteSSHPublicKeyInput, value query.Value) error { object := value.Object() _ = object if v.SSHPublicKeyId != nil { objectKey := object.Key("SSHPublicKeyId") objectKey.String(*v.SSHPublicKeyId) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentDeleteUserInput(v *DeleteUserInput, value query.Value) error { object := value.Object() _ = object if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentDeleteUserPermissionsBoundaryInput(v *DeleteUserPermissionsBoundaryInput, value query.Value) error { object := value.Object() _ = object if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentDeleteUserPolicyInput(v *DeleteUserPolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyName != nil { objectKey := object.Key("PolicyName") objectKey.String(*v.PolicyName) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentDeleteVirtualMFADeviceInput(v *DeleteVirtualMFADeviceInput, value query.Value) error { object := value.Object() _ = object if v.SerialNumber != nil { objectKey := object.Key("SerialNumber") objectKey.String(*v.SerialNumber) } return nil } func awsAwsquery_serializeOpDocumentDetachGroupPolicyInput(v *DetachGroupPolicyInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } return nil } func awsAwsquery_serializeOpDocumentDetachRolePolicyInput(v *DetachRolePolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentDetachUserPolicyInput(v *DetachUserPolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentEnableMFADeviceInput(v *EnableMFADeviceInput, value query.Value) error { object := value.Object() _ = object if v.AuthenticationCode1 != nil { objectKey := object.Key("AuthenticationCode1") objectKey.String(*v.AuthenticationCode1) } if v.AuthenticationCode2 != nil { objectKey := object.Key("AuthenticationCode2") objectKey.String(*v.AuthenticationCode2) } if v.SerialNumber != nil { objectKey := object.Key("SerialNumber") objectKey.String(*v.SerialNumber) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentGenerateOrganizationsAccessReportInput(v *GenerateOrganizationsAccessReportInput, value query.Value) error { object := value.Object() _ = object if v.EntityPath != nil { objectKey := object.Key("EntityPath") objectKey.String(*v.EntityPath) } if v.OrganizationsPolicyId != nil { objectKey := object.Key("OrganizationsPolicyId") objectKey.String(*v.OrganizationsPolicyId) } return nil } func awsAwsquery_serializeOpDocumentGenerateServiceLastAccessedDetailsInput(v *GenerateServiceLastAccessedDetailsInput, value query.Value) error { object := value.Object() _ = object if v.Arn != nil { objectKey := object.Key("Arn") objectKey.String(*v.Arn) } if len(v.Granularity) > 0 { objectKey := object.Key("Granularity") objectKey.String(string(v.Granularity)) } return nil } func awsAwsquery_serializeOpDocumentGetAccessKeyLastUsedInput(v *GetAccessKeyLastUsedInput, value query.Value) error { object := value.Object() _ = object if v.AccessKeyId != nil { objectKey := object.Key("AccessKeyId") objectKey.String(*v.AccessKeyId) } return nil } func awsAwsquery_serializeOpDocumentGetAccountAuthorizationDetailsInput(v *GetAccountAuthorizationDetailsInput, value query.Value) error { object := value.Object() _ = object if v.Filter != nil { objectKey := object.Key("Filter") if err := awsAwsquery_serializeDocumentEntityListType(v.Filter, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } return nil } func awsAwsquery_serializeOpDocumentGetContextKeysForCustomPolicyInput(v *GetContextKeysForCustomPolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyInputList != nil { objectKey := object.Key("PolicyInputList") if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PolicyInputList, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentGetContextKeysForPrincipalPolicyInput(v *GetContextKeysForPrincipalPolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyInputList != nil { objectKey := object.Key("PolicyInputList") if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PolicyInputList, objectKey); err != nil { return err } } if v.PolicySourceArn != nil { objectKey := object.Key("PolicySourceArn") objectKey.String(*v.PolicySourceArn) } return nil } func awsAwsquery_serializeOpDocumentGetGroupInput(v *GetGroupInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } return nil } func awsAwsquery_serializeOpDocumentGetGroupPolicyInput(v *GetGroupPolicyInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.PolicyName != nil { objectKey := object.Key("PolicyName") objectKey.String(*v.PolicyName) } return nil } func awsAwsquery_serializeOpDocumentGetInstanceProfileInput(v *GetInstanceProfileInput, value query.Value) error { object := value.Object() _ = object if v.InstanceProfileName != nil { objectKey := object.Key("InstanceProfileName") objectKey.String(*v.InstanceProfileName) } return nil } func awsAwsquery_serializeOpDocumentGetLoginProfileInput(v *GetLoginProfileInput, value query.Value) error { object := value.Object() _ = object if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentGetMFADeviceInput(v *GetMFADeviceInput, value query.Value) error { object := value.Object() _ = object if v.SerialNumber != nil { objectKey := object.Key("SerialNumber") objectKey.String(*v.SerialNumber) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentGetOpenIDConnectProviderInput(v *GetOpenIDConnectProviderInput, value query.Value) error { object := value.Object() _ = object if v.OpenIDConnectProviderArn != nil { objectKey := object.Key("OpenIDConnectProviderArn") objectKey.String(*v.OpenIDConnectProviderArn) } return nil } func awsAwsquery_serializeOpDocumentGetOrganizationsAccessReportInput(v *GetOrganizationsAccessReportInput, value query.Value) error { object := value.Object() _ = object if v.JobId != nil { objectKey := object.Key("JobId") objectKey.String(*v.JobId) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if len(v.SortKey) > 0 { objectKey := object.Key("SortKey") objectKey.String(string(v.SortKey)) } return nil } func awsAwsquery_serializeOpDocumentGetPolicyInput(v *GetPolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } return nil } func awsAwsquery_serializeOpDocumentGetPolicyVersionInput(v *GetPolicyVersionInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if v.VersionId != nil { objectKey := object.Key("VersionId") objectKey.String(*v.VersionId) } return nil } func awsAwsquery_serializeOpDocumentGetRoleInput(v *GetRoleInput, value query.Value) error { object := value.Object() _ = object if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentGetRolePolicyInput(v *GetRolePolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyName != nil { objectKey := object.Key("PolicyName") objectKey.String(*v.PolicyName) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentGetSAMLProviderInput(v *GetSAMLProviderInput, value query.Value) error { object := value.Object() _ = object if v.SAMLProviderArn != nil { objectKey := object.Key("SAMLProviderArn") objectKey.String(*v.SAMLProviderArn) } return nil } func awsAwsquery_serializeOpDocumentGetServerCertificateInput(v *GetServerCertificateInput, value query.Value) error { object := value.Object() _ = object if v.ServerCertificateName != nil { objectKey := object.Key("ServerCertificateName") objectKey.String(*v.ServerCertificateName) } return nil } func awsAwsquery_serializeOpDocumentGetServiceLastAccessedDetailsInput(v *GetServiceLastAccessedDetailsInput, value query.Value) error { object := value.Object() _ = object if v.JobId != nil { objectKey := object.Key("JobId") objectKey.String(*v.JobId) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } return nil } func awsAwsquery_serializeOpDocumentGetServiceLastAccessedDetailsWithEntitiesInput(v *GetServiceLastAccessedDetailsWithEntitiesInput, value query.Value) error { object := value.Object() _ = object if v.JobId != nil { objectKey := object.Key("JobId") objectKey.String(*v.JobId) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.ServiceNamespace != nil { objectKey := object.Key("ServiceNamespace") objectKey.String(*v.ServiceNamespace) } return nil } func awsAwsquery_serializeOpDocumentGetServiceLinkedRoleDeletionStatusInput(v *GetServiceLinkedRoleDeletionStatusInput, value query.Value) error { object := value.Object() _ = object if v.DeletionTaskId != nil { objectKey := object.Key("DeletionTaskId") objectKey.String(*v.DeletionTaskId) } return nil } func awsAwsquery_serializeOpDocumentGetSSHPublicKeyInput(v *GetSSHPublicKeyInput, value query.Value) error { object := value.Object() _ = object if len(v.Encoding) > 0 { objectKey := object.Key("Encoding") objectKey.String(string(v.Encoding)) } if v.SSHPublicKeyId != nil { objectKey := object.Key("SSHPublicKeyId") objectKey.String(*v.SSHPublicKeyId) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentGetUserInput(v *GetUserInput, value query.Value) error { object := value.Object() _ = object if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentGetUserPolicyInput(v *GetUserPolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyName != nil { objectKey := object.Key("PolicyName") objectKey.String(*v.PolicyName) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentListAccessKeysInput(v *ListAccessKeysInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentListAccountAliasesInput(v *ListAccountAliasesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } return nil } func awsAwsquery_serializeOpDocumentListAttachedGroupPoliciesInput(v *ListAttachedGroupPoliciesInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PathPrefix != nil { objectKey := object.Key("PathPrefix") objectKey.String(*v.PathPrefix) } return nil } func awsAwsquery_serializeOpDocumentListAttachedRolePoliciesInput(v *ListAttachedRolePoliciesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PathPrefix != nil { objectKey := object.Key("PathPrefix") objectKey.String(*v.PathPrefix) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentListAttachedUserPoliciesInput(v *ListAttachedUserPoliciesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PathPrefix != nil { objectKey := object.Key("PathPrefix") objectKey.String(*v.PathPrefix) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentListEntitiesForPolicyInput(v *ListEntitiesForPolicyInput, value query.Value) error { object := value.Object() _ = object if len(v.EntityFilter) > 0 { objectKey := object.Key("EntityFilter") objectKey.String(string(v.EntityFilter)) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PathPrefix != nil { objectKey := object.Key("PathPrefix") objectKey.String(*v.PathPrefix) } if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if len(v.PolicyUsageFilter) > 0 { objectKey := object.Key("PolicyUsageFilter") objectKey.String(string(v.PolicyUsageFilter)) } return nil } func awsAwsquery_serializeOpDocumentListGroupPoliciesInput(v *ListGroupPoliciesInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } return nil } func awsAwsquery_serializeOpDocumentListGroupsForUserInput(v *ListGroupsForUserInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentListGroupsInput(v *ListGroupsInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PathPrefix != nil { objectKey := object.Key("PathPrefix") objectKey.String(*v.PathPrefix) } return nil } func awsAwsquery_serializeOpDocumentListInstanceProfilesForRoleInput(v *ListInstanceProfilesForRoleInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentListInstanceProfilesInput(v *ListInstanceProfilesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PathPrefix != nil { objectKey := object.Key("PathPrefix") objectKey.String(*v.PathPrefix) } return nil } func awsAwsquery_serializeOpDocumentListInstanceProfileTagsInput(v *ListInstanceProfileTagsInput, value query.Value) error { object := value.Object() _ = object if v.InstanceProfileName != nil { objectKey := object.Key("InstanceProfileName") objectKey.String(*v.InstanceProfileName) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } return nil } func awsAwsquery_serializeOpDocumentListMFADevicesInput(v *ListMFADevicesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentListMFADeviceTagsInput(v *ListMFADeviceTagsInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.SerialNumber != nil { objectKey := object.Key("SerialNumber") objectKey.String(*v.SerialNumber) } return nil } func awsAwsquery_serializeOpDocumentListOpenIDConnectProvidersInput(v *ListOpenIDConnectProvidersInput, value query.Value) error { object := value.Object() _ = object return nil } func awsAwsquery_serializeOpDocumentListOpenIDConnectProviderTagsInput(v *ListOpenIDConnectProviderTagsInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.OpenIDConnectProviderArn != nil { objectKey := object.Key("OpenIDConnectProviderArn") objectKey.String(*v.OpenIDConnectProviderArn) } return nil } func awsAwsquery_serializeOpDocumentListPoliciesGrantingServiceAccessInput(v *ListPoliciesGrantingServiceAccessInput, value query.Value) error { object := value.Object() _ = object if v.Arn != nil { objectKey := object.Key("Arn") objectKey.String(*v.Arn) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.ServiceNamespaces != nil { objectKey := object.Key("ServiceNamespaces") if err := awsAwsquery_serializeDocumentServiceNamespaceListType(v.ServiceNamespaces, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentListPoliciesInput(v *ListPoliciesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.OnlyAttached { objectKey := object.Key("OnlyAttached") objectKey.Boolean(v.OnlyAttached) } if v.PathPrefix != nil { objectKey := object.Key("PathPrefix") objectKey.String(*v.PathPrefix) } if len(v.PolicyUsageFilter) > 0 { objectKey := object.Key("PolicyUsageFilter") objectKey.String(string(v.PolicyUsageFilter)) } if len(v.Scope) > 0 { objectKey := object.Key("Scope") objectKey.String(string(v.Scope)) } return nil } func awsAwsquery_serializeOpDocumentListPolicyTagsInput(v *ListPolicyTagsInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } return nil } func awsAwsquery_serializeOpDocumentListPolicyVersionsInput(v *ListPolicyVersionsInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } return nil } func awsAwsquery_serializeOpDocumentListRolePoliciesInput(v *ListRolePoliciesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentListRolesInput(v *ListRolesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PathPrefix != nil { objectKey := object.Key("PathPrefix") objectKey.String(*v.PathPrefix) } return nil } func awsAwsquery_serializeOpDocumentListRoleTagsInput(v *ListRoleTagsInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentListSAMLProvidersInput(v *ListSAMLProvidersInput, value query.Value) error { object := value.Object() _ = object return nil } func awsAwsquery_serializeOpDocumentListSAMLProviderTagsInput(v *ListSAMLProviderTagsInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.SAMLProviderArn != nil { objectKey := object.Key("SAMLProviderArn") objectKey.String(*v.SAMLProviderArn) } return nil } func awsAwsquery_serializeOpDocumentListServerCertificatesInput(v *ListServerCertificatesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PathPrefix != nil { objectKey := object.Key("PathPrefix") objectKey.String(*v.PathPrefix) } return nil } func awsAwsquery_serializeOpDocumentListServerCertificateTagsInput(v *ListServerCertificateTagsInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.ServerCertificateName != nil { objectKey := object.Key("ServerCertificateName") objectKey.String(*v.ServerCertificateName) } return nil } func awsAwsquery_serializeOpDocumentListServiceSpecificCredentialsInput(v *ListServiceSpecificCredentialsInput, value query.Value) error { object := value.Object() _ = object if v.ServiceName != nil { objectKey := object.Key("ServiceName") objectKey.String(*v.ServiceName) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentListSigningCertificatesInput(v *ListSigningCertificatesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentListSSHPublicKeysInput(v *ListSSHPublicKeysInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentListUserPoliciesInput(v *ListUserPoliciesInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentListUsersInput(v *ListUsersInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PathPrefix != nil { objectKey := object.Key("PathPrefix") objectKey.String(*v.PathPrefix) } return nil } func awsAwsquery_serializeOpDocumentListUserTagsInput(v *ListUserTagsInput, value query.Value) error { object := value.Object() _ = object if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentListVirtualMFADevicesInput(v *ListVirtualMFADevicesInput, value query.Value) error { object := value.Object() _ = object if len(v.AssignmentStatus) > 0 { objectKey := object.Key("AssignmentStatus") objectKey.String(string(v.AssignmentStatus)) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } return nil } func awsAwsquery_serializeOpDocumentPutGroupPolicyInput(v *PutGroupPolicyInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.PolicyDocument != nil { objectKey := object.Key("PolicyDocument") objectKey.String(*v.PolicyDocument) } if v.PolicyName != nil { objectKey := object.Key("PolicyName") objectKey.String(*v.PolicyName) } return nil } func awsAwsquery_serializeOpDocumentPutRolePermissionsBoundaryInput(v *PutRolePermissionsBoundaryInput, value query.Value) error { object := value.Object() _ = object if v.PermissionsBoundary != nil { objectKey := object.Key("PermissionsBoundary") objectKey.String(*v.PermissionsBoundary) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentPutRolePolicyInput(v *PutRolePolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyDocument != nil { objectKey := object.Key("PolicyDocument") objectKey.String(*v.PolicyDocument) } if v.PolicyName != nil { objectKey := object.Key("PolicyName") objectKey.String(*v.PolicyName) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentPutUserPermissionsBoundaryInput(v *PutUserPermissionsBoundaryInput, value query.Value) error { object := value.Object() _ = object if v.PermissionsBoundary != nil { objectKey := object.Key("PermissionsBoundary") objectKey.String(*v.PermissionsBoundary) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentPutUserPolicyInput(v *PutUserPolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyDocument != nil { objectKey := object.Key("PolicyDocument") objectKey.String(*v.PolicyDocument) } if v.PolicyName != nil { objectKey := object.Key("PolicyName") objectKey.String(*v.PolicyName) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentRemoveClientIDFromOpenIDConnectProviderInput(v *RemoveClientIDFromOpenIDConnectProviderInput, value query.Value) error { object := value.Object() _ = object if v.ClientID != nil { objectKey := object.Key("ClientID") objectKey.String(*v.ClientID) } if v.OpenIDConnectProviderArn != nil { objectKey := object.Key("OpenIDConnectProviderArn") objectKey.String(*v.OpenIDConnectProviderArn) } return nil } func awsAwsquery_serializeOpDocumentRemoveRoleFromInstanceProfileInput(v *RemoveRoleFromInstanceProfileInput, value query.Value) error { object := value.Object() _ = object if v.InstanceProfileName != nil { objectKey := object.Key("InstanceProfileName") objectKey.String(*v.InstanceProfileName) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentRemoveUserFromGroupInput(v *RemoveUserFromGroupInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentResetServiceSpecificCredentialInput(v *ResetServiceSpecificCredentialInput, value query.Value) error { object := value.Object() _ = object if v.ServiceSpecificCredentialId != nil { objectKey := object.Key("ServiceSpecificCredentialId") objectKey.String(*v.ServiceSpecificCredentialId) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentResyncMFADeviceInput(v *ResyncMFADeviceInput, value query.Value) error { object := value.Object() _ = object if v.AuthenticationCode1 != nil { objectKey := object.Key("AuthenticationCode1") objectKey.String(*v.AuthenticationCode1) } if v.AuthenticationCode2 != nil { objectKey := object.Key("AuthenticationCode2") objectKey.String(*v.AuthenticationCode2) } if v.SerialNumber != nil { objectKey := object.Key("SerialNumber") objectKey.String(*v.SerialNumber) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentSetDefaultPolicyVersionInput(v *SetDefaultPolicyVersionInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if v.VersionId != nil { objectKey := object.Key("VersionId") objectKey.String(*v.VersionId) } return nil } func awsAwsquery_serializeOpDocumentSetSecurityTokenServicePreferencesInput(v *SetSecurityTokenServicePreferencesInput, value query.Value) error { object := value.Object() _ = object if len(v.GlobalEndpointTokenVersion) > 0 { objectKey := object.Key("GlobalEndpointTokenVersion") objectKey.String(string(v.GlobalEndpointTokenVersion)) } return nil } func awsAwsquery_serializeOpDocumentSimulateCustomPolicyInput(v *SimulateCustomPolicyInput, value query.Value) error { object := value.Object() _ = object if v.ActionNames != nil { objectKey := object.Key("ActionNames") if err := awsAwsquery_serializeDocumentActionNameListType(v.ActionNames, objectKey); err != nil { return err } } if v.CallerArn != nil { objectKey := object.Key("CallerArn") objectKey.String(*v.CallerArn) } if v.ContextEntries != nil { objectKey := object.Key("ContextEntries") if err := awsAwsquery_serializeDocumentContextEntryListType(v.ContextEntries, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PermissionsBoundaryPolicyInputList != nil { objectKey := object.Key("PermissionsBoundaryPolicyInputList") if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PermissionsBoundaryPolicyInputList, objectKey); err != nil { return err } } if v.PolicyInputList != nil { objectKey := object.Key("PolicyInputList") if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PolicyInputList, objectKey); err != nil { return err } } if v.ResourceArns != nil { objectKey := object.Key("ResourceArns") if err := awsAwsquery_serializeDocumentResourceNameListType(v.ResourceArns, objectKey); err != nil { return err } } if v.ResourceHandlingOption != nil { objectKey := object.Key("ResourceHandlingOption") objectKey.String(*v.ResourceHandlingOption) } if v.ResourceOwner != nil { objectKey := object.Key("ResourceOwner") objectKey.String(*v.ResourceOwner) } if v.ResourcePolicy != nil { objectKey := object.Key("ResourcePolicy") objectKey.String(*v.ResourcePolicy) } return nil } func awsAwsquery_serializeOpDocumentSimulatePrincipalPolicyInput(v *SimulatePrincipalPolicyInput, value query.Value) error { object := value.Object() _ = object if v.ActionNames != nil { objectKey := object.Key("ActionNames") if err := awsAwsquery_serializeDocumentActionNameListType(v.ActionNames, objectKey); err != nil { return err } } if v.CallerArn != nil { objectKey := object.Key("CallerArn") objectKey.String(*v.CallerArn) } if v.ContextEntries != nil { objectKey := object.Key("ContextEntries") if err := awsAwsquery_serializeDocumentContextEntryListType(v.ContextEntries, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxItems != nil { objectKey := object.Key("MaxItems") objectKey.Integer(*v.MaxItems) } if v.PermissionsBoundaryPolicyInputList != nil { objectKey := object.Key("PermissionsBoundaryPolicyInputList") if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PermissionsBoundaryPolicyInputList, objectKey); err != nil { return err } } if v.PolicyInputList != nil { objectKey := object.Key("PolicyInputList") if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PolicyInputList, objectKey); err != nil { return err } } if v.PolicySourceArn != nil { objectKey := object.Key("PolicySourceArn") objectKey.String(*v.PolicySourceArn) } if v.ResourceArns != nil { objectKey := object.Key("ResourceArns") if err := awsAwsquery_serializeDocumentResourceNameListType(v.ResourceArns, objectKey); err != nil { return err } } if v.ResourceHandlingOption != nil { objectKey := object.Key("ResourceHandlingOption") objectKey.String(*v.ResourceHandlingOption) } if v.ResourceOwner != nil { objectKey := object.Key("ResourceOwner") objectKey.String(*v.ResourceOwner) } if v.ResourcePolicy != nil { objectKey := object.Key("ResourcePolicy") objectKey.String(*v.ResourcePolicy) } return nil } func awsAwsquery_serializeOpDocumentTagInstanceProfileInput(v *TagInstanceProfileInput, value query.Value) error { object := value.Object() _ = object if v.InstanceProfileName != nil { objectKey := object.Key("InstanceProfileName") objectKey.String(*v.InstanceProfileName) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentTagMFADeviceInput(v *TagMFADeviceInput, value query.Value) error { object := value.Object() _ = object if v.SerialNumber != nil { objectKey := object.Key("SerialNumber") objectKey.String(*v.SerialNumber) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentTagOpenIDConnectProviderInput(v *TagOpenIDConnectProviderInput, value query.Value) error { object := value.Object() _ = object if v.OpenIDConnectProviderArn != nil { objectKey := object.Key("OpenIDConnectProviderArn") objectKey.String(*v.OpenIDConnectProviderArn) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentTagPolicyInput(v *TagPolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentTagRoleInput(v *TagRoleInput, value query.Value) error { object := value.Object() _ = object if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentTagSAMLProviderInput(v *TagSAMLProviderInput, value query.Value) error { object := value.Object() _ = object if v.SAMLProviderArn != nil { objectKey := object.Key("SAMLProviderArn") objectKey.String(*v.SAMLProviderArn) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentTagServerCertificateInput(v *TagServerCertificateInput, value query.Value) error { object := value.Object() _ = object if v.ServerCertificateName != nil { objectKey := object.Key("ServerCertificateName") objectKey.String(*v.ServerCertificateName) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentTagUserInput(v *TagUserInput, value query.Value) error { object := value.Object() _ = object if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentUntagInstanceProfileInput(v *UntagInstanceProfileInput, value query.Value) error { object := value.Object() _ = object if v.InstanceProfileName != nil { objectKey := object.Key("InstanceProfileName") objectKey.String(*v.InstanceProfileName) } if v.TagKeys != nil { objectKey := object.Key("TagKeys") if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentUntagMFADeviceInput(v *UntagMFADeviceInput, value query.Value) error { object := value.Object() _ = object if v.SerialNumber != nil { objectKey := object.Key("SerialNumber") objectKey.String(*v.SerialNumber) } if v.TagKeys != nil { objectKey := object.Key("TagKeys") if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentUntagOpenIDConnectProviderInput(v *UntagOpenIDConnectProviderInput, value query.Value) error { object := value.Object() _ = object if v.OpenIDConnectProviderArn != nil { objectKey := object.Key("OpenIDConnectProviderArn") objectKey.String(*v.OpenIDConnectProviderArn) } if v.TagKeys != nil { objectKey := object.Key("TagKeys") if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentUntagPolicyInput(v *UntagPolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyArn != nil { objectKey := object.Key("PolicyArn") objectKey.String(*v.PolicyArn) } if v.TagKeys != nil { objectKey := object.Key("TagKeys") if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentUntagRoleInput(v *UntagRoleInput, value query.Value) error { object := value.Object() _ = object if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } if v.TagKeys != nil { objectKey := object.Key("TagKeys") if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentUntagSAMLProviderInput(v *UntagSAMLProviderInput, value query.Value) error { object := value.Object() _ = object if v.SAMLProviderArn != nil { objectKey := object.Key("SAMLProviderArn") objectKey.String(*v.SAMLProviderArn) } if v.TagKeys != nil { objectKey := object.Key("TagKeys") if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentUntagServerCertificateInput(v *UntagServerCertificateInput, value query.Value) error { object := value.Object() _ = object if v.ServerCertificateName != nil { objectKey := object.Key("ServerCertificateName") objectKey.String(*v.ServerCertificateName) } if v.TagKeys != nil { objectKey := object.Key("TagKeys") if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentUntagUserInput(v *UntagUserInput, value query.Value) error { object := value.Object() _ = object if v.TagKeys != nil { objectKey := object.Key("TagKeys") if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { return err } } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentUpdateAccessKeyInput(v *UpdateAccessKeyInput, value query.Value) error { object := value.Object() _ = object if v.AccessKeyId != nil { objectKey := object.Key("AccessKeyId") objectKey.String(*v.AccessKeyId) } if len(v.Status) > 0 { objectKey := object.Key("Status") objectKey.String(string(v.Status)) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentUpdateAccountPasswordPolicyInput(v *UpdateAccountPasswordPolicyInput, value query.Value) error { object := value.Object() _ = object if v.AllowUsersToChangePassword { objectKey := object.Key("AllowUsersToChangePassword") objectKey.Boolean(v.AllowUsersToChangePassword) } if v.HardExpiry != nil { objectKey := object.Key("HardExpiry") objectKey.Boolean(*v.HardExpiry) } if v.MaxPasswordAge != nil { objectKey := object.Key("MaxPasswordAge") objectKey.Integer(*v.MaxPasswordAge) } if v.MinimumPasswordLength != nil { objectKey := object.Key("MinimumPasswordLength") objectKey.Integer(*v.MinimumPasswordLength) } if v.PasswordReusePrevention != nil { objectKey := object.Key("PasswordReusePrevention") objectKey.Integer(*v.PasswordReusePrevention) } if v.RequireLowercaseCharacters { objectKey := object.Key("RequireLowercaseCharacters") objectKey.Boolean(v.RequireLowercaseCharacters) } if v.RequireNumbers { objectKey := object.Key("RequireNumbers") objectKey.Boolean(v.RequireNumbers) } if v.RequireSymbols { objectKey := object.Key("RequireSymbols") objectKey.Boolean(v.RequireSymbols) } if v.RequireUppercaseCharacters { objectKey := object.Key("RequireUppercaseCharacters") objectKey.Boolean(v.RequireUppercaseCharacters) } return nil } func awsAwsquery_serializeOpDocumentUpdateAssumeRolePolicyInput(v *UpdateAssumeRolePolicyInput, value query.Value) error { object := value.Object() _ = object if v.PolicyDocument != nil { objectKey := object.Key("PolicyDocument") objectKey.String(*v.PolicyDocument) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentUpdateGroupInput(v *UpdateGroupInput, value query.Value) error { object := value.Object() _ = object if v.GroupName != nil { objectKey := object.Key("GroupName") objectKey.String(*v.GroupName) } if v.NewGroupName != nil { objectKey := object.Key("NewGroupName") objectKey.String(*v.NewGroupName) } if v.NewPath != nil { objectKey := object.Key("NewPath") objectKey.String(*v.NewPath) } return nil } func awsAwsquery_serializeOpDocumentUpdateLoginProfileInput(v *UpdateLoginProfileInput, value query.Value) error { object := value.Object() _ = object if v.Password != nil { objectKey := object.Key("Password") objectKey.String(*v.Password) } if v.PasswordResetRequired != nil { objectKey := object.Key("PasswordResetRequired") objectKey.Boolean(*v.PasswordResetRequired) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentUpdateOpenIDConnectProviderThumbprintInput(v *UpdateOpenIDConnectProviderThumbprintInput, value query.Value) error { object := value.Object() _ = object if v.OpenIDConnectProviderArn != nil { objectKey := object.Key("OpenIDConnectProviderArn") objectKey.String(*v.OpenIDConnectProviderArn) } if v.ThumbprintList != nil { objectKey := object.Key("ThumbprintList") if err := awsAwsquery_serializeDocumentThumbprintListType(v.ThumbprintList, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentUpdateRoleDescriptionInput(v *UpdateRoleDescriptionInput, value query.Value) error { object := value.Object() _ = object if v.Description != nil { objectKey := object.Key("Description") objectKey.String(*v.Description) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentUpdateRoleInput(v *UpdateRoleInput, value query.Value) error { object := value.Object() _ = object if v.Description != nil { objectKey := object.Key("Description") objectKey.String(*v.Description) } if v.MaxSessionDuration != nil { objectKey := object.Key("MaxSessionDuration") objectKey.Integer(*v.MaxSessionDuration) } if v.RoleName != nil { objectKey := object.Key("RoleName") objectKey.String(*v.RoleName) } return nil } func awsAwsquery_serializeOpDocumentUpdateSAMLProviderInput(v *UpdateSAMLProviderInput, value query.Value) error { object := value.Object() _ = object if v.SAMLMetadataDocument != nil { objectKey := object.Key("SAMLMetadataDocument") objectKey.String(*v.SAMLMetadataDocument) } if v.SAMLProviderArn != nil { objectKey := object.Key("SAMLProviderArn") objectKey.String(*v.SAMLProviderArn) } return nil } func awsAwsquery_serializeOpDocumentUpdateServerCertificateInput(v *UpdateServerCertificateInput, value query.Value) error { object := value.Object() _ = object if v.NewPath != nil { objectKey := object.Key("NewPath") objectKey.String(*v.NewPath) } if v.NewServerCertificateName != nil { objectKey := object.Key("NewServerCertificateName") objectKey.String(*v.NewServerCertificateName) } if v.ServerCertificateName != nil { objectKey := object.Key("ServerCertificateName") objectKey.String(*v.ServerCertificateName) } return nil } func awsAwsquery_serializeOpDocumentUpdateServiceSpecificCredentialInput(v *UpdateServiceSpecificCredentialInput, value query.Value) error { object := value.Object() _ = object if v.ServiceSpecificCredentialId != nil { objectKey := object.Key("ServiceSpecificCredentialId") objectKey.String(*v.ServiceSpecificCredentialId) } if len(v.Status) > 0 { objectKey := object.Key("Status") objectKey.String(string(v.Status)) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentUpdateSigningCertificateInput(v *UpdateSigningCertificateInput, value query.Value) error { object := value.Object() _ = object if v.CertificateId != nil { objectKey := object.Key("CertificateId") objectKey.String(*v.CertificateId) } if len(v.Status) > 0 { objectKey := object.Key("Status") objectKey.String(string(v.Status)) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentUpdateSSHPublicKeyInput(v *UpdateSSHPublicKeyInput, value query.Value) error { object := value.Object() _ = object if v.SSHPublicKeyId != nil { objectKey := object.Key("SSHPublicKeyId") objectKey.String(*v.SSHPublicKeyId) } if len(v.Status) > 0 { objectKey := object.Key("Status") objectKey.String(string(v.Status)) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentUpdateUserInput(v *UpdateUserInput, value query.Value) error { object := value.Object() _ = object if v.NewPath != nil { objectKey := object.Key("NewPath") objectKey.String(*v.NewPath) } if v.NewUserName != nil { objectKey := object.Key("NewUserName") objectKey.String(*v.NewUserName) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentUploadServerCertificateInput(v *UploadServerCertificateInput, value query.Value) error { object := value.Object() _ = object if v.CertificateBody != nil { objectKey := object.Key("CertificateBody") objectKey.String(*v.CertificateBody) } if v.CertificateChain != nil { objectKey := object.Key("CertificateChain") objectKey.String(*v.CertificateChain) } if v.Path != nil { objectKey := object.Key("Path") objectKey.String(*v.Path) } if v.PrivateKey != nil { objectKey := object.Key("PrivateKey") objectKey.String(*v.PrivateKey) } if v.ServerCertificateName != nil { objectKey := object.Key("ServerCertificateName") objectKey.String(*v.ServerCertificateName) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentUploadSigningCertificateInput(v *UploadSigningCertificateInput, value query.Value) error { object := value.Object() _ = object if v.CertificateBody != nil { objectKey := object.Key("CertificateBody") objectKey.String(*v.CertificateBody) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil } func awsAwsquery_serializeOpDocumentUploadSSHPublicKeyInput(v *UploadSSHPublicKeyInput, value query.Value) error { object := value.Object() _ = object if v.SSHPublicKeyBody != nil { objectKey := object.Key("SSHPublicKeyBody") objectKey.String(*v.SSHPublicKeyBody) } if v.UserName != nil { objectKey := object.Key("UserName") objectKey.String(*v.UserName) } return nil }
13,414
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/iam/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpAddClientIDToOpenIDConnectProvider struct { } func (*validateOpAddClientIDToOpenIDConnectProvider) ID() string { return "OperationInputValidation" } func (m *validateOpAddClientIDToOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddClientIDToOpenIDConnectProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddClientIDToOpenIDConnectProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAddRoleToInstanceProfile struct { } func (*validateOpAddRoleToInstanceProfile) ID() string { return "OperationInputValidation" } func (m *validateOpAddRoleToInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddRoleToInstanceProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddRoleToInstanceProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAddUserToGroup struct { } func (*validateOpAddUserToGroup) ID() string { return "OperationInputValidation" } func (m *validateOpAddUserToGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddUserToGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddUserToGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAttachGroupPolicy struct { } func (*validateOpAttachGroupPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpAttachGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AttachGroupPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAttachGroupPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAttachRolePolicy struct { } func (*validateOpAttachRolePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpAttachRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AttachRolePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAttachRolePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAttachUserPolicy struct { } func (*validateOpAttachUserPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpAttachUserPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AttachUserPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAttachUserPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpChangePassword struct { } func (*validateOpChangePassword) ID() string { return "OperationInputValidation" } func (m *validateOpChangePassword) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ChangePasswordInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpChangePasswordInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateAccountAlias struct { } func (*validateOpCreateAccountAlias) ID() string { return "OperationInputValidation" } func (m *validateOpCreateAccountAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateAccountAliasInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateAccountAliasInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateGroup struct { } func (*validateOpCreateGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateInstanceProfile struct { } func (*validateOpCreateInstanceProfile) ID() string { return "OperationInputValidation" } func (m *validateOpCreateInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateInstanceProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateInstanceProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateLoginProfile struct { } func (*validateOpCreateLoginProfile) ID() string { return "OperationInputValidation" } func (m *validateOpCreateLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateLoginProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateLoginProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateOpenIDConnectProvider struct { } func (*validateOpCreateOpenIDConnectProvider) ID() string { return "OperationInputValidation" } func (m *validateOpCreateOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateOpenIDConnectProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateOpenIDConnectProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreatePolicy struct { } func (*validateOpCreatePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpCreatePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreatePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreatePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreatePolicyVersion struct { } func (*validateOpCreatePolicyVersion) ID() string { return "OperationInputValidation" } func (m *validateOpCreatePolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreatePolicyVersionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreatePolicyVersionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateRole struct { } func (*validateOpCreateRole) ID() string { return "OperationInputValidation" } func (m *validateOpCreateRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateSAMLProvider struct { } func (*validateOpCreateSAMLProvider) ID() string { return "OperationInputValidation" } func (m *validateOpCreateSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateSAMLProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateSAMLProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateServiceLinkedRole struct { } func (*validateOpCreateServiceLinkedRole) ID() string { return "OperationInputValidation" } func (m *validateOpCreateServiceLinkedRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateServiceLinkedRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateServiceLinkedRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateServiceSpecificCredential struct { } func (*validateOpCreateServiceSpecificCredential) ID() string { return "OperationInputValidation" } func (m *validateOpCreateServiceSpecificCredential) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateServiceSpecificCredentialInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateServiceSpecificCredentialInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateUser struct { } func (*validateOpCreateUser) ID() string { return "OperationInputValidation" } func (m *validateOpCreateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateVirtualMFADevice struct { } func (*validateOpCreateVirtualMFADevice) ID() string { return "OperationInputValidation" } func (m *validateOpCreateVirtualMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateVirtualMFADeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateVirtualMFADeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeactivateMFADevice struct { } func (*validateOpDeactivateMFADevice) ID() string { return "OperationInputValidation" } func (m *validateOpDeactivateMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeactivateMFADeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeactivateMFADeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteAccessKey struct { } func (*validateOpDeleteAccessKey) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteAccessKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteAccessKeyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteAccessKeyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteAccountAlias struct { } func (*validateOpDeleteAccountAlias) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteAccountAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteAccountAliasInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteAccountAliasInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteGroup struct { } func (*validateOpDeleteGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteGroupPolicy struct { } func (*validateOpDeleteGroupPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteGroupPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteGroupPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteInstanceProfile struct { } func (*validateOpDeleteInstanceProfile) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteInstanceProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteInstanceProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteLoginProfile struct { } func (*validateOpDeleteLoginProfile) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteLoginProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteLoginProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteOpenIDConnectProvider struct { } func (*validateOpDeleteOpenIDConnectProvider) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteOpenIDConnectProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteOpenIDConnectProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeletePolicy struct { } func (*validateOpDeletePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDeletePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeletePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeletePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeletePolicyVersion struct { } func (*validateOpDeletePolicyVersion) ID() string { return "OperationInputValidation" } func (m *validateOpDeletePolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeletePolicyVersionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeletePolicyVersionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteRole struct { } func (*validateOpDeleteRole) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteRolePermissionsBoundary struct { } func (*validateOpDeleteRolePermissionsBoundary) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteRolePermissionsBoundary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteRolePermissionsBoundaryInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteRolePermissionsBoundaryInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteRolePolicy struct { } func (*validateOpDeleteRolePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteRolePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteRolePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteSAMLProvider struct { } func (*validateOpDeleteSAMLProvider) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteSAMLProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteSAMLProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteServerCertificate struct { } func (*validateOpDeleteServerCertificate) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteServerCertificateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteServerCertificateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteServiceLinkedRole struct { } func (*validateOpDeleteServiceLinkedRole) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteServiceLinkedRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteServiceLinkedRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteServiceLinkedRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteServiceSpecificCredential struct { } func (*validateOpDeleteServiceSpecificCredential) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteServiceSpecificCredential) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteServiceSpecificCredentialInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteServiceSpecificCredentialInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteSigningCertificate struct { } func (*validateOpDeleteSigningCertificate) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteSigningCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteSigningCertificateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteSigningCertificateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteSSHPublicKey struct { } func (*validateOpDeleteSSHPublicKey) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteSSHPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteSSHPublicKeyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteSSHPublicKeyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteUser struct { } func (*validateOpDeleteUser) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteUserPermissionsBoundary struct { } func (*validateOpDeleteUserPermissionsBoundary) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteUserPermissionsBoundary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteUserPermissionsBoundaryInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteUserPermissionsBoundaryInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteUserPolicy struct { } func (*validateOpDeleteUserPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteUserPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteUserPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteUserPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteVirtualMFADevice struct { } func (*validateOpDeleteVirtualMFADevice) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteVirtualMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteVirtualMFADeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteVirtualMFADeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDetachGroupPolicy struct { } func (*validateOpDetachGroupPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDetachGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DetachGroupPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDetachGroupPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDetachRolePolicy struct { } func (*validateOpDetachRolePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDetachRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DetachRolePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDetachRolePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDetachUserPolicy struct { } func (*validateOpDetachUserPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDetachUserPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DetachUserPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDetachUserPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpEnableMFADevice struct { } func (*validateOpEnableMFADevice) ID() string { return "OperationInputValidation" } func (m *validateOpEnableMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*EnableMFADeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpEnableMFADeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGenerateOrganizationsAccessReport struct { } func (*validateOpGenerateOrganizationsAccessReport) ID() string { return "OperationInputValidation" } func (m *validateOpGenerateOrganizationsAccessReport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GenerateOrganizationsAccessReportInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGenerateOrganizationsAccessReportInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGenerateServiceLastAccessedDetails struct { } func (*validateOpGenerateServiceLastAccessedDetails) ID() string { return "OperationInputValidation" } func (m *validateOpGenerateServiceLastAccessedDetails) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GenerateServiceLastAccessedDetailsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGenerateServiceLastAccessedDetailsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetAccessKeyLastUsed struct { } func (*validateOpGetAccessKeyLastUsed) ID() string { return "OperationInputValidation" } func (m *validateOpGetAccessKeyLastUsed) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetAccessKeyLastUsedInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetAccessKeyLastUsedInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetContextKeysForCustomPolicy struct { } func (*validateOpGetContextKeysForCustomPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpGetContextKeysForCustomPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetContextKeysForCustomPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetContextKeysForCustomPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetContextKeysForPrincipalPolicy struct { } func (*validateOpGetContextKeysForPrincipalPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpGetContextKeysForPrincipalPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetContextKeysForPrincipalPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetContextKeysForPrincipalPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetGroup struct { } func (*validateOpGetGroup) ID() string { return "OperationInputValidation" } func (m *validateOpGetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetGroupPolicy struct { } func (*validateOpGetGroupPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpGetGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetGroupPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetGroupPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetInstanceProfile struct { } func (*validateOpGetInstanceProfile) ID() string { return "OperationInputValidation" } func (m *validateOpGetInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetInstanceProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetInstanceProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetLoginProfile struct { } func (*validateOpGetLoginProfile) ID() string { return "OperationInputValidation" } func (m *validateOpGetLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetLoginProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetLoginProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetMFADevice struct { } func (*validateOpGetMFADevice) ID() string { return "OperationInputValidation" } func (m *validateOpGetMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetMFADeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetMFADeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetOpenIDConnectProvider struct { } func (*validateOpGetOpenIDConnectProvider) ID() string { return "OperationInputValidation" } func (m *validateOpGetOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetOpenIDConnectProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetOpenIDConnectProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetOrganizationsAccessReport struct { } func (*validateOpGetOrganizationsAccessReport) ID() string { return "OperationInputValidation" } func (m *validateOpGetOrganizationsAccessReport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetOrganizationsAccessReportInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetOrganizationsAccessReportInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetPolicy struct { } func (*validateOpGetPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpGetPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetPolicyVersion struct { } func (*validateOpGetPolicyVersion) ID() string { return "OperationInputValidation" } func (m *validateOpGetPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetPolicyVersionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetPolicyVersionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetRole struct { } func (*validateOpGetRole) ID() string { return "OperationInputValidation" } func (m *validateOpGetRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetRolePolicy struct { } func (*validateOpGetRolePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpGetRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetRolePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetRolePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetSAMLProvider struct { } func (*validateOpGetSAMLProvider) ID() string { return "OperationInputValidation" } func (m *validateOpGetSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetSAMLProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetSAMLProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetServerCertificate struct { } func (*validateOpGetServerCertificate) ID() string { return "OperationInputValidation" } func (m *validateOpGetServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetServerCertificateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetServerCertificateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetServiceLastAccessedDetails struct { } func (*validateOpGetServiceLastAccessedDetails) ID() string { return "OperationInputValidation" } func (m *validateOpGetServiceLastAccessedDetails) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetServiceLastAccessedDetailsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetServiceLastAccessedDetailsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetServiceLastAccessedDetailsWithEntities struct { } func (*validateOpGetServiceLastAccessedDetailsWithEntities) ID() string { return "OperationInputValidation" } func (m *validateOpGetServiceLastAccessedDetailsWithEntities) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetServiceLastAccessedDetailsWithEntitiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetServiceLastAccessedDetailsWithEntitiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetServiceLinkedRoleDeletionStatus struct { } func (*validateOpGetServiceLinkedRoleDeletionStatus) ID() string { return "OperationInputValidation" } func (m *validateOpGetServiceLinkedRoleDeletionStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetServiceLinkedRoleDeletionStatusInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetServiceLinkedRoleDeletionStatusInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetSSHPublicKey struct { } func (*validateOpGetSSHPublicKey) ID() string { return "OperationInputValidation" } func (m *validateOpGetSSHPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetSSHPublicKeyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetSSHPublicKeyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetUserPolicy struct { } func (*validateOpGetUserPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpGetUserPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetUserPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetUserPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListAttachedGroupPolicies struct { } func (*validateOpListAttachedGroupPolicies) ID() string { return "OperationInputValidation" } func (m *validateOpListAttachedGroupPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListAttachedGroupPoliciesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListAttachedGroupPoliciesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListAttachedRolePolicies struct { } func (*validateOpListAttachedRolePolicies) ID() string { return "OperationInputValidation" } func (m *validateOpListAttachedRolePolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListAttachedRolePoliciesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListAttachedRolePoliciesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListAttachedUserPolicies struct { } func (*validateOpListAttachedUserPolicies) ID() string { return "OperationInputValidation" } func (m *validateOpListAttachedUserPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListAttachedUserPoliciesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListAttachedUserPoliciesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListEntitiesForPolicy struct { } func (*validateOpListEntitiesForPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpListEntitiesForPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListEntitiesForPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListEntitiesForPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListGroupPolicies struct { } func (*validateOpListGroupPolicies) ID() string { return "OperationInputValidation" } func (m *validateOpListGroupPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListGroupPoliciesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListGroupPoliciesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListGroupsForUser struct { } func (*validateOpListGroupsForUser) ID() string { return "OperationInputValidation" } func (m *validateOpListGroupsForUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListGroupsForUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListGroupsForUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListInstanceProfilesForRole struct { } func (*validateOpListInstanceProfilesForRole) ID() string { return "OperationInputValidation" } func (m *validateOpListInstanceProfilesForRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListInstanceProfilesForRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListInstanceProfilesForRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListInstanceProfileTags struct { } func (*validateOpListInstanceProfileTags) ID() string { return "OperationInputValidation" } func (m *validateOpListInstanceProfileTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListInstanceProfileTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListInstanceProfileTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListMFADeviceTags struct { } func (*validateOpListMFADeviceTags) ID() string { return "OperationInputValidation" } func (m *validateOpListMFADeviceTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListMFADeviceTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListMFADeviceTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListOpenIDConnectProviderTags struct { } func (*validateOpListOpenIDConnectProviderTags) ID() string { return "OperationInputValidation" } func (m *validateOpListOpenIDConnectProviderTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListOpenIDConnectProviderTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListOpenIDConnectProviderTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListPoliciesGrantingServiceAccess struct { } func (*validateOpListPoliciesGrantingServiceAccess) ID() string { return "OperationInputValidation" } func (m *validateOpListPoliciesGrantingServiceAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListPoliciesGrantingServiceAccessInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListPoliciesGrantingServiceAccessInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListPolicyTags struct { } func (*validateOpListPolicyTags) ID() string { return "OperationInputValidation" } func (m *validateOpListPolicyTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListPolicyTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListPolicyTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListPolicyVersions struct { } func (*validateOpListPolicyVersions) ID() string { return "OperationInputValidation" } func (m *validateOpListPolicyVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListPolicyVersionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListPolicyVersionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListRolePolicies struct { } func (*validateOpListRolePolicies) ID() string { return "OperationInputValidation" } func (m *validateOpListRolePolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListRolePoliciesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListRolePoliciesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListRoleTags struct { } func (*validateOpListRoleTags) ID() string { return "OperationInputValidation" } func (m *validateOpListRoleTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListRoleTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListRoleTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListSAMLProviderTags struct { } func (*validateOpListSAMLProviderTags) ID() string { return "OperationInputValidation" } func (m *validateOpListSAMLProviderTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListSAMLProviderTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListSAMLProviderTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListServerCertificateTags struct { } func (*validateOpListServerCertificateTags) ID() string { return "OperationInputValidation" } func (m *validateOpListServerCertificateTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListServerCertificateTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListServerCertificateTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListUserPolicies struct { } func (*validateOpListUserPolicies) ID() string { return "OperationInputValidation" } func (m *validateOpListUserPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListUserPoliciesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListUserPoliciesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListUserTags struct { } func (*validateOpListUserTags) ID() string { return "OperationInputValidation" } func (m *validateOpListUserTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListUserTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListUserTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutGroupPolicy struct { } func (*validateOpPutGroupPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpPutGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutGroupPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutGroupPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutRolePermissionsBoundary struct { } func (*validateOpPutRolePermissionsBoundary) ID() string { return "OperationInputValidation" } func (m *validateOpPutRolePermissionsBoundary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutRolePermissionsBoundaryInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutRolePermissionsBoundaryInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutRolePolicy struct { } func (*validateOpPutRolePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpPutRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutRolePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutRolePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutUserPermissionsBoundary struct { } func (*validateOpPutUserPermissionsBoundary) ID() string { return "OperationInputValidation" } func (m *validateOpPutUserPermissionsBoundary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutUserPermissionsBoundaryInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutUserPermissionsBoundaryInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutUserPolicy struct { } func (*validateOpPutUserPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpPutUserPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutUserPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutUserPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRemoveClientIDFromOpenIDConnectProvider struct { } func (*validateOpRemoveClientIDFromOpenIDConnectProvider) ID() string { return "OperationInputValidation" } func (m *validateOpRemoveClientIDFromOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RemoveClientIDFromOpenIDConnectProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRemoveClientIDFromOpenIDConnectProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRemoveRoleFromInstanceProfile struct { } func (*validateOpRemoveRoleFromInstanceProfile) ID() string { return "OperationInputValidation" } func (m *validateOpRemoveRoleFromInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RemoveRoleFromInstanceProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRemoveRoleFromInstanceProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRemoveUserFromGroup struct { } func (*validateOpRemoveUserFromGroup) ID() string { return "OperationInputValidation" } func (m *validateOpRemoveUserFromGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RemoveUserFromGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRemoveUserFromGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpResetServiceSpecificCredential struct { } func (*validateOpResetServiceSpecificCredential) ID() string { return "OperationInputValidation" } func (m *validateOpResetServiceSpecificCredential) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ResetServiceSpecificCredentialInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpResetServiceSpecificCredentialInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpResyncMFADevice struct { } func (*validateOpResyncMFADevice) ID() string { return "OperationInputValidation" } func (m *validateOpResyncMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ResyncMFADeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpResyncMFADeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpSetDefaultPolicyVersion struct { } func (*validateOpSetDefaultPolicyVersion) ID() string { return "OperationInputValidation" } func (m *validateOpSetDefaultPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*SetDefaultPolicyVersionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpSetDefaultPolicyVersionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpSetSecurityTokenServicePreferences struct { } func (*validateOpSetSecurityTokenServicePreferences) ID() string { return "OperationInputValidation" } func (m *validateOpSetSecurityTokenServicePreferences) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*SetSecurityTokenServicePreferencesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpSetSecurityTokenServicePreferencesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpSimulateCustomPolicy struct { } func (*validateOpSimulateCustomPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpSimulateCustomPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*SimulateCustomPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpSimulateCustomPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpSimulatePrincipalPolicy struct { } func (*validateOpSimulatePrincipalPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpSimulatePrincipalPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*SimulatePrincipalPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpSimulatePrincipalPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagInstanceProfile struct { } func (*validateOpTagInstanceProfile) ID() string { return "OperationInputValidation" } func (m *validateOpTagInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagInstanceProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagInstanceProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagMFADevice struct { } func (*validateOpTagMFADevice) ID() string { return "OperationInputValidation" } func (m *validateOpTagMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagMFADeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagMFADeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagOpenIDConnectProvider struct { } func (*validateOpTagOpenIDConnectProvider) ID() string { return "OperationInputValidation" } func (m *validateOpTagOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagOpenIDConnectProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagOpenIDConnectProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagPolicy struct { } func (*validateOpTagPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpTagPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagRole struct { } func (*validateOpTagRole) ID() string { return "OperationInputValidation" } func (m *validateOpTagRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagSAMLProvider struct { } func (*validateOpTagSAMLProvider) ID() string { return "OperationInputValidation" } func (m *validateOpTagSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagSAMLProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagSAMLProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagServerCertificate struct { } func (*validateOpTagServerCertificate) ID() string { return "OperationInputValidation" } func (m *validateOpTagServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagServerCertificateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagServerCertificateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagUser struct { } func (*validateOpTagUser) ID() string { return "OperationInputValidation" } func (m *validateOpTagUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagInstanceProfile struct { } func (*validateOpUntagInstanceProfile) ID() string { return "OperationInputValidation" } func (m *validateOpUntagInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagInstanceProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagInstanceProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagMFADevice struct { } func (*validateOpUntagMFADevice) ID() string { return "OperationInputValidation" } func (m *validateOpUntagMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagMFADeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagMFADeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagOpenIDConnectProvider struct { } func (*validateOpUntagOpenIDConnectProvider) ID() string { return "OperationInputValidation" } func (m *validateOpUntagOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagOpenIDConnectProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagOpenIDConnectProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagPolicy struct { } func (*validateOpUntagPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpUntagPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagRole struct { } func (*validateOpUntagRole) ID() string { return "OperationInputValidation" } func (m *validateOpUntagRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagSAMLProvider struct { } func (*validateOpUntagSAMLProvider) ID() string { return "OperationInputValidation" } func (m *validateOpUntagSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagSAMLProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagSAMLProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagServerCertificate struct { } func (*validateOpUntagServerCertificate) ID() string { return "OperationInputValidation" } func (m *validateOpUntagServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagServerCertificateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagServerCertificateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagUser struct { } func (*validateOpUntagUser) ID() string { return "OperationInputValidation" } func (m *validateOpUntagUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateAccessKey struct { } func (*validateOpUpdateAccessKey) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateAccessKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateAccessKeyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateAccessKeyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateAssumeRolePolicy struct { } func (*validateOpUpdateAssumeRolePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateAssumeRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateAssumeRolePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateAssumeRolePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateGroup struct { } func (*validateOpUpdateGroup) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateLoginProfile struct { } func (*validateOpUpdateLoginProfile) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateLoginProfileInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateLoginProfileInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateOpenIDConnectProviderThumbprint struct { } func (*validateOpUpdateOpenIDConnectProviderThumbprint) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateOpenIDConnectProviderThumbprint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateOpenIDConnectProviderThumbprintInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateOpenIDConnectProviderThumbprintInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateRoleDescription struct { } func (*validateOpUpdateRoleDescription) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateRoleDescription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateRoleDescriptionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateRoleDescriptionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateRole struct { } func (*validateOpUpdateRole) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateRoleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateRoleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateSAMLProvider struct { } func (*validateOpUpdateSAMLProvider) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateSAMLProviderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateSAMLProviderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateServerCertificate struct { } func (*validateOpUpdateServerCertificate) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateServerCertificateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateServerCertificateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateServiceSpecificCredential struct { } func (*validateOpUpdateServiceSpecificCredential) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateServiceSpecificCredential) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateServiceSpecificCredentialInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateServiceSpecificCredentialInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateSigningCertificate struct { } func (*validateOpUpdateSigningCertificate) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateSigningCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateSigningCertificateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateSigningCertificateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateSSHPublicKey struct { } func (*validateOpUpdateSSHPublicKey) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateSSHPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateSSHPublicKeyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateSSHPublicKeyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateUser struct { } func (*validateOpUpdateUser) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUploadServerCertificate struct { } func (*validateOpUploadServerCertificate) ID() string { return "OperationInputValidation" } func (m *validateOpUploadServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UploadServerCertificateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUploadServerCertificateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUploadSigningCertificate struct { } func (*validateOpUploadSigningCertificate) ID() string { return "OperationInputValidation" } func (m *validateOpUploadSigningCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UploadSigningCertificateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUploadSigningCertificateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUploadSSHPublicKey struct { } func (*validateOpUploadSSHPublicKey) ID() string { return "OperationInputValidation" } func (m *validateOpUploadSSHPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UploadSSHPublicKeyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUploadSSHPublicKeyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpAddClientIDToOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddClientIDToOpenIDConnectProvider{}, middleware.After) } func addOpAddRoleToInstanceProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddRoleToInstanceProfile{}, middleware.After) } func addOpAddUserToGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddUserToGroup{}, middleware.After) } func addOpAttachGroupPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAttachGroupPolicy{}, middleware.After) } func addOpAttachRolePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAttachRolePolicy{}, middleware.After) } func addOpAttachUserPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAttachUserPolicy{}, middleware.After) } func addOpChangePasswordValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpChangePassword{}, middleware.After) } func addOpCreateAccountAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateAccountAlias{}, middleware.After) } func addOpCreateGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateGroup{}, middleware.After) } func addOpCreateInstanceProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateInstanceProfile{}, middleware.After) } func addOpCreateLoginProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateLoginProfile{}, middleware.After) } func addOpCreateOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateOpenIDConnectProvider{}, middleware.After) } func addOpCreatePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreatePolicy{}, middleware.After) } func addOpCreatePolicyVersionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreatePolicyVersion{}, middleware.After) } func addOpCreateRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRole{}, middleware.After) } func addOpCreateSAMLProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateSAMLProvider{}, middleware.After) } func addOpCreateServiceLinkedRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateServiceLinkedRole{}, middleware.After) } func addOpCreateServiceSpecificCredentialValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateServiceSpecificCredential{}, middleware.After) } func addOpCreateUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateUser{}, middleware.After) } func addOpCreateVirtualMFADeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateVirtualMFADevice{}, middleware.After) } func addOpDeactivateMFADeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeactivateMFADevice{}, middleware.After) } func addOpDeleteAccessKeyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAccessKey{}, middleware.After) } func addOpDeleteAccountAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAccountAlias{}, middleware.After) } func addOpDeleteGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteGroup{}, middleware.After) } func addOpDeleteGroupPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteGroupPolicy{}, middleware.After) } func addOpDeleteInstanceProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteInstanceProfile{}, middleware.After) } func addOpDeleteLoginProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteLoginProfile{}, middleware.After) } func addOpDeleteOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteOpenIDConnectProvider{}, middleware.After) } func addOpDeletePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeletePolicy{}, middleware.After) } func addOpDeletePolicyVersionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeletePolicyVersion{}, middleware.After) } func addOpDeleteRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRole{}, middleware.After) } func addOpDeleteRolePermissionsBoundaryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRolePermissionsBoundary{}, middleware.After) } func addOpDeleteRolePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRolePolicy{}, middleware.After) } func addOpDeleteSAMLProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSAMLProvider{}, middleware.After) } func addOpDeleteServerCertificateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteServerCertificate{}, middleware.After) } func addOpDeleteServiceLinkedRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteServiceLinkedRole{}, middleware.After) } func addOpDeleteServiceSpecificCredentialValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteServiceSpecificCredential{}, middleware.After) } func addOpDeleteSigningCertificateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSigningCertificate{}, middleware.After) } func addOpDeleteSSHPublicKeyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSSHPublicKey{}, middleware.After) } func addOpDeleteUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteUser{}, middleware.After) } func addOpDeleteUserPermissionsBoundaryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteUserPermissionsBoundary{}, middleware.After) } func addOpDeleteUserPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteUserPolicy{}, middleware.After) } func addOpDeleteVirtualMFADeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteVirtualMFADevice{}, middleware.After) } func addOpDetachGroupPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDetachGroupPolicy{}, middleware.After) } func addOpDetachRolePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDetachRolePolicy{}, middleware.After) } func addOpDetachUserPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDetachUserPolicy{}, middleware.After) } func addOpEnableMFADeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpEnableMFADevice{}, middleware.After) } func addOpGenerateOrganizationsAccessReportValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGenerateOrganizationsAccessReport{}, middleware.After) } func addOpGenerateServiceLastAccessedDetailsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGenerateServiceLastAccessedDetails{}, middleware.After) } func addOpGetAccessKeyLastUsedValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetAccessKeyLastUsed{}, middleware.After) } func addOpGetContextKeysForCustomPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetContextKeysForCustomPolicy{}, middleware.After) } func addOpGetContextKeysForPrincipalPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetContextKeysForPrincipalPolicy{}, middleware.After) } func addOpGetGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetGroup{}, middleware.After) } func addOpGetGroupPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetGroupPolicy{}, middleware.After) } func addOpGetInstanceProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetInstanceProfile{}, middleware.After) } func addOpGetLoginProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetLoginProfile{}, middleware.After) } func addOpGetMFADeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMFADevice{}, middleware.After) } func addOpGetOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetOpenIDConnectProvider{}, middleware.After) } func addOpGetOrganizationsAccessReportValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetOrganizationsAccessReport{}, middleware.After) } func addOpGetPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetPolicy{}, middleware.After) } func addOpGetPolicyVersionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetPolicyVersion{}, middleware.After) } func addOpGetRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRole{}, middleware.After) } func addOpGetRolePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRolePolicy{}, middleware.After) } func addOpGetSAMLProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSAMLProvider{}, middleware.After) } func addOpGetServerCertificateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetServerCertificate{}, middleware.After) } func addOpGetServiceLastAccessedDetailsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetServiceLastAccessedDetails{}, middleware.After) } func addOpGetServiceLastAccessedDetailsWithEntitiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetServiceLastAccessedDetailsWithEntities{}, middleware.After) } func addOpGetServiceLinkedRoleDeletionStatusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetServiceLinkedRoleDeletionStatus{}, middleware.After) } func addOpGetSSHPublicKeyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSSHPublicKey{}, middleware.After) } func addOpGetUserPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetUserPolicy{}, middleware.After) } func addOpListAttachedGroupPoliciesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAttachedGroupPolicies{}, middleware.After) } func addOpListAttachedRolePoliciesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAttachedRolePolicies{}, middleware.After) } func addOpListAttachedUserPoliciesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAttachedUserPolicies{}, middleware.After) } func addOpListEntitiesForPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListEntitiesForPolicy{}, middleware.After) } func addOpListGroupPoliciesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListGroupPolicies{}, middleware.After) } func addOpListGroupsForUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListGroupsForUser{}, middleware.After) } func addOpListInstanceProfilesForRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListInstanceProfilesForRole{}, middleware.After) } func addOpListInstanceProfileTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListInstanceProfileTags{}, middleware.After) } func addOpListMFADeviceTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMFADeviceTags{}, middleware.After) } func addOpListOpenIDConnectProviderTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListOpenIDConnectProviderTags{}, middleware.After) } func addOpListPoliciesGrantingServiceAccessValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListPoliciesGrantingServiceAccess{}, middleware.After) } func addOpListPolicyTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListPolicyTags{}, middleware.After) } func addOpListPolicyVersionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListPolicyVersions{}, middleware.After) } func addOpListRolePoliciesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListRolePolicies{}, middleware.After) } func addOpListRoleTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListRoleTags{}, middleware.After) } func addOpListSAMLProviderTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListSAMLProviderTags{}, middleware.After) } func addOpListServerCertificateTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListServerCertificateTags{}, middleware.After) } func addOpListUserPoliciesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListUserPolicies{}, middleware.After) } func addOpListUserTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListUserTags{}, middleware.After) } func addOpPutGroupPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutGroupPolicy{}, middleware.After) } func addOpPutRolePermissionsBoundaryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutRolePermissionsBoundary{}, middleware.After) } func addOpPutRolePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutRolePolicy{}, middleware.After) } func addOpPutUserPermissionsBoundaryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutUserPermissionsBoundary{}, middleware.After) } func addOpPutUserPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutUserPolicy{}, middleware.After) } func addOpRemoveClientIDFromOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveClientIDFromOpenIDConnectProvider{}, middleware.After) } func addOpRemoveRoleFromInstanceProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveRoleFromInstanceProfile{}, middleware.After) } func addOpRemoveUserFromGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveUserFromGroup{}, middleware.After) } func addOpResetServiceSpecificCredentialValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpResetServiceSpecificCredential{}, middleware.After) } func addOpResyncMFADeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpResyncMFADevice{}, middleware.After) } func addOpSetDefaultPolicyVersionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSetDefaultPolicyVersion{}, middleware.After) } func addOpSetSecurityTokenServicePreferencesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSetSecurityTokenServicePreferences{}, middleware.After) } func addOpSimulateCustomPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSimulateCustomPolicy{}, middleware.After) } func addOpSimulatePrincipalPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSimulatePrincipalPolicy{}, middleware.After) } func addOpTagInstanceProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagInstanceProfile{}, middleware.After) } func addOpTagMFADeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagMFADevice{}, middleware.After) } func addOpTagOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagOpenIDConnectProvider{}, middleware.After) } func addOpTagPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagPolicy{}, middleware.After) } func addOpTagRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagRole{}, middleware.After) } func addOpTagSAMLProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagSAMLProvider{}, middleware.After) } func addOpTagServerCertificateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagServerCertificate{}, middleware.After) } func addOpTagUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagUser{}, middleware.After) } func addOpUntagInstanceProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagInstanceProfile{}, middleware.After) } func addOpUntagMFADeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagMFADevice{}, middleware.After) } func addOpUntagOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagOpenIDConnectProvider{}, middleware.After) } func addOpUntagPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagPolicy{}, middleware.After) } func addOpUntagRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagRole{}, middleware.After) } func addOpUntagSAMLProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagSAMLProvider{}, middleware.After) } func addOpUntagServerCertificateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagServerCertificate{}, middleware.After) } func addOpUntagUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagUser{}, middleware.After) } func addOpUpdateAccessKeyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateAccessKey{}, middleware.After) } func addOpUpdateAssumeRolePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateAssumeRolePolicy{}, middleware.After) } func addOpUpdateGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateGroup{}, middleware.After) } func addOpUpdateLoginProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateLoginProfile{}, middleware.After) } func addOpUpdateOpenIDConnectProviderThumbprintValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateOpenIDConnectProviderThumbprint{}, middleware.After) } func addOpUpdateRoleDescriptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRoleDescription{}, middleware.After) } func addOpUpdateRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRole{}, middleware.After) } func addOpUpdateSAMLProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateSAMLProvider{}, middleware.After) } func addOpUpdateServerCertificateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateServerCertificate{}, middleware.After) } func addOpUpdateServiceSpecificCredentialValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateServiceSpecificCredential{}, middleware.After) } func addOpUpdateSigningCertificateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateSigningCertificate{}, middleware.After) } func addOpUpdateSSHPublicKeyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateSSHPublicKey{}, middleware.After) } func addOpUpdateUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateUser{}, middleware.After) } func addOpUploadServerCertificateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUploadServerCertificate{}, middleware.After) } func addOpUploadSigningCertificateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUploadSigningCertificate{}, middleware.After) } func addOpUploadSSHPublicKeyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUploadSSHPublicKey{}, middleware.After) } func validateTag(v *types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tag"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTagListType(v []types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagListType"} for i := range v { if err := validateTag(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddClientIDToOpenIDConnectProviderInput(v *AddClientIDToOpenIDConnectProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddClientIDToOpenIDConnectProviderInput"} if v.OpenIDConnectProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) } if v.ClientID == nil { invalidParams.Add(smithy.NewErrParamRequired("ClientID")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddRoleToInstanceProfileInput(v *AddRoleToInstanceProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddRoleToInstanceProfileInput"} if v.InstanceProfileName == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) } if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddUserToGroupInput(v *AddUserToGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddUserToGroupInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAttachGroupPolicyInput(v *AttachGroupPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AttachGroupPolicyInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAttachRolePolicyInput(v *AttachRolePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AttachRolePolicyInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAttachUserPolicyInput(v *AttachUserPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AttachUserPolicyInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpChangePasswordInput(v *ChangePasswordInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ChangePasswordInput"} if v.OldPassword == nil { invalidParams.Add(smithy.NewErrParamRequired("OldPassword")) } if v.NewPassword == nil { invalidParams.Add(smithy.NewErrParamRequired("NewPassword")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateAccountAliasInput(v *CreateAccountAliasInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateAccountAliasInput"} if v.AccountAlias == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountAlias")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateGroupInput(v *CreateGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateGroupInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateInstanceProfileInput(v *CreateInstanceProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateInstanceProfileInput"} if v.InstanceProfileName == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) } if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateLoginProfileInput(v *CreateLoginProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateLoginProfileInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.Password == nil { invalidParams.Add(smithy.NewErrParamRequired("Password")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateOpenIDConnectProviderInput(v *CreateOpenIDConnectProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateOpenIDConnectProviderInput"} if v.Url == nil { invalidParams.Add(smithy.NewErrParamRequired("Url")) } if v.ThumbprintList == nil { invalidParams.Add(smithy.NewErrParamRequired("ThumbprintList")) } if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreatePolicyInput(v *CreatePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreatePolicyInput"} if v.PolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) } if v.PolicyDocument == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) } if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreatePolicyVersionInput(v *CreatePolicyVersionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreatePolicyVersionInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if v.PolicyDocument == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateRoleInput(v *CreateRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateRoleInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.AssumeRolePolicyDocument == nil { invalidParams.Add(smithy.NewErrParamRequired("AssumeRolePolicyDocument")) } if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateSAMLProviderInput(v *CreateSAMLProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateSAMLProviderInput"} if v.SAMLMetadataDocument == nil { invalidParams.Add(smithy.NewErrParamRequired("SAMLMetadataDocument")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateServiceLinkedRoleInput(v *CreateServiceLinkedRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateServiceLinkedRoleInput"} if v.AWSServiceName == nil { invalidParams.Add(smithy.NewErrParamRequired("AWSServiceName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateServiceSpecificCredentialInput(v *CreateServiceSpecificCredentialInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateServiceSpecificCredentialInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.ServiceName == nil { invalidParams.Add(smithy.NewErrParamRequired("ServiceName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateUserInput(v *CreateUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateUserInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateVirtualMFADeviceInput(v *CreateVirtualMFADeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateVirtualMFADeviceInput"} if v.VirtualMFADeviceName == nil { invalidParams.Add(smithy.NewErrParamRequired("VirtualMFADeviceName")) } if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeactivateMFADeviceInput(v *DeactivateMFADeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeactivateMFADeviceInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.SerialNumber == nil { invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteAccessKeyInput(v *DeleteAccessKeyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteAccessKeyInput"} if v.AccessKeyId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccessKeyId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteAccountAliasInput(v *DeleteAccountAliasInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteAccountAliasInput"} if v.AccountAlias == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountAlias")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteGroupInput(v *DeleteGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteGroupInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteGroupPolicyInput(v *DeleteGroupPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteGroupPolicyInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if v.PolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteInstanceProfileInput(v *DeleteInstanceProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteInstanceProfileInput"} if v.InstanceProfileName == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteLoginProfileInput(v *DeleteLoginProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteLoginProfileInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteOpenIDConnectProviderInput(v *DeleteOpenIDConnectProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteOpenIDConnectProviderInput"} if v.OpenIDConnectProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeletePolicyInput(v *DeletePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeletePolicyInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeletePolicyVersionInput(v *DeletePolicyVersionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeletePolicyVersionInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if v.VersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("VersionId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteRoleInput(v *DeleteRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteRoleInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteRolePermissionsBoundaryInput(v *DeleteRolePermissionsBoundaryInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteRolePermissionsBoundaryInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteRolePolicyInput(v *DeleteRolePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteRolePolicyInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.PolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteSAMLProviderInput(v *DeleteSAMLProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteSAMLProviderInput"} if v.SAMLProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteServerCertificateInput(v *DeleteServerCertificateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteServerCertificateInput"} if v.ServerCertificateName == nil { invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteServiceLinkedRoleInput(v *DeleteServiceLinkedRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteServiceLinkedRoleInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteServiceSpecificCredentialInput(v *DeleteServiceSpecificCredentialInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteServiceSpecificCredentialInput"} if v.ServiceSpecificCredentialId == nil { invalidParams.Add(smithy.NewErrParamRequired("ServiceSpecificCredentialId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteSigningCertificateInput(v *DeleteSigningCertificateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteSigningCertificateInput"} if v.CertificateId == nil { invalidParams.Add(smithy.NewErrParamRequired("CertificateId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteSSHPublicKeyInput(v *DeleteSSHPublicKeyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteSSHPublicKeyInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.SSHPublicKeyId == nil { invalidParams.Add(smithy.NewErrParamRequired("SSHPublicKeyId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteUserInput(v *DeleteUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteUserInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteUserPermissionsBoundaryInput(v *DeleteUserPermissionsBoundaryInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteUserPermissionsBoundaryInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteUserPolicyInput(v *DeleteUserPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteUserPolicyInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.PolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteVirtualMFADeviceInput(v *DeleteVirtualMFADeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteVirtualMFADeviceInput"} if v.SerialNumber == nil { invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDetachGroupPolicyInput(v *DetachGroupPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DetachGroupPolicyInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDetachRolePolicyInput(v *DetachRolePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DetachRolePolicyInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDetachUserPolicyInput(v *DetachUserPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DetachUserPolicyInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpEnableMFADeviceInput(v *EnableMFADeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EnableMFADeviceInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.SerialNumber == nil { invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) } if v.AuthenticationCode1 == nil { invalidParams.Add(smithy.NewErrParamRequired("AuthenticationCode1")) } if v.AuthenticationCode2 == nil { invalidParams.Add(smithy.NewErrParamRequired("AuthenticationCode2")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGenerateOrganizationsAccessReportInput(v *GenerateOrganizationsAccessReportInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GenerateOrganizationsAccessReportInput"} if v.EntityPath == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityPath")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGenerateServiceLastAccessedDetailsInput(v *GenerateServiceLastAccessedDetailsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GenerateServiceLastAccessedDetailsInput"} if v.Arn == nil { invalidParams.Add(smithy.NewErrParamRequired("Arn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetAccessKeyLastUsedInput(v *GetAccessKeyLastUsedInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetAccessKeyLastUsedInput"} if v.AccessKeyId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccessKeyId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetContextKeysForCustomPolicyInput(v *GetContextKeysForCustomPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetContextKeysForCustomPolicyInput"} if v.PolicyInputList == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyInputList")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetContextKeysForPrincipalPolicyInput(v *GetContextKeysForPrincipalPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetContextKeysForPrincipalPolicyInput"} if v.PolicySourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicySourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetGroupInput(v *GetGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetGroupInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetGroupPolicyInput(v *GetGroupPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetGroupPolicyInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if v.PolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetInstanceProfileInput(v *GetInstanceProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetInstanceProfileInput"} if v.InstanceProfileName == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetLoginProfileInput(v *GetLoginProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetLoginProfileInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetMFADeviceInput(v *GetMFADeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetMFADeviceInput"} if v.SerialNumber == nil { invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetOpenIDConnectProviderInput(v *GetOpenIDConnectProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetOpenIDConnectProviderInput"} if v.OpenIDConnectProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetOrganizationsAccessReportInput(v *GetOrganizationsAccessReportInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetOrganizationsAccessReportInput"} if v.JobId == nil { invalidParams.Add(smithy.NewErrParamRequired("JobId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetPolicyInput(v *GetPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetPolicyInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetPolicyVersionInput(v *GetPolicyVersionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetPolicyVersionInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if v.VersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("VersionId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetRoleInput(v *GetRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetRoleInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetRolePolicyInput(v *GetRolePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetRolePolicyInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.PolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetSAMLProviderInput(v *GetSAMLProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetSAMLProviderInput"} if v.SAMLProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetServerCertificateInput(v *GetServerCertificateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetServerCertificateInput"} if v.ServerCertificateName == nil { invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetServiceLastAccessedDetailsInput(v *GetServiceLastAccessedDetailsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetServiceLastAccessedDetailsInput"} if v.JobId == nil { invalidParams.Add(smithy.NewErrParamRequired("JobId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetServiceLastAccessedDetailsWithEntitiesInput(v *GetServiceLastAccessedDetailsWithEntitiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetServiceLastAccessedDetailsWithEntitiesInput"} if v.JobId == nil { invalidParams.Add(smithy.NewErrParamRequired("JobId")) } if v.ServiceNamespace == nil { invalidParams.Add(smithy.NewErrParamRequired("ServiceNamespace")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetServiceLinkedRoleDeletionStatusInput(v *GetServiceLinkedRoleDeletionStatusInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetServiceLinkedRoleDeletionStatusInput"} if v.DeletionTaskId == nil { invalidParams.Add(smithy.NewErrParamRequired("DeletionTaskId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetSSHPublicKeyInput(v *GetSSHPublicKeyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetSSHPublicKeyInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.SSHPublicKeyId == nil { invalidParams.Add(smithy.NewErrParamRequired("SSHPublicKeyId")) } if len(v.Encoding) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Encoding")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetUserPolicyInput(v *GetUserPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetUserPolicyInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.PolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListAttachedGroupPoliciesInput(v *ListAttachedGroupPoliciesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListAttachedGroupPoliciesInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListAttachedRolePoliciesInput(v *ListAttachedRolePoliciesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListAttachedRolePoliciesInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListAttachedUserPoliciesInput(v *ListAttachedUserPoliciesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListAttachedUserPoliciesInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListEntitiesForPolicyInput(v *ListEntitiesForPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListEntitiesForPolicyInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListGroupPoliciesInput(v *ListGroupPoliciesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListGroupPoliciesInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListGroupsForUserInput(v *ListGroupsForUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListGroupsForUserInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListInstanceProfilesForRoleInput(v *ListInstanceProfilesForRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListInstanceProfilesForRoleInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListInstanceProfileTagsInput(v *ListInstanceProfileTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListInstanceProfileTagsInput"} if v.InstanceProfileName == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListMFADeviceTagsInput(v *ListMFADeviceTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListMFADeviceTagsInput"} if v.SerialNumber == nil { invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListOpenIDConnectProviderTagsInput(v *ListOpenIDConnectProviderTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOpenIDConnectProviderTagsInput"} if v.OpenIDConnectProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListPoliciesGrantingServiceAccessInput(v *ListPoliciesGrantingServiceAccessInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListPoliciesGrantingServiceAccessInput"} if v.Arn == nil { invalidParams.Add(smithy.NewErrParamRequired("Arn")) } if v.ServiceNamespaces == nil { invalidParams.Add(smithy.NewErrParamRequired("ServiceNamespaces")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListPolicyTagsInput(v *ListPolicyTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListPolicyTagsInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListPolicyVersionsInput(v *ListPolicyVersionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListPolicyVersionsInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListRolePoliciesInput(v *ListRolePoliciesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListRolePoliciesInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListRoleTagsInput(v *ListRoleTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListRoleTagsInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListSAMLProviderTagsInput(v *ListSAMLProviderTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListSAMLProviderTagsInput"} if v.SAMLProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListServerCertificateTagsInput(v *ListServerCertificateTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListServerCertificateTagsInput"} if v.ServerCertificateName == nil { invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListUserPoliciesInput(v *ListUserPoliciesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListUserPoliciesInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListUserTagsInput(v *ListUserTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListUserTagsInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutGroupPolicyInput(v *PutGroupPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutGroupPolicyInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if v.PolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) } if v.PolicyDocument == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutRolePermissionsBoundaryInput(v *PutRolePermissionsBoundaryInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutRolePermissionsBoundaryInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.PermissionsBoundary == nil { invalidParams.Add(smithy.NewErrParamRequired("PermissionsBoundary")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutRolePolicyInput(v *PutRolePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutRolePolicyInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.PolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) } if v.PolicyDocument == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutUserPermissionsBoundaryInput(v *PutUserPermissionsBoundaryInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutUserPermissionsBoundaryInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.PermissionsBoundary == nil { invalidParams.Add(smithy.NewErrParamRequired("PermissionsBoundary")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutUserPolicyInput(v *PutUserPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutUserPolicyInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.PolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) } if v.PolicyDocument == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRemoveClientIDFromOpenIDConnectProviderInput(v *RemoveClientIDFromOpenIDConnectProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RemoveClientIDFromOpenIDConnectProviderInput"} if v.OpenIDConnectProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) } if v.ClientID == nil { invalidParams.Add(smithy.NewErrParamRequired("ClientID")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRemoveRoleFromInstanceProfileInput(v *RemoveRoleFromInstanceProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RemoveRoleFromInstanceProfileInput"} if v.InstanceProfileName == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) } if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRemoveUserFromGroupInput(v *RemoveUserFromGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RemoveUserFromGroupInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpResetServiceSpecificCredentialInput(v *ResetServiceSpecificCredentialInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ResetServiceSpecificCredentialInput"} if v.ServiceSpecificCredentialId == nil { invalidParams.Add(smithy.NewErrParamRequired("ServiceSpecificCredentialId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpResyncMFADeviceInput(v *ResyncMFADeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ResyncMFADeviceInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.SerialNumber == nil { invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) } if v.AuthenticationCode1 == nil { invalidParams.Add(smithy.NewErrParamRequired("AuthenticationCode1")) } if v.AuthenticationCode2 == nil { invalidParams.Add(smithy.NewErrParamRequired("AuthenticationCode2")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpSetDefaultPolicyVersionInput(v *SetDefaultPolicyVersionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SetDefaultPolicyVersionInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if v.VersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("VersionId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpSetSecurityTokenServicePreferencesInput(v *SetSecurityTokenServicePreferencesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SetSecurityTokenServicePreferencesInput"} if len(v.GlobalEndpointTokenVersion) == 0 { invalidParams.Add(smithy.NewErrParamRequired("GlobalEndpointTokenVersion")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpSimulateCustomPolicyInput(v *SimulateCustomPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SimulateCustomPolicyInput"} if v.PolicyInputList == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyInputList")) } if v.ActionNames == nil { invalidParams.Add(smithy.NewErrParamRequired("ActionNames")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpSimulatePrincipalPolicyInput(v *SimulatePrincipalPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SimulatePrincipalPolicyInput"} if v.PolicySourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicySourceArn")) } if v.ActionNames == nil { invalidParams.Add(smithy.NewErrParamRequired("ActionNames")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagInstanceProfileInput(v *TagInstanceProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagInstanceProfileInput"} if v.InstanceProfileName == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagMFADeviceInput(v *TagMFADeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagMFADeviceInput"} if v.SerialNumber == nil { invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagOpenIDConnectProviderInput(v *TagOpenIDConnectProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagOpenIDConnectProviderInput"} if v.OpenIDConnectProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagPolicyInput(v *TagPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagPolicyInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagRoleInput(v *TagRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagRoleInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagSAMLProviderInput(v *TagSAMLProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagSAMLProviderInput"} if v.SAMLProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagServerCertificateInput(v *TagServerCertificateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagServerCertificateInput"} if v.ServerCertificateName == nil { invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagUserInput(v *TagUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagUserInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagInstanceProfileInput(v *UntagInstanceProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagInstanceProfileInput"} if v.InstanceProfileName == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagMFADeviceInput(v *UntagMFADeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagMFADeviceInput"} if v.SerialNumber == nil { invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagOpenIDConnectProviderInput(v *UntagOpenIDConnectProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagOpenIDConnectProviderInput"} if v.OpenIDConnectProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagPolicyInput(v *UntagPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagPolicyInput"} if v.PolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagRoleInput(v *UntagRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagRoleInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagSAMLProviderInput(v *UntagSAMLProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagSAMLProviderInput"} if v.SAMLProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagServerCertificateInput(v *UntagServerCertificateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagServerCertificateInput"} if v.ServerCertificateName == nil { invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagUserInput(v *UntagUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagUserInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateAccessKeyInput(v *UpdateAccessKeyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateAccessKeyInput"} if v.AccessKeyId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccessKeyId")) } if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateAssumeRolePolicyInput(v *UpdateAssumeRolePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateAssumeRolePolicyInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.PolicyDocument == nil { invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateGroupInput(v *UpdateGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateGroupInput"} if v.GroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateLoginProfileInput(v *UpdateLoginProfileInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateLoginProfileInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateOpenIDConnectProviderThumbprintInput(v *UpdateOpenIDConnectProviderThumbprintInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateOpenIDConnectProviderThumbprintInput"} if v.OpenIDConnectProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) } if v.ThumbprintList == nil { invalidParams.Add(smithy.NewErrParamRequired("ThumbprintList")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateRoleDescriptionInput(v *UpdateRoleDescriptionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateRoleDescriptionInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if v.Description == nil { invalidParams.Add(smithy.NewErrParamRequired("Description")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateRoleInput(v *UpdateRoleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateRoleInput"} if v.RoleName == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateSAMLProviderInput(v *UpdateSAMLProviderInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateSAMLProviderInput"} if v.SAMLMetadataDocument == nil { invalidParams.Add(smithy.NewErrParamRequired("SAMLMetadataDocument")) } if v.SAMLProviderArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateServerCertificateInput(v *UpdateServerCertificateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateServerCertificateInput"} if v.ServerCertificateName == nil { invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateServiceSpecificCredentialInput(v *UpdateServiceSpecificCredentialInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateServiceSpecificCredentialInput"} if v.ServiceSpecificCredentialId == nil { invalidParams.Add(smithy.NewErrParamRequired("ServiceSpecificCredentialId")) } if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateSigningCertificateInput(v *UpdateSigningCertificateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateSigningCertificateInput"} if v.CertificateId == nil { invalidParams.Add(smithy.NewErrParamRequired("CertificateId")) } if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateSSHPublicKeyInput(v *UpdateSSHPublicKeyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateSSHPublicKeyInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.SSHPublicKeyId == nil { invalidParams.Add(smithy.NewErrParamRequired("SSHPublicKeyId")) } if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateUserInput(v *UpdateUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateUserInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUploadServerCertificateInput(v *UploadServerCertificateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UploadServerCertificateInput"} if v.ServerCertificateName == nil { invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) } if v.CertificateBody == nil { invalidParams.Add(smithy.NewErrParamRequired("CertificateBody")) } if v.PrivateKey == nil { invalidParams.Add(smithy.NewErrParamRequired("PrivateKey")) } if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUploadSigningCertificateInput(v *UploadSigningCertificateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UploadSigningCertificateInput"} if v.CertificateBody == nil { invalidParams.Add(smithy.NewErrParamRequired("CertificateBody")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUploadSSHPublicKeyInput(v *UploadSSHPublicKeyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UploadSSHPublicKeyInput"} if v.UserName == nil { invalidParams.Add(smithy.NewErrParamRequired("UserName")) } if v.SSHPublicKeyBody == nil { invalidParams.Add(smithy.NewErrParamRequired("SSHPublicKeyBody")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
5,621
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver IAM endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "iam.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "iam-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "iam-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "iam.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: false, PartitionEndpoint: "aws-global", Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "aws-global", }: endpoints.Endpoint{ Hostname: "iam.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, }, endpoints.EndpointKey{ Region: "aws-global", Variant: endpoints.FIPSVariant, }: { Hostname: "iam-fips.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, }, endpoints.EndpointKey{ Region: "aws-global-fips", }: endpoints.Endpoint{ Hostname: "iam-fips.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "iam", }: endpoints.Endpoint{ CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "iam", Variant: endpoints.FIPSVariant, }: { Hostname: "iam-fips.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "iam-fips", }: endpoints.Endpoint{ Hostname: "iam-fips.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "iam.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "iam-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "iam-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "iam.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: false, PartitionEndpoint: "aws-cn-global", Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "aws-cn-global", }: endpoints.Endpoint{ Hostname: "iam.cn-north-1.amazonaws.com.cn", CredentialScope: endpoints.CredentialScope{ Region: "cn-north-1", }, }, }, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "iam-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "iam.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: false, PartitionEndpoint: "aws-iso-global", Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "aws-iso-global", }: endpoints.Endpoint{ Hostname: "iam.us-iso-east-1.c2s.ic.gov", CredentialScope: endpoints.CredentialScope{ Region: "us-iso-east-1", }, }, }, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "iam-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "iam.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: false, PartitionEndpoint: "aws-iso-b-global", Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "aws-iso-b-global", }: endpoints.Endpoint{ Hostname: "iam.us-isob-east-1.sc2s.sgov.gov", CredentialScope: endpoints.CredentialScope{ Region: "us-isob-east-1", }, }, }, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "iam-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "iam.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "iam-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "iam.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "iam.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "iam-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "iam-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "iam.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: false, PartitionEndpoint: "aws-us-gov-global", Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "aws-us-gov-global", }: endpoints.Endpoint{ Hostname: "iam.us-gov.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, }, endpoints.EndpointKey{ Region: "aws-us-gov-global", Variant: endpoints.FIPSVariant, }: { Hostname: "iam.us-gov.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, }, endpoints.EndpointKey{ Region: "aws-us-gov-global-fips", }: endpoints.Endpoint{ Hostname: "iam.us-gov.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "iam-govcloud", }: endpoints.Endpoint{ CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "iam-govcloud", Variant: endpoints.FIPSVariant, }: { Hostname: "iam.us-gov.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "iam-govcloud-fips", }: endpoints.Endpoint{ Hostname: "iam.us-gov.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, }, }, }
442
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type AccessAdvisorUsageGranularityType string // Enum values for AccessAdvisorUsageGranularityType const ( AccessAdvisorUsageGranularityTypeServiceLevel AccessAdvisorUsageGranularityType = "SERVICE_LEVEL" AccessAdvisorUsageGranularityTypeActionLevel AccessAdvisorUsageGranularityType = "ACTION_LEVEL" ) // Values returns all known values for AccessAdvisorUsageGranularityType. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (AccessAdvisorUsageGranularityType) Values() []AccessAdvisorUsageGranularityType { return []AccessAdvisorUsageGranularityType{ "SERVICE_LEVEL", "ACTION_LEVEL", } } type AssignmentStatusType string // Enum values for AssignmentStatusType const ( AssignmentStatusTypeAssigned AssignmentStatusType = "Assigned" AssignmentStatusTypeUnassigned AssignmentStatusType = "Unassigned" AssignmentStatusTypeAny AssignmentStatusType = "Any" ) // Values returns all known values for AssignmentStatusType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AssignmentStatusType) Values() []AssignmentStatusType { return []AssignmentStatusType{ "Assigned", "Unassigned", "Any", } } type ContextKeyTypeEnum string // Enum values for ContextKeyTypeEnum const ( ContextKeyTypeEnumString ContextKeyTypeEnum = "string" ContextKeyTypeEnumStringList ContextKeyTypeEnum = "stringList" ContextKeyTypeEnumNumeric ContextKeyTypeEnum = "numeric" ContextKeyTypeEnumNumericList ContextKeyTypeEnum = "numericList" ContextKeyTypeEnumBoolean ContextKeyTypeEnum = "boolean" ContextKeyTypeEnumBooleanList ContextKeyTypeEnum = "booleanList" ContextKeyTypeEnumIp ContextKeyTypeEnum = "ip" ContextKeyTypeEnumIpList ContextKeyTypeEnum = "ipList" ContextKeyTypeEnumBinary ContextKeyTypeEnum = "binary" ContextKeyTypeEnumBinaryList ContextKeyTypeEnum = "binaryList" ContextKeyTypeEnumDate ContextKeyTypeEnum = "date" ContextKeyTypeEnumDateList ContextKeyTypeEnum = "dateList" ) // Values returns all known values for ContextKeyTypeEnum. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ContextKeyTypeEnum) Values() []ContextKeyTypeEnum { return []ContextKeyTypeEnum{ "string", "stringList", "numeric", "numericList", "boolean", "booleanList", "ip", "ipList", "binary", "binaryList", "date", "dateList", } } type DeletionTaskStatusType string // Enum values for DeletionTaskStatusType const ( DeletionTaskStatusTypeSucceeded DeletionTaskStatusType = "SUCCEEDED" DeletionTaskStatusTypeInProgress DeletionTaskStatusType = "IN_PROGRESS" DeletionTaskStatusTypeFailed DeletionTaskStatusType = "FAILED" DeletionTaskStatusTypeNotStarted DeletionTaskStatusType = "NOT_STARTED" ) // Values returns all known values for DeletionTaskStatusType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DeletionTaskStatusType) Values() []DeletionTaskStatusType { return []DeletionTaskStatusType{ "SUCCEEDED", "IN_PROGRESS", "FAILED", "NOT_STARTED", } } type EncodingType string // Enum values for EncodingType const ( EncodingTypeSsh EncodingType = "SSH" EncodingTypePem EncodingType = "PEM" ) // Values returns all known values for EncodingType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (EncodingType) Values() []EncodingType { return []EncodingType{ "SSH", "PEM", } } type EntityType string // Enum values for EntityType const ( EntityTypeUser EntityType = "User" EntityTypeRole EntityType = "Role" EntityTypeGroup EntityType = "Group" EntityTypeLocalManagedPolicy EntityType = "LocalManagedPolicy" EntityTypeAWSManagedPolicy EntityType = "AWSManagedPolicy" ) // Values returns all known values for EntityType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (EntityType) Values() []EntityType { return []EntityType{ "User", "Role", "Group", "LocalManagedPolicy", "AWSManagedPolicy", } } type GlobalEndpointTokenVersion string // Enum values for GlobalEndpointTokenVersion const ( GlobalEndpointTokenVersionV1Token GlobalEndpointTokenVersion = "v1Token" GlobalEndpointTokenVersionV2Token GlobalEndpointTokenVersion = "v2Token" ) // Values returns all known values for GlobalEndpointTokenVersion. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (GlobalEndpointTokenVersion) Values() []GlobalEndpointTokenVersion { return []GlobalEndpointTokenVersion{ "v1Token", "v2Token", } } type JobStatusType string // Enum values for JobStatusType const ( JobStatusTypeInProgress JobStatusType = "IN_PROGRESS" JobStatusTypeCompleted JobStatusType = "COMPLETED" JobStatusTypeFailed JobStatusType = "FAILED" ) // Values returns all known values for JobStatusType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (JobStatusType) Values() []JobStatusType { return []JobStatusType{ "IN_PROGRESS", "COMPLETED", "FAILED", } } type PermissionsBoundaryAttachmentType string // Enum values for PermissionsBoundaryAttachmentType const ( PermissionsBoundaryAttachmentTypePolicy PermissionsBoundaryAttachmentType = "PermissionsBoundaryPolicy" ) // Values returns all known values for PermissionsBoundaryAttachmentType. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (PermissionsBoundaryAttachmentType) Values() []PermissionsBoundaryAttachmentType { return []PermissionsBoundaryAttachmentType{ "PermissionsBoundaryPolicy", } } type PolicyEvaluationDecisionType string // Enum values for PolicyEvaluationDecisionType const ( PolicyEvaluationDecisionTypeAllowed PolicyEvaluationDecisionType = "allowed" PolicyEvaluationDecisionTypeExplicitDeny PolicyEvaluationDecisionType = "explicitDeny" PolicyEvaluationDecisionTypeImplicitDeny PolicyEvaluationDecisionType = "implicitDeny" ) // Values returns all known values for PolicyEvaluationDecisionType. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (PolicyEvaluationDecisionType) Values() []PolicyEvaluationDecisionType { return []PolicyEvaluationDecisionType{ "allowed", "explicitDeny", "implicitDeny", } } type PolicyOwnerEntityType string // Enum values for PolicyOwnerEntityType const ( PolicyOwnerEntityTypeUser PolicyOwnerEntityType = "USER" PolicyOwnerEntityTypeRole PolicyOwnerEntityType = "ROLE" PolicyOwnerEntityTypeGroup PolicyOwnerEntityType = "GROUP" ) // Values returns all known values for PolicyOwnerEntityType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PolicyOwnerEntityType) Values() []PolicyOwnerEntityType { return []PolicyOwnerEntityType{ "USER", "ROLE", "GROUP", } } type PolicyScopeType string // Enum values for PolicyScopeType const ( PolicyScopeTypeAll PolicyScopeType = "All" PolicyScopeTypeAws PolicyScopeType = "AWS" PolicyScopeTypeLocal PolicyScopeType = "Local" ) // Values returns all known values for PolicyScopeType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PolicyScopeType) Values() []PolicyScopeType { return []PolicyScopeType{ "All", "AWS", "Local", } } type PolicySourceType string // Enum values for PolicySourceType const ( PolicySourceTypeUser PolicySourceType = "user" PolicySourceTypeGroup PolicySourceType = "group" PolicySourceTypeRole PolicySourceType = "role" PolicySourceTypeAwsManaged PolicySourceType = "aws-managed" PolicySourceTypeUserManaged PolicySourceType = "user-managed" PolicySourceTypeResource PolicySourceType = "resource" PolicySourceTypeNone PolicySourceType = "none" ) // Values returns all known values for PolicySourceType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PolicySourceType) Values() []PolicySourceType { return []PolicySourceType{ "user", "group", "role", "aws-managed", "user-managed", "resource", "none", } } type PolicyType string // Enum values for PolicyType const ( PolicyTypeInline PolicyType = "INLINE" PolicyTypeManaged PolicyType = "MANAGED" ) // Values returns all known values for PolicyType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (PolicyType) Values() []PolicyType { return []PolicyType{ "INLINE", "MANAGED", } } type PolicyUsageType string // Enum values for PolicyUsageType const ( PolicyUsageTypePermissionsPolicy PolicyUsageType = "PermissionsPolicy" PolicyUsageTypePermissionsBoundary PolicyUsageType = "PermissionsBoundary" ) // Values returns all known values for PolicyUsageType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PolicyUsageType) Values() []PolicyUsageType { return []PolicyUsageType{ "PermissionsPolicy", "PermissionsBoundary", } } type ReportFormatType string // Enum values for ReportFormatType const ( ReportFormatTypeTextCsv ReportFormatType = "text/csv" ) // Values returns all known values for ReportFormatType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ReportFormatType) Values() []ReportFormatType { return []ReportFormatType{ "text/csv", } } type ReportStateType string // Enum values for ReportStateType const ( ReportStateTypeStarted ReportStateType = "STARTED" ReportStateTypeInprogress ReportStateType = "INPROGRESS" ReportStateTypeComplete ReportStateType = "COMPLETE" ) // Values returns all known values for ReportStateType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ReportStateType) Values() []ReportStateType { return []ReportStateType{ "STARTED", "INPROGRESS", "COMPLETE", } } type SortKeyType string // Enum values for SortKeyType const ( SortKeyTypeServiceNamespaceAscending SortKeyType = "SERVICE_NAMESPACE_ASCENDING" SortKeyTypeServiceNamespaceDescending SortKeyType = "SERVICE_NAMESPACE_DESCENDING" SortKeyTypeLastAuthenticatedTimeAscending SortKeyType = "LAST_AUTHENTICATED_TIME_ASCENDING" SortKeyTypeLastAuthenticatedTimeDescending SortKeyType = "LAST_AUTHENTICATED_TIME_DESCENDING" ) // Values returns all known values for SortKeyType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (SortKeyType) Values() []SortKeyType { return []SortKeyType{ "SERVICE_NAMESPACE_ASCENDING", "SERVICE_NAMESPACE_DESCENDING", "LAST_AUTHENTICATED_TIME_ASCENDING", "LAST_AUTHENTICATED_TIME_DESCENDING", } } type StatusType string // Enum values for StatusType const ( StatusTypeActive StatusType = "Active" StatusTypeInactive StatusType = "Inactive" ) // Values returns all known values for StatusType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (StatusType) Values() []StatusType { return []StatusType{ "Active", "Inactive", } } type SummaryKeyType string // Enum values for SummaryKeyType const ( SummaryKeyTypeUsers SummaryKeyType = "Users" SummaryKeyTypeUsersQuota SummaryKeyType = "UsersQuota" SummaryKeyTypeGroups SummaryKeyType = "Groups" SummaryKeyTypeGroupsQuota SummaryKeyType = "GroupsQuota" SummaryKeyTypeServerCertificates SummaryKeyType = "ServerCertificates" SummaryKeyTypeServerCertificatesQuota SummaryKeyType = "ServerCertificatesQuota" SummaryKeyTypeUserPolicySizeQuota SummaryKeyType = "UserPolicySizeQuota" SummaryKeyTypeGroupPolicySizeQuota SummaryKeyType = "GroupPolicySizeQuota" SummaryKeyTypeGroupsPerUserQuota SummaryKeyType = "GroupsPerUserQuota" SummaryKeyTypeSigningCertificatesPerUserQuota SummaryKeyType = "SigningCertificatesPerUserQuota" SummaryKeyTypeAccessKeysPerUserQuota SummaryKeyType = "AccessKeysPerUserQuota" SummaryKeyTypeMFADevices SummaryKeyType = "MFADevices" SummaryKeyTypeMFADevicesInUse SummaryKeyType = "MFADevicesInUse" SummaryKeyTypeAccountMFAEnabled SummaryKeyType = "AccountMFAEnabled" SummaryKeyTypeAccountAccessKeysPresent SummaryKeyType = "AccountAccessKeysPresent" SummaryKeyTypeAccountSigningCertificatesPresent SummaryKeyType = "AccountSigningCertificatesPresent" SummaryKeyTypeAttachedPoliciesPerGroupQuota SummaryKeyType = "AttachedPoliciesPerGroupQuota" SummaryKeyTypeAttachedPoliciesPerRoleQuota SummaryKeyType = "AttachedPoliciesPerRoleQuota" SummaryKeyTypeAttachedPoliciesPerUserQuota SummaryKeyType = "AttachedPoliciesPerUserQuota" SummaryKeyTypePolicies SummaryKeyType = "Policies" SummaryKeyTypePoliciesQuota SummaryKeyType = "PoliciesQuota" SummaryKeyTypePolicySizeQuota SummaryKeyType = "PolicySizeQuota" SummaryKeyTypePolicyVersionsInUse SummaryKeyType = "PolicyVersionsInUse" SummaryKeyTypePolicyVersionsInUseQuota SummaryKeyType = "PolicyVersionsInUseQuota" SummaryKeyTypeVersionsPerPolicyQuota SummaryKeyType = "VersionsPerPolicyQuota" SummaryKeyTypeGlobalEndpointTokenVersion SummaryKeyType = "GlobalEndpointTokenVersion" ) // Values returns all known values for SummaryKeyType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (SummaryKeyType) Values() []SummaryKeyType { return []SummaryKeyType{ "Users", "UsersQuota", "Groups", "GroupsQuota", "ServerCertificates", "ServerCertificatesQuota", "UserPolicySizeQuota", "GroupPolicySizeQuota", "GroupsPerUserQuota", "SigningCertificatesPerUserQuota", "AccessKeysPerUserQuota", "MFADevices", "MFADevicesInUse", "AccountMFAEnabled", "AccountAccessKeysPresent", "AccountSigningCertificatesPresent", "AttachedPoliciesPerGroupQuota", "AttachedPoliciesPerRoleQuota", "AttachedPoliciesPerUserQuota", "Policies", "PoliciesQuota", "PolicySizeQuota", "PolicyVersionsInUse", "PolicyVersionsInUseQuota", "VersionsPerPolicyQuota", "GlobalEndpointTokenVersion", } }
467
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // The request was rejected because multiple requests to change this object were // submitted simultaneously. Wait a few minutes and submit your request again. type ConcurrentModificationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ConcurrentModificationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ConcurrentModificationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ConcurrentModification" } return *e.ErrorCodeOverride } func (e *ConcurrentModificationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the most recent credential report has expired. // To generate a new credential report, use GenerateCredentialReport . For more // information about credential report expiration, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) // in the IAM User Guide. type CredentialReportExpiredException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *CredentialReportExpiredException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *CredentialReportExpiredException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *CredentialReportExpiredException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ReportExpired" } return *e.ErrorCodeOverride } func (e *CredentialReportExpiredException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the credential report does not exist. To // generate a credential report, use GenerateCredentialReport . type CredentialReportNotPresentException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *CredentialReportNotPresentException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *CredentialReportNotPresentException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *CredentialReportNotPresentException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ReportNotPresent" } return *e.ErrorCodeOverride } func (e *CredentialReportNotPresentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the credential report is still being generated. type CredentialReportNotReadyException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *CredentialReportNotReadyException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *CredentialReportNotReadyException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *CredentialReportNotReadyException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ReportInProgress" } return *e.ErrorCodeOverride } func (e *CredentialReportNotReadyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because it attempted to delete a resource that has // attached subordinate entities. The error message describes these entities. type DeleteConflictException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DeleteConflictException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DeleteConflictException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DeleteConflictException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DeleteConflict" } return *e.ErrorCodeOverride } func (e *DeleteConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the same certificate is associated with an IAM // user in the account. type DuplicateCertificateException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DuplicateCertificateException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DuplicateCertificateException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DuplicateCertificateException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DuplicateCertificate" } return *e.ErrorCodeOverride } func (e *DuplicateCertificateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the SSH public key is already associated with // the specified IAM user. type DuplicateSSHPublicKeyException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DuplicateSSHPublicKeyException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DuplicateSSHPublicKeyException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DuplicateSSHPublicKeyException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DuplicateSSHPublicKey" } return *e.ErrorCodeOverride } func (e *DuplicateSSHPublicKeyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because it attempted to create a resource that already // exists. type EntityAlreadyExistsException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EntityAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EntityAlreadyExistsException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EntityAlreadyExistsException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EntityAlreadyExists" } return *e.ErrorCodeOverride } func (e *EntityAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because it referenced an entity that is temporarily // unmodifiable, such as a user name that was deleted and then recreated. The error // indicates that the request is likely to succeed if you try again after waiting // several minutes. The error message describes the entity. type EntityTemporarilyUnmodifiableException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EntityTemporarilyUnmodifiableException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EntityTemporarilyUnmodifiableException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EntityTemporarilyUnmodifiableException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EntityTemporarilyUnmodifiable" } return *e.ErrorCodeOverride } func (e *EntityTemporarilyUnmodifiableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the authentication code was not recognized. // The error message describes the specific error. type InvalidAuthenticationCodeException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidAuthenticationCodeException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidAuthenticationCodeException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidAuthenticationCodeException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidAuthenticationCode" } return *e.ErrorCodeOverride } func (e *InvalidAuthenticationCodeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the certificate is invalid. type InvalidCertificateException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidCertificateException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidCertificateException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidCertificateException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidCertificate" } return *e.ErrorCodeOverride } func (e *InvalidCertificateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because an invalid or out-of-range value was supplied // for an input parameter. type InvalidInputException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidInputException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidInputException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidInput" } return *e.ErrorCodeOverride } func (e *InvalidInputException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the public key is malformed or otherwise // invalid. type InvalidPublicKeyException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidPublicKeyException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidPublicKeyException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidPublicKeyException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidPublicKey" } return *e.ErrorCodeOverride } func (e *InvalidPublicKeyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the type of user for the transaction was // incorrect. type InvalidUserTypeException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidUserTypeException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidUserTypeException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidUserTypeException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidUserType" } return *e.ErrorCodeOverride } func (e *InvalidUserTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the public key certificate and the private key // do not match. type KeyPairMismatchException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *KeyPairMismatchException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *KeyPairMismatchException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *KeyPairMismatchException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "KeyPairMismatch" } return *e.ErrorCodeOverride } func (e *KeyPairMismatchException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because it attempted to create resources beyond the // current Amazon Web Services account limits. The error message describes the // limit exceeded. type LimitExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *LimitExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *LimitExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "LimitExceeded" } return *e.ErrorCodeOverride } func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the certificate was malformed or expired. The // error message describes the specific error. type MalformedCertificateException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *MalformedCertificateException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *MalformedCertificateException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *MalformedCertificateException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "MalformedCertificate" } return *e.ErrorCodeOverride } func (e *MalformedCertificateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the policy document was malformed. The error // message describes the specific error. type MalformedPolicyDocumentException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *MalformedPolicyDocumentException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *MalformedPolicyDocumentException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *MalformedPolicyDocumentException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "MalformedPolicyDocument" } return *e.ErrorCodeOverride } func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because it referenced a resource entity that does not // exist. The error message describes the resource. type NoSuchEntityException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *NoSuchEntityException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *NoSuchEntityException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *NoSuchEntityException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "NoSuchEntity" } return *e.ErrorCodeOverride } func (e *NoSuchEntityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the provided password did not meet the // requirements imposed by the account password policy. type PasswordPolicyViolationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *PasswordPolicyViolationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *PasswordPolicyViolationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *PasswordPolicyViolationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "PasswordPolicyViolation" } return *e.ErrorCodeOverride } func (e *PasswordPolicyViolationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request failed because a provided policy could not be successfully // evaluated. An additional detailed message indicates the source of the failure. type PolicyEvaluationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *PolicyEvaluationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *PolicyEvaluationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *PolicyEvaluationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "PolicyEvaluation" } return *e.ErrorCodeOverride } func (e *PolicyEvaluationException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The request failed because Amazon Web Services service role policies can only // be attached to the service-linked role for that service. type PolicyNotAttachableException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *PolicyNotAttachableException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *PolicyNotAttachableException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *PolicyNotAttachableException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "PolicyNotAttachable" } return *e.ErrorCodeOverride } func (e *PolicyNotAttachableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request failed because the maximum number of concurrent requests for this // account are already running. type ReportGenerationLimitExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ReportGenerationLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ReportGenerationLimitExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ReportGenerationLimitExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ReportGenerationLimitExceeded" } return *e.ErrorCodeOverride } func (e *ReportGenerationLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request processing has failed because of an unknown error, exception or // failure. type ServiceFailureException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ServiceFailureException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ServiceFailureException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ServiceFailureException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ServiceFailure" } return *e.ErrorCodeOverride } func (e *ServiceFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The specified service does not support service-specific credentials. type ServiceNotSupportedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ServiceNotSupportedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ServiceNotSupportedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ServiceNotSupportedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "NotSupportedService" } return *e.ErrorCodeOverride } func (e *ServiceNotSupportedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because service-linked roles are protected Amazon Web // Services resources. Only the service that depends on the service-linked role can // modify or delete the role on your behalf. The error message includes the name of // the service that depends on this service-linked role. You must request the // change through that service. type UnmodifiableEntityException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *UnmodifiableEntityException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnmodifiableEntityException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnmodifiableEntityException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnmodifiableEntity" } return *e.ErrorCodeOverride } func (e *UnmodifiableEntityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the public key encoding format is unsupported // or unrecognized. type UnrecognizedPublicKeyEncodingException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *UnrecognizedPublicKeyEncodingException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnrecognizedPublicKeyEncodingException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnrecognizedPublicKeyEncodingException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnrecognizedPublicKeyEncoding" } return *e.ErrorCodeOverride } func (e *UnrecognizedPublicKeyEncodingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
753
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( smithydocument "github.com/aws/smithy-go/document" "time" ) // An object that contains details about when a principal in the reported // Organizations entity last attempted to access an Amazon Web Services service. A // principal can be an IAM user, an IAM role, or the Amazon Web Services account // root user within the reported Organizations entity. This data type is a response // element in the GetOrganizationsAccessReport operation. type AccessDetail struct { // The name of the service in which access was attempted. // // This member is required. ServiceName *string // The namespace of the service in which access was attempted. To learn the // service namespace of a service, see Actions, resources, and condition keys for // Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) // in the Service Authorization Reference. Choose the name of the service to view // details for that service. In the first paragraph, find the service prefix. For // example, (service prefix: a4b) . For more information about service namespaces, // see Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // This member is required. ServiceNamespace *string // The path of the Organizations entity (root, organizational unit, or account) // from which an authenticated principal last attempted to access the service. // Amazon Web Services does not report unauthenticated requests. This field is null // if no principals (IAM users, IAM roles, or root user) in the reported // Organizations entity attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . EntityPath *string // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when an authenticated principal most recently attempted to access the service. // Amazon Web Services does not report unauthenticated requests. This field is null // if no principals in the reported Organizations entity attempted to access the // service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . LastAuthenticatedTime *time.Time // The Region where the last service access attempt occurred. This field is null // if no principals in the reported Organizations entity attempted to access the // service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . Region *string // The number of accounts with authenticated principals (root user, IAM users, and // IAM roles) that attempted to access the service in the tracking period. TotalAuthenticatedEntities *int32 noSmithyDocumentSerde } // Contains information about an Amazon Web Services access key. This data type is // used as a response element in the CreateAccessKey and ListAccessKeys // operations. The SecretAccessKey value is returned only in response to // CreateAccessKey . You can get a secret access key only when you first create an // access key; you cannot recover the secret access key later. If you lose a secret // access key, you must create a new access key. type AccessKey struct { // The ID for this access key. // // This member is required. AccessKeyId *string // The secret key used to sign requests. // // This member is required. SecretAccessKey *string // The status of the access key. Active means that the key is valid for API calls, // while Inactive means it is not. // // This member is required. Status StatusType // The name of the IAM user that the access key is associated with. // // This member is required. UserName *string // The date when the access key was created. CreateDate *time.Time noSmithyDocumentSerde } // Contains information about the last time an Amazon Web Services access key was // used since IAM began tracking this information on April 22, 2015. This data type // is used as a response element in the GetAccessKeyLastUsed operation. type AccessKeyLastUsed struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the access key was most recently used. This field is null in the // following situations: // - The user does not have an access key. // - An access key exists but has not been used since IAM began tracking this // information. // - There is no sign-in data associated with the user. // // This member is required. LastUsedDate *time.Time // The Amazon Web Services Region where this access key was most recently used. // The value for this field is "N/A" in the following situations: // - The user does not have an access key. // - An access key exists but has not been used since IAM began tracking this // information. // - There is no sign-in data associated with the user. // For more information about Amazon Web Services Regions, see Regions and // endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html) in the // Amazon Web Services General Reference. // // This member is required. Region *string // The name of the Amazon Web Services service with which this access key was most // recently used. The value of this field is "N/A" in the following situations: // - The user does not have an access key. // - An access key exists but has not been used since IAM started tracking this // information. // - There is no sign-in data associated with the user. // // This member is required. ServiceName *string noSmithyDocumentSerde } // Contains information about an Amazon Web Services access key, without its // secret key. This data type is used as a response element in the ListAccessKeys // operation. type AccessKeyMetadata struct { // The ID for this access key. AccessKeyId *string // The date when the access key was created. CreateDate *time.Time // The status of the access key. Active means that the key is valid for API calls; // Inactive means it is not. Status StatusType // The name of the IAM user that the key is associated with. UserName *string noSmithyDocumentSerde } // Contains information about an attached permissions boundary. An attached // permissions boundary is a managed policy that has been attached to a user or // role to set the permissions boundary. For more information about permissions // boundaries, see Permissions boundaries for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. type AttachedPermissionsBoundary struct { // The ARN of the policy used to set the permissions boundary for the user or role. PermissionsBoundaryArn *string // The permissions boundary usage type that indicates what type of IAM resource is // used as the permissions boundary for an entity. This data type can only have a // value of Policy . PermissionsBoundaryType PermissionsBoundaryAttachmentType noSmithyDocumentSerde } // Contains information about an attached policy. An attached policy is a managed // policy that has been attached to a user, group, or role. This data type is used // as a response element in the ListAttachedGroupPolicies , // ListAttachedRolePolicies , ListAttachedUserPolicies , and // GetAccountAuthorizationDetails operations. For more information about managed // policies, refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. type AttachedPolicy struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web // Services resources. For more information about ARNs, go to Amazon Resource // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. PolicyArn *string // The friendly name of the attached policy. PolicyName *string noSmithyDocumentSerde } // Contains information about a condition context key. It includes the name of the // key and specifies the value (or values, if the context key supports multiple // values) to use in the simulation. This information is used when evaluating the // Condition elements of the input policies. This data type is used as an input // parameter to SimulateCustomPolicy and SimulatePrincipalPolicy . type ContextEntry struct { // The full name of a condition context key, including the service prefix. For // example, aws:SourceIp or s3:VersionId . ContextKeyName *string // The data type of the value (or values) specified in the ContextKeyValues // parameter. ContextKeyType ContextKeyTypeEnum // The value (or values, if the condition context key supports multiple values) to // provide to the simulation when the key is referenced by a Condition element in // an input policy. ContextKeyValues []string noSmithyDocumentSerde } // The reason that the service-linked role deletion failed. This data type is used // as a response element in the GetServiceLinkedRoleDeletionStatus operation. type DeletionTaskFailureReasonType struct { // A short description of the reason that the service-linked role deletion failed. Reason *string // A list of objects that contains details about the service-linked role deletion // failure, if that information is returned by the service. If the service-linked // role has active sessions or if any resources that were used by the role have not // been deleted from the linked service, the role can't be deleted. This parameter // includes a list of the resources that are associated with the role and the // Region in which the resources are being used. RoleUsageList []RoleUsageType noSmithyDocumentSerde } // An object that contains details about when the IAM entities (users or roles) // were last used in an attempt to access the specified Amazon Web Services // service. This data type is a response element in the // GetServiceLastAccessedDetailsWithEntities operation. type EntityDetails struct { // The EntityInfo object that contains details about the entity (user or role). // // This member is required. EntityInfo *EntityInfo // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the authenticated entity last attempted to access Amazon Web Services. // Amazon Web Services does not report unauthenticated requests. This field is null // if no IAM entities attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . LastAuthenticated *time.Time noSmithyDocumentSerde } // Contains details about the specified entity (user or role). This data type is // an element of the EntityDetails object. type EntityInfo struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web // Services resources. For more information about ARNs, go to Amazon Resource // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. // // This member is required. Arn *string // The identifier of the entity (user or role). // // This member is required. Id *string // The name of the entity (user or role). // // This member is required. Name *string // The type of entity (user or role). // // This member is required. Type PolicyOwnerEntityType // The path to the entity (user or role). For more information about paths, see // IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. Path *string noSmithyDocumentSerde } // Contains information about the reason that the operation failed. This data type // is used as a response element in the GetOrganizationsAccessReport , // GetServiceLastAccessedDetails , and GetServiceLastAccessedDetailsWithEntities // operations. type ErrorDetails struct { // The error code associated with the operation failure. // // This member is required. Code *string // Detailed information about the reason that the operation failed. // // This member is required. Message *string noSmithyDocumentSerde } // Contains the results of a simulation. This data type is used by the return // parameter of SimulateCustomPolicy and SimulatePrincipalPolicy . type EvaluationResult struct { // The name of the API operation tested on the indicated resource. // // This member is required. EvalActionName *string // The result of the simulation. // // This member is required. EvalDecision PolicyEvaluationDecisionType // Additional details about the results of the cross-account evaluation decision. // This parameter is populated for only cross-account simulations. It contains a // brief summary of how each policy type contributes to the final evaluation // decision. If the simulation evaluates policies within the same account and // includes a resource ARN, then the parameter is present but the response is // empty. If the simulation evaluates policies within the same account and // specifies all resources ( * ), then the parameter is not returned. When you make // a cross-account request, Amazon Web Services evaluates the request in the // trusting account and the trusted account. The request is allowed only if both // evaluations return true . For more information about how policies are evaluated, // see Evaluating policies within a single account (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) // . If an Organizations SCP included in the evaluation denies access, the // simulation ends. In this case, policy evaluation does not proceed any further // and this parameter is not returned. EvalDecisionDetails map[string]PolicyEvaluationDecisionType // The ARN of the resource that the indicated API operation was tested on. EvalResourceName *string // A list of the statements in the input policies that determine the result for // this scenario. Remember that even if multiple statements allow the operation on // the resource, if only one statement denies that operation, then the explicit // deny overrides any allow. In addition, the deny statement is the only entry // included in the result. MatchedStatements []Statement // A list of context keys that are required by the included input policies but // that were not provided by one of the input parameters. This list is used when // the resource in a simulation is "*", either explicitly, or when the ResourceArns // parameter blank. If you include a list of resources, then any missing context // values are instead included under the ResourceSpecificResults section. To // discover the context keys used by a set of policies, you can call // GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy . MissingContextValues []string // A structure that details how Organizations and its service control policies // affect the results of the simulation. Only applies if the simulated user's // account is part of an organization. OrganizationsDecisionDetail *OrganizationsDecisionDetail // Contains information about the effect that a permissions boundary has on a // policy simulation when the boundary is applied to an IAM entity. PermissionsBoundaryDecisionDetail *PermissionsBoundaryDecisionDetail // The individual results of the simulation of the API operation specified in // EvalActionName on each resource. ResourceSpecificResults []ResourceSpecificResult noSmithyDocumentSerde } // Contains information about an IAM group entity. This data type is used as a // response element in the following operations: // - CreateGroup // - GetGroup // - ListGroups type Group struct { // The Amazon Resource Name (ARN) specifying the group. For more information about // ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. Arn *string // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the group was created. // // This member is required. CreateDate *time.Time // The stable and unique string identifying the group. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. GroupId *string // The friendly name that identifies the group. // // This member is required. GroupName *string // The path to the group. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. Path *string noSmithyDocumentSerde } // Contains information about an IAM group, including all of the group's policies. // This data type is used as a response element in the // GetAccountAuthorizationDetails operation. type GroupDetail struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web // Services resources. For more information about ARNs, go to Amazon Resource // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. Arn *string // A list of the managed policies attached to the group. AttachedManagedPolicies []AttachedPolicy // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the group was created. CreateDate *time.Time // The stable and unique string identifying the group. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. GroupId *string // The friendly name that identifies the group. GroupName *string // A list of the inline policies embedded in the group. GroupPolicyList []PolicyDetail // The path to the group. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. Path *string noSmithyDocumentSerde } // Contains information about an instance profile. This data type is used as a // response element in the following operations: // - CreateInstanceProfile // - GetInstanceProfile // - ListInstanceProfiles // - ListInstanceProfilesForRole type InstanceProfile struct { // The Amazon Resource Name (ARN) specifying the instance profile. For more // information about ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. Arn *string // The date when the instance profile was created. // // This member is required. CreateDate *time.Time // The stable and unique string identifying the instance profile. For more // information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. InstanceProfileId *string // The name identifying the instance profile. // // This member is required. InstanceProfileName *string // The path to the instance profile. For more information about paths, see IAM // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. Path *string // The role associated with the instance profile. // // This member is required. Roles []Role // A list of tags that are attached to the instance profile. For more information // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. Tags []Tag noSmithyDocumentSerde } // Contains details about the permissions policies that are attached to the // specified identity (user, group, or role). This data type is used as a response // element in the ListPoliciesGrantingServiceAccess operation. type ListPoliciesGrantingServiceAccessEntry struct { // The PoliciesGrantingServiceAccess object that contains details about the policy. Policies []PolicyGrantingServiceAccess // The namespace of the service that was accessed. To learn the service namespace // of a service, see Actions, resources, and condition keys for Amazon Web // Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) // in the Service Authorization Reference. Choose the name of the service to view // details for that service. In the first paragraph, find the service prefix. For // example, (service prefix: a4b) . For more information about service namespaces, // see Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. ServiceNamespace *string noSmithyDocumentSerde } // Contains the user name and password create date for a user. This data type is // used as a response element in the CreateLoginProfile and GetLoginProfile // operations. type LoginProfile struct { // The date when the password for the user was created. // // This member is required. CreateDate *time.Time // The name of the user, which can be used for signing in to the Amazon Web // Services Management Console. // // This member is required. UserName *string // Specifies whether the user is required to set a new password on next sign-in. PasswordResetRequired bool noSmithyDocumentSerde } // Contains information about a managed policy, including the policy's ARN, // versions, and the number of principal entities (users, groups, and roles) that // the policy is attached to. This data type is used as a response element in the // GetAccountAuthorizationDetails operation. For more information about managed // policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. type ManagedPolicyDetail struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web // Services resources. For more information about ARNs, go to Amazon Resource // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. Arn *string // The number of principal entities (users, groups, and roles) that the policy is // attached to. AttachmentCount *int32 // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the policy was created. CreateDate *time.Time // The identifier for the version of the policy that is set as the default // (operative) version. For more information about policy versions, see Versioning // for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) // in the IAM User Guide. DefaultVersionId *string // A friendly description of the policy. Description *string // Specifies whether the policy can be attached to an IAM user, group, or role. IsAttachable bool // The path to the policy. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. Path *string // The number of entities (users and roles) for which the policy is used as the // permissions boundary. For more information about permissions boundaries, see // Permissions boundaries for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundaryUsageCount *int32 // The stable and unique string identifying the policy. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. PolicyId *string // The friendly name (not ARN) identifying the policy. PolicyName *string // A list containing information about the versions of the policy. PolicyVersionList []PolicyVersion // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the policy was last updated. When a policy has only one version, this // field contains the date and time when the policy was created. When a policy has // more than one version, this field contains the date and time when the most // recent policy version was created. UpdateDate *time.Time noSmithyDocumentSerde } // Contains information about an MFA device. This data type is used as a response // element in the ListMFADevices operation. type MFADevice struct { // The date when the MFA device was enabled for the user. // // This member is required. EnableDate *time.Time // The serial number that uniquely identifies the MFA device. For virtual MFA // devices, the serial number is the device ARN. // // This member is required. SerialNumber *string // The user with whom the MFA device is associated. // // This member is required. UserName *string noSmithyDocumentSerde } // Contains the Amazon Resource Name (ARN) for an IAM OpenID Connect provider. type OpenIDConnectProviderListEntry struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web // Services resources. For more information about ARNs, go to Amazon Resource // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. Arn *string noSmithyDocumentSerde } // Contains information about the effect that Organizations has on a policy // simulation. type OrganizationsDecisionDetail struct { // Specifies whether the simulated operation is allowed by the Organizations // service control policies that impact the simulated user's account. AllowedByOrganizations bool noSmithyDocumentSerde } // Contains information about the account password policy. This data type is used // as a response element in the GetAccountPasswordPolicy operation. type PasswordPolicy struct { // Specifies whether IAM users are allowed to change their own password. Gives IAM // users permissions to iam:ChangePassword for only their user and to the // iam:GetAccountPasswordPolicy action. This option does not attach a permissions // policy to each user, rather the permissions are applied at the account-level for // all users by IAM. AllowUsersToChangePassword bool // Indicates whether passwords in the account expire. Returns true if // MaxPasswordAge contains a value greater than 0. Returns false if MaxPasswordAge // is 0 or not present. ExpirePasswords bool // Specifies whether IAM users are prevented from setting a new password via the // Amazon Web Services Management Console after their password has expired. The IAM // user cannot access the console until an administrator resets the password. IAM // users with iam:ChangePassword permission and active access keys can reset their // own expired console password using the CLI or API. HardExpiry *bool // The number of days that an IAM user password is valid. MaxPasswordAge *int32 // Minimum length to require for IAM user passwords. MinimumPasswordLength *int32 // Specifies the number of previous passwords that IAM users are prevented from // reusing. PasswordReusePrevention *int32 // Specifies whether IAM user passwords must contain at least one lowercase // character (a to z). RequireLowercaseCharacters bool // Specifies whether IAM user passwords must contain at least one numeric // character (0 to 9). RequireNumbers bool // Specifies whether IAM user passwords must contain at least one of the following // symbols: ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' RequireSymbols bool // Specifies whether IAM user passwords must contain at least one uppercase // character (A to Z). RequireUppercaseCharacters bool noSmithyDocumentSerde } // Contains information about the effect that a permissions boundary has on a // policy simulation when the boundary is applied to an IAM entity. type PermissionsBoundaryDecisionDetail struct { // Specifies whether an action is allowed by a permissions boundary that is // applied to an IAM entity (user or role). A value of true means that the // permissions boundary does not deny the action. This means that the policy // includes an Allow statement that matches the request. In this case, if an // identity-based policy also allows the action, the request is allowed. A value of // false means that either the requested action is not allowed (implicitly denied) // or that the action is explicitly denied by the permissions boundary. In both of // these cases, the action is not allowed, regardless of the identity-based policy. AllowedByPermissionsBoundary bool noSmithyDocumentSerde } // Contains information about a managed policy. This data type is used as a // response element in the CreatePolicy , GetPolicy , and ListPolicies operations. // For more information about managed policies, refer to Managed policies and // inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. type Policy struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web // Services resources. For more information about ARNs, go to Amazon Resource // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. Arn *string // The number of entities (users, groups, and roles) that the policy is attached // to. AttachmentCount *int32 // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the policy was created. CreateDate *time.Time // The identifier for the version of the policy that is set as the default version. DefaultVersionId *string // A friendly description of the policy. This element is included in the response // to the GetPolicy operation. It is not included in the response to the // ListPolicies operation. Description *string // Specifies whether the policy can be attached to an IAM user, group, or role. IsAttachable bool // The path to the policy. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. Path *string // The number of entities (users and roles) for which the policy is used to set // the permissions boundary. For more information about permissions boundaries, see // Permissions boundaries for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundaryUsageCount *int32 // The stable and unique string identifying the policy. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. PolicyId *string // The friendly name (not ARN) identifying the policy. PolicyName *string // A list of tags that are attached to the instance profile. For more information // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. Tags []Tag // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the policy was last updated. When a policy has only one version, this // field contains the date and time when the policy was created. When a policy has // more than one version, this field contains the date and time when the most // recent policy version was created. UpdateDate *time.Time noSmithyDocumentSerde } // Contains information about an IAM policy, including the policy document. This // data type is used as a response element in the GetAccountAuthorizationDetails // operation. type PolicyDetail struct { // The policy document. PolicyDocument *string // The name of the policy. PolicyName *string noSmithyDocumentSerde } // Contains details about the permissions policies that are attached to the // specified identity (user, group, or role). This data type is an element of the // ListPoliciesGrantingServiceAccessEntry object. type PolicyGrantingServiceAccess struct { // The policy name. // // This member is required. PolicyName *string // The policy type. For more information about these policy types, see Managed // policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) // in the IAM User Guide. // // This member is required. PolicyType PolicyType // The name of the entity (user or role) to which the inline policy is attached. // This field is null for managed policies. For more information about these policy // types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) // in the IAM User Guide. EntityName *string // The type of entity (user or role) that used the policy to access the service to // which the inline policy is attached. This field is null for managed policies. // For more information about these policy types, see Managed policies and inline // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) // in the IAM User Guide. EntityType PolicyOwnerEntityType // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web // Services resources. For more information about ARNs, go to Amazon Resource // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. PolicyArn *string noSmithyDocumentSerde } // Contains information about a group that a managed policy is attached to. This // data type is used as a response element in the ListEntitiesForPolicy operation. // For more information about managed policies, refer to Managed policies and // inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. type PolicyGroup struct { // The stable and unique string identifying the group. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) // in the IAM User Guide. GroupId *string // The name (friendly name, not ARN) identifying the group. GroupName *string noSmithyDocumentSerde } // Contains information about a role that a managed policy is attached to. This // data type is used as a response element in the ListEntitiesForPolicy operation. // For more information about managed policies, refer to Managed policies and // inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. type PolicyRole struct { // The stable and unique string identifying the role. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) // in the IAM User Guide. RoleId *string // The name (friendly name, not ARN) identifying the role. RoleName *string noSmithyDocumentSerde } // Contains information about a user that a managed policy is attached to. This // data type is used as a response element in the ListEntitiesForPolicy operation. // For more information about managed policies, refer to Managed policies and // inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. type PolicyUser struct { // The stable and unique string identifying the user. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) // in the IAM User Guide. UserId *string // The name (friendly name, not ARN) identifying the user. UserName *string noSmithyDocumentSerde } // Contains information about a version of a managed policy. This data type is // used as a response element in the CreatePolicyVersion , GetPolicyVersion , // ListPolicyVersions , and GetAccountAuthorizationDetails operations. For more // information about managed policies, refer to Managed policies and inline // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) // in the IAM User Guide. type PolicyVersion struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the policy version was created. CreateDate *time.Time // The policy document. The policy document is returned in the response to the // GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not // returned in the response to the CreatePolicyVersion or ListPolicyVersions // operations. The policy document returned in this structure is URL-encoded // compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a // URL decoding method to convert the policy back to plain JSON text. For example, // if you use Java, you can use the decode method of the java.net.URLDecoder // utility class in the Java SDK. Other languages and SDKs provide similar // functionality. Document *string // Specifies whether the policy version is set as the policy's default version. IsDefaultVersion bool // The identifier for the policy version. Policy version identifiers always begin // with v (always lowercase). When a policy is created, the first policy version // is v1 . VersionId *string noSmithyDocumentSerde } // Contains the row and column of a location of a Statement element in a policy // document. This data type is used as a member of the Statement type. type Position struct { // The column in the line containing the specified position in the document. Column int32 // The line containing the specified position in the document. Line int32 noSmithyDocumentSerde } // Contains the result of the simulation of a single API operation call on a // single resource. This data type is used by a member of the EvaluationResult // data type. type ResourceSpecificResult struct { // The result of the simulation of the simulated API operation on the resource // specified in EvalResourceName . // // This member is required. EvalResourceDecision PolicyEvaluationDecisionType // The name of the simulated resource, in Amazon Resource Name (ARN) format. // // This member is required. EvalResourceName *string // Additional details about the results of the evaluation decision on a single // resource. This parameter is returned only for cross-account simulations. This // parameter explains how each policy type contributes to the resource-specific // evaluation decision. EvalDecisionDetails map[string]PolicyEvaluationDecisionType // A list of the statements in the input policies that determine the result for // this part of the simulation. Remember that even if multiple statements allow the // operation on the resource, if any statement denies that operation, then the // explicit deny overrides any allow. In addition, the deny statement is the only // entry included in the result. MatchedStatements []Statement // A list of context keys that are required by the included input policies but // that were not provided by one of the input parameters. This list is used when a // list of ARNs is included in the ResourceArns parameter instead of "*". If you // do not specify individual resources, by setting ResourceArns to "*" or by not // including the ResourceArns parameter, then any missing context values are // instead included under the EvaluationResults section. To discover the context // keys used by a set of policies, you can call GetContextKeysForCustomPolicy or // GetContextKeysForPrincipalPolicy . MissingContextValues []string // Contains information about the effect that a permissions boundary has on a // policy simulation when that boundary is applied to an IAM entity. PermissionsBoundaryDecisionDetail *PermissionsBoundaryDecisionDetail noSmithyDocumentSerde } // Contains information about an IAM role. This structure is returned as a // response element in several API operations that interact with roles. type Role struct { // The Amazon Resource Name (ARN) specifying the role. For more information about // ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide guide. // // This member is required. Arn *string // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the role was created. // // This member is required. CreateDate *time.Time // The path to the role. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. Path *string // The stable and unique string identifying the role. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. RoleId *string // The friendly name that identifies the role. // // This member is required. RoleName *string // The policy that grants an entity permission to assume the role. AssumeRolePolicyDocument *string // A description of the role that you provide. Description *string // The maximum session duration (in seconds) for the specified role. Anyone who // uses the CLI, or API to assume the role can specify the duration using the // optional DurationSeconds API parameter or duration-seconds CLI parameter. MaxSessionDuration *int32 // The ARN of the policy used to set the permissions boundary for the role. For // more information about permissions boundaries, see Permissions boundaries for // IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundary *AttachedPermissionsBoundary // Contains information about the last time that an IAM role was used. This // includes the date and time and the Region in which the role was last used. // Activity is only reported for the trailing 400 days. This period can be shorter // if your Region began supporting these features within the last year. The role // might have been used more than 400 days ago. For more information, see Regions // where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) // in the IAM user Guide. RoleLastUsed *RoleLastUsed // A list of tags that are attached to the role. For more information about // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. Tags []Tag noSmithyDocumentSerde } // Contains information about an IAM role, including all of the role's policies. // This data type is used as a response element in the // GetAccountAuthorizationDetails operation. type RoleDetail struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web // Services resources. For more information about ARNs, go to Amazon Resource // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. Arn *string // The trust policy that grants permission to assume the role. AssumeRolePolicyDocument *string // A list of managed policies attached to the role. These policies are the role's // access (permissions) policies. AttachedManagedPolicies []AttachedPolicy // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the role was created. CreateDate *time.Time // A list of instance profiles that contain this role. InstanceProfileList []InstanceProfile // The path to the role. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. Path *string // The ARN of the policy used to set the permissions boundary for the role. For // more information about permissions boundaries, see Permissions boundaries for // IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundary *AttachedPermissionsBoundary // The stable and unique string identifying the role. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. RoleId *string // Contains information about the last time that an IAM role was used. This // includes the date and time and the Region in which the role was last used. // Activity is only reported for the trailing 400 days. This period can be shorter // if your Region began supporting these features within the last year. The role // might have been used more than 400 days ago. For more information, see Regions // where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) // in the IAM User Guide. RoleLastUsed *RoleLastUsed // The friendly name that identifies the role. RoleName *string // A list of inline policies embedded in the role. These policies are the role's // access (permissions) policies. RolePolicyList []PolicyDetail // A list of tags that are attached to the role. For more information about // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. Tags []Tag noSmithyDocumentSerde } // Contains information about the last time that an IAM role was used. This // includes the date and time and the Region in which the role was last used. // Activity is only reported for the trailing 400 days. This period can be shorter // if your Region began supporting these features within the last year. The role // might have been used more than 400 days ago. For more information, see Regions // where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) // in the IAM user Guide. This data type is returned as a response element in the // GetRole and GetAccountAuthorizationDetails operations. type RoleLastUsed struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // that the role was last used. This field is null if the role has not been used // within the IAM tracking period. For more information about the tracking period, // see Regions where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) // in the IAM User Guide. LastUsedDate *time.Time // The name of the Amazon Web Services Region in which the role was last used. Region *string noSmithyDocumentSerde } // An object that contains details about how a service-linked role is used, if // that information is returned by the service. This data type is used as a // response element in the GetServiceLinkedRoleDeletionStatus operation. type RoleUsageType struct { // The name of the Region where the service-linked role is being used. Region *string // The name of the resource that is using the service-linked role. Resources []string noSmithyDocumentSerde } // Contains the list of SAML providers for this account. type SAMLProviderListEntry struct { // The Amazon Resource Name (ARN) of the SAML provider. Arn *string // The date and time when the SAML provider was created. CreateDate *time.Time // The expiration date and time for the SAML provider. ValidUntil *time.Time noSmithyDocumentSerde } // Contains information about a server certificate. This data type is used as a // response element in the GetServerCertificate operation. type ServerCertificate struct { // The contents of the public key certificate. // // This member is required. CertificateBody *string // The meta information of the server certificate, such as its name, path, ID, and // ARN. // // This member is required. ServerCertificateMetadata *ServerCertificateMetadata // The contents of the public key certificate chain. CertificateChain *string // A list of tags that are attached to the server certificate. For more // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. Tags []Tag noSmithyDocumentSerde } // Contains information about a server certificate without its certificate body, // certificate chain, and private key. This data type is used as a response element // in the UploadServerCertificate and ListServerCertificates operations. type ServerCertificateMetadata struct { // The Amazon Resource Name (ARN) specifying the server certificate. For more // information about ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. Arn *string // The path to the server certificate. For more information about paths, see IAM // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. Path *string // The stable and unique string identifying the server certificate. For more // information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. ServerCertificateId *string // The name that identifies the server certificate. // // This member is required. ServerCertificateName *string // The date on which the certificate is set to expire. Expiration *time.Time // The date when the server certificate was uploaded. UploadDate *time.Time noSmithyDocumentSerde } // Contains details about the most recent attempt to access the service. This data // type is used as a response element in the GetServiceLastAccessedDetails // operation. type ServiceLastAccessed struct { // The name of the service in which access was attempted. // // This member is required. ServiceName *string // The namespace of the service in which access was attempted. To learn the // service namespace of a service, see Actions, resources, and condition keys for // Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) // in the Service Authorization Reference. Choose the name of the service to view // details for that service. In the first paragraph, find the service prefix. For // example, (service prefix: a4b) . For more information about service namespaces, // see Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // This member is required. ServiceNamespace *string // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when an authenticated entity most recently attempted to access the service. // Amazon Web Services does not report unauthenticated requests. This field is null // if no IAM entities attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . LastAuthenticated *time.Time // The ARN of the authenticated entity (user or role) that last attempted to // access the service. Amazon Web Services does not report unauthenticated // requests. This field is null if no IAM entities attempted to access the service // within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . LastAuthenticatedEntity *string // The Region from which the authenticated entity (user or role) last attempted to // access the service. Amazon Web Services does not report unauthenticated // requests. This field is null if no IAM entities attempted to access the service // within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . LastAuthenticatedRegion *string // The total number of authenticated principals (root user, IAM users, or IAM // roles) that have attempted to access the service. This field is null if no // principals attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . TotalAuthenticatedEntities *int32 // An object that contains details about the most recent attempt to access a // tracked action within the service. This field is null if there no tracked // actions or if the principal did not use the tracked actions within the tracking // period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . This field is also null if the report was generated at the service level and // not the action level. For more information, see the Granularity field in // GenerateServiceLastAccessedDetails . TrackedActionsLastAccessed []TrackedActionLastAccessed noSmithyDocumentSerde } // Contains the details of a service-specific credential. type ServiceSpecificCredential struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the service-specific credential were created. // // This member is required. CreateDate *time.Time // The name of the service associated with the service-specific credential. // // This member is required. ServiceName *string // The generated password for the service-specific credential. // // This member is required. ServicePassword *string // The unique identifier for the service-specific credential. // // This member is required. ServiceSpecificCredentialId *string // The generated user name for the service-specific credential. This value is // generated by combining the IAM user's name combined with the ID number of the // Amazon Web Services account, as in jane-at-123456789012 , for example. This // value cannot be configured by the user. // // This member is required. ServiceUserName *string // The status of the service-specific credential. Active means that the key is // valid for API calls, while Inactive means it is not. // // This member is required. Status StatusType // The name of the IAM user associated with the service-specific credential. // // This member is required. UserName *string noSmithyDocumentSerde } // Contains additional details about a service-specific credential. type ServiceSpecificCredentialMetadata struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the service-specific credential were created. // // This member is required. CreateDate *time.Time // The name of the service associated with the service-specific credential. // // This member is required. ServiceName *string // The unique identifier for the service-specific credential. // // This member is required. ServiceSpecificCredentialId *string // The generated user name for the service-specific credential. // // This member is required. ServiceUserName *string // The status of the service-specific credential. Active means that the key is // valid for API calls, while Inactive means it is not. // // This member is required. Status StatusType // The name of the IAM user associated with the service-specific credential. // // This member is required. UserName *string noSmithyDocumentSerde } // Contains information about an X.509 signing certificate. This data type is used // as a response element in the UploadSigningCertificate and // ListSigningCertificates operations. type SigningCertificate struct { // The contents of the signing certificate. // // This member is required. CertificateBody *string // The ID for the signing certificate. // // This member is required. CertificateId *string // The status of the signing certificate. Active means that the key is valid for // API calls, while Inactive means it is not. // // This member is required. Status StatusType // The name of the user the signing certificate is associated with. // // This member is required. UserName *string // The date when the signing certificate was uploaded. UploadDate *time.Time noSmithyDocumentSerde } // Contains information about an SSH public key. This data type is used as a // response element in the GetSSHPublicKey and UploadSSHPublicKey operations. type SSHPublicKey struct { // The MD5 message digest of the SSH public key. // // This member is required. Fingerprint *string // The SSH public key. // // This member is required. SSHPublicKeyBody *string // The unique identifier for the SSH public key. // // This member is required. SSHPublicKeyId *string // The status of the SSH public key. Active means that the key can be used for // authentication with an CodeCommit repository. Inactive means that the key // cannot be used. // // This member is required. Status StatusType // The name of the IAM user associated with the SSH public key. // // This member is required. UserName *string // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the SSH public key was uploaded. UploadDate *time.Time noSmithyDocumentSerde } // Contains information about an SSH public key, without the key's body or // fingerprint. This data type is used as a response element in the // ListSSHPublicKeys operation. type SSHPublicKeyMetadata struct { // The unique identifier for the SSH public key. // // This member is required. SSHPublicKeyId *string // The status of the SSH public key. Active means that the key can be used for // authentication with an CodeCommit repository. Inactive means that the key // cannot be used. // // This member is required. Status StatusType // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the SSH public key was uploaded. // // This member is required. UploadDate *time.Time // The name of the IAM user associated with the SSH public key. // // This member is required. UserName *string noSmithyDocumentSerde } // Contains a reference to a Statement element in a policy document that // determines the result of the simulation. This data type is used by the // MatchedStatements member of the EvaluationResult type. type Statement struct { // The row and column of the end of a Statement in an IAM policy. EndPosition *Position // The identifier of the policy that was provided as an input. SourcePolicyId *string // The type of the policy. SourcePolicyType PolicySourceType // The row and column of the beginning of the Statement in an IAM policy. StartPosition *Position noSmithyDocumentSerde } // A structure that represents user-provided metadata that can be associated with // an IAM resource. For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. type Tag struct { // The key name that can be used to look up or retrieve the associated value. For // example, Department or Cost Center are common choices. // // This member is required. Key *string // The value associated with this tag. For example, tags with a key name of // Department could have values such as Human Resources , Accounting , and Support // . Tags with a key name of Cost Center might have values that consist of the // number associated with the different cost centers in your company. Typically, // many resources have tags with the same key name but with different values. // Amazon Web Services always interprets the tag Value as a single string. If you // need to store an array, you can store comma-separated values in the string. // However, you must interpret the value in your code. // // This member is required. Value *string noSmithyDocumentSerde } // Contains details about the most recent attempt to access an action within the // service. This data type is used as a response element in the // GetServiceLastAccessedDetails operation. type TrackedActionLastAccessed struct { // The name of the tracked action to which access was attempted. Tracked actions // are actions that report activity to IAM. ActionName *string // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web // Services resources. For more information about ARNs, go to Amazon Resource // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. LastAccessedEntity *string // The Region from which the authenticated entity (user or role) last attempted to // access the tracked action. Amazon Web Services does not report unauthenticated // requests. This field is null if no IAM entities attempted to access the service // within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . LastAccessedRegion *string // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when an authenticated entity most recently attempted to access the tracked // service. Amazon Web Services does not report unauthenticated requests. This // field is null if no IAM entities attempted to access the service within the // tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) // . LastAccessedTime *time.Time noSmithyDocumentSerde } // Contains information about an IAM user entity. This data type is used as a // response element in the following operations: // - CreateUser // - GetUser // - ListUsers type User struct { // The Amazon Resource Name (ARN) that identifies the user. For more information // about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. Arn *string // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the user was created. // // This member is required. CreateDate *time.Time // The path to the user. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. The ARN of the policy used to set the permissions // boundary for the user. // // This member is required. Path *string // The stable and unique string identifying the user. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. // // This member is required. UserId *string // The friendly name identifying the user. // // This member is required. UserName *string // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the user's password was last used to sign in to an Amazon Web Services // website. For a list of Amazon Web Services websites that capture a user's last // sign-in time, see the Credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) // topic in the IAM User Guide. If a password is used more than once in a // five-minute span, only the first use is returned in this field. If the field is // null (no value), then it indicates that they never signed in with a password. // This can be because: // - The user never had a password. // - A password exists but has not been used since IAM started tracking this // information on October 20, 2014. // A null value does not mean that the user never had a password. Also, if the // user does not currently have a password but had one in the past, then this field // contains the date and time the most recent password was used. This value is // returned only in the GetUser and ListUsers operations. PasswordLastUsed *time.Time // For more information about permissions boundaries, see Permissions boundaries // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundary *AttachedPermissionsBoundary // A list of tags that are associated with the user. For more information about // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. Tags []Tag noSmithyDocumentSerde } // Contains information about an IAM user, including all the user's policies and // all the IAM groups the user is in. This data type is used as a response element // in the GetAccountAuthorizationDetails operation. type UserDetail struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web // Services resources. For more information about ARNs, go to Amazon Resource // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. Arn *string // A list of the managed policies attached to the user. AttachedManagedPolicies []AttachedPolicy // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) // , when the user was created. CreateDate *time.Time // A list of IAM groups that the user is in. GroupList []string // The path to the user. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. Path *string // The ARN of the policy used to set the permissions boundary for the user. For // more information about permissions boundaries, see Permissions boundaries for // IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundary *AttachedPermissionsBoundary // A list of tags that are associated with the user. For more information about // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. Tags []Tag // The stable and unique string identifying the user. For more information about // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the IAM User Guide. UserId *string // The friendly name identifying the user. UserName *string // A list of the inline policies embedded in the user. UserPolicyList []PolicyDetail noSmithyDocumentSerde } // Contains information about a virtual MFA device. type VirtualMFADevice struct { // The serial number associated with VirtualMFADevice . // // This member is required. SerialNumber *string // The base32 seed defined as specified in RFC3548 (https://tools.ietf.org/html/rfc3548.txt) // . The Base32StringSeed is base32-encoded. Base32StringSeed []byte // The date and time on which the virtual MFA device was enabled. EnableDate *time.Time // A QR code PNG image that encodes // otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String where // $virtualMFADeviceName is one of the create call arguments. AccountName is the // user name if set (otherwise, the account ID otherwise), and Base32String is the // seed in base32 format. The Base32String value is base64-encoded. QRCodePNG []byte // A list of tags that are attached to the virtual MFA device. For more // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. Tags []Tag // The IAM user associated with this virtual MFA device. User *User noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
1,727
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "identitystore" const ServiceAPIVersion = "2020-06-15" // Client provides the API client to make operations call for AWS SSO Identity // Store. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "identitystore", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
435
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a group within the specified identity store. func (c *Client) CreateGroup(ctx context.Context, params *CreateGroupInput, optFns ...func(*Options)) (*CreateGroupOutput, error) { if params == nil { params = &CreateGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateGroup", params, optFns, c.addOperationCreateGroupMiddlewares) if err != nil { return nil, err } out := result.(*CreateGroupOutput) out.ResultMetadata = metadata return out, nil } type CreateGroupInput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // A string containing the description of the group. Description *string // A string containing the name of the group. This value is commonly displayed // when the group is referenced. "Administrator" and "AWSAdministrators" are // reserved names and can't be used for users or groups. DisplayName *string noSmithyDocumentSerde } type CreateGroupOutput struct { // The identifier of the newly created group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateGroup{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGroup(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opCreateGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "CreateGroup", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a relationship between a member and a group. The following identifiers // must be specified: GroupId , IdentityStoreId , and MemberId . func (c *Client) CreateGroupMembership(ctx context.Context, params *CreateGroupMembershipInput, optFns ...func(*Options)) (*CreateGroupMembershipOutput, error) { if params == nil { params = &CreateGroupMembershipInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateGroupMembership", params, optFns, c.addOperationCreateGroupMembershipMiddlewares) if err != nil { return nil, err } out := result.(*CreateGroupMembershipOutput) out.ResultMetadata = metadata return out, nil } type CreateGroupMembershipInput struct { // The identifier for a group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // An object that contains the identifier of a group member. Setting the UserID // field to the specific identifier for a user indicates that the user is a member // of the group. // // This member is required. MemberId types.MemberId noSmithyDocumentSerde } type CreateGroupMembershipOutput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The identifier for a newly created GroupMembership in an identity store. // // This member is required. MembershipId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateGroupMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateGroupMembership{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateGroupMembership{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateGroupMembershipValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGroupMembership(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } func newServiceMetadataMiddleware_opCreateGroupMembership(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "CreateGroupMembership", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a user within the specified identity store. func (c *Client) CreateUser(ctx context.Context, params *CreateUserInput, optFns ...func(*Options)) (*CreateUserOutput, error) { if params == nil { params = &CreateUserInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateUser", params, optFns, c.addOperationCreateUserMiddlewares) if err != nil { return nil, err } out := result.(*CreateUserOutput) out.ResultMetadata = metadata return out, nil } type CreateUserInput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // A list of Address objects containing addresses associated with the user. Addresses []types.Address // A string containing the name of the user. This value is typically formatted for // display when the user is referenced. For example, "John Doe." DisplayName *string // A list of Email objects containing email addresses associated with the user. Emails []types.Email // A string containing the geographical region or location of the user. Locale *string // An object containing the name of the user. Name *types.Name // A string containing an alternate name for the user. NickName *string // A list of PhoneNumber objects containing phone numbers associated with the user. PhoneNumbers []types.PhoneNumber // A string containing the preferred language of the user. For example, "American // English" or "en-us." PreferredLanguage *string // A string containing a URL that might be associated with the user. ProfileUrl *string // A string containing the time zone of the user. Timezone *string // A string containing the title of the user. Possible values are left // unspecified. The value can vary based on your specific use case. Title *string // A unique string used to identify the user. The length limit is 128 characters. // This value can consist of letters, accented characters, symbols, numbers, and // punctuation. This value is specified at the time the user is created and stored // as an attribute of the user object in the identity store. "Administrator" and // "AWSAdministrators" are reserved names and can't be used for users or groups. UserName *string // A string indicating the type of user. Possible values are left unspecified. The // value can vary based on your specific use case. UserType *string noSmithyDocumentSerde } type CreateUserOutput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The identifier of the newly created user in the identity store. // // This member is required. UserId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateUser{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateUser{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUser(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opCreateUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "CreateUser", } }
179
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" 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" ) // Delete a group within an identity store given GroupId . func (c *Client) DeleteGroup(ctx context.Context, params *DeleteGroupInput, optFns ...func(*Options)) (*DeleteGroupOutput, error) { if params == nil { params = &DeleteGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteGroup", params, optFns, c.addOperationDeleteGroupMiddlewares) if err != nil { return nil, err } out := result.(*DeleteGroupOutput) out.ResultMetadata = metadata return out, nil } type DeleteGroupInput struct { // The identifier for a group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string noSmithyDocumentSerde } type DeleteGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteGroup{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroup(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opDeleteGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "DeleteGroup", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" 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" ) // Delete a membership within a group given MembershipId . func (c *Client) DeleteGroupMembership(ctx context.Context, params *DeleteGroupMembershipInput, optFns ...func(*Options)) (*DeleteGroupMembershipOutput, error) { if params == nil { params = &DeleteGroupMembershipInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteGroupMembership", params, optFns, c.addOperationDeleteGroupMembershipMiddlewares) if err != nil { return nil, err } out := result.(*DeleteGroupMembershipOutput) out.ResultMetadata = metadata return out, nil } type DeleteGroupMembershipInput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The identifier for a GroupMembership in an identity store. // // This member is required. MembershipId *string noSmithyDocumentSerde } type DeleteGroupMembershipOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteGroupMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteGroupMembership{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteGroupMembership{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteGroupMembershipValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroupMembership(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } func newServiceMetadataMiddleware_opDeleteGroupMembership(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "DeleteGroupMembership", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a user within an identity store given UserId . func (c *Client) DeleteUser(ctx context.Context, params *DeleteUserInput, optFns ...func(*Options)) (*DeleteUserOutput, error) { if params == nil { params = &DeleteUserInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteUser", params, optFns, c.addOperationDeleteUserMiddlewares) if err != nil { return nil, err } out := result.(*DeleteUserOutput) out.ResultMetadata = metadata return out, nil } type DeleteUserInput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The identifier for a user in the identity store. // // This member is required. UserId *string noSmithyDocumentSerde } type DeleteUserOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteUser{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteUser{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUser(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opDeleteUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "DeleteUser", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the group metadata and attributes from GroupId in an identity store. func (c *Client) DescribeGroup(ctx context.Context, params *DescribeGroupInput, optFns ...func(*Options)) (*DescribeGroupOutput, error) { if params == nil { params = &DescribeGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeGroup", params, optFns, c.addOperationDescribeGroupMiddlewares) if err != nil { return nil, err } out := result.(*DescribeGroupOutput) out.ResultMetadata = metadata return out, nil } type DescribeGroupInput struct { // The identifier for a group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store, such as d-1234567890 . In // this example, d- is a fixed prefix, and 1234567890 is a randomly generated // string that contains numbers and lower case letters. This value is generated at // the time that a new identity store is created. // // This member is required. IdentityStoreId *string noSmithyDocumentSerde } type DescribeGroupOutput struct { // The identifier for a group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // A string containing a description of the group. Description *string // The group’s display name value. The length limit is 1,024 characters. This // value can consist of letters, accented characters, symbols, numbers, // punctuation, tab, new line, carriage return, space, and nonbreaking space in // this attribute. This value is specified at the time that the group is created // and stored as an attribute of the group object in the identity store. DisplayName *string // A list of ExternalId objects that contains the identifiers issued to this // resource by an external identity provider. ExternalIds []types.ExternalId // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeGroup{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } func newServiceMetadataMiddleware_opDescribeGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "DescribeGroup", } }
154
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves membership metadata and attributes from MembershipId in an identity // store. func (c *Client) DescribeGroupMembership(ctx context.Context, params *DescribeGroupMembershipInput, optFns ...func(*Options)) (*DescribeGroupMembershipOutput, error) { if params == nil { params = &DescribeGroupMembershipInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeGroupMembership", params, optFns, c.addOperationDescribeGroupMembershipMiddlewares) if err != nil { return nil, err } out := result.(*DescribeGroupMembershipOutput) out.ResultMetadata = metadata return out, nil } type DescribeGroupMembershipInput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The identifier for a GroupMembership in an identity store. // // This member is required. MembershipId *string noSmithyDocumentSerde } type DescribeGroupMembershipOutput struct { // The identifier for a group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // An object containing the identifier of a group member. // // This member is required. MemberId types.MemberId // The identifier for a GroupMembership in an identity store. // // This member is required. MembershipId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeGroupMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeGroupMembership{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeGroupMembership{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeGroupMembershipValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGroupMembership(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } func newServiceMetadataMiddleware_opDescribeGroupMembership(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "DescribeGroupMembership", } }
148
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the user metadata and attributes from the UserId in an identity store. func (c *Client) DescribeUser(ctx context.Context, params *DescribeUserInput, optFns ...func(*Options)) (*DescribeUserOutput, error) { if params == nil { params = &DescribeUserInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeUser", params, optFns, c.addOperationDescribeUserMiddlewares) if err != nil { return nil, err } out := result.(*DescribeUserOutput) out.ResultMetadata = metadata return out, nil } type DescribeUserInput struct { // The globally unique identifier for the identity store, such as d-1234567890 . In // this example, d- is a fixed prefix, and 1234567890 is a randomly generated // string that contains numbers and lower case letters. This value is generated at // the time that a new identity store is created. // // This member is required. IdentityStoreId *string // The identifier for a user in the identity store. // // This member is required. UserId *string noSmithyDocumentSerde } type DescribeUserOutput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The identifier for a user in the identity store. // // This member is required. UserId *string // The physical address of the user. Addresses []types.Address // The display name of the user. DisplayName *string // The email address of the user. Emails []types.Email // A list of ExternalId objects that contains the identifiers issued to this // resource by an external identity provider. ExternalIds []types.ExternalId // A string containing the geographical region or location of the user. Locale *string // The name of the user. Name *types.Name // An alternative descriptive name for the user. NickName *string // A list of PhoneNumber objects associated with a user. PhoneNumbers []types.PhoneNumber // The preferred language of the user. PreferredLanguage *string // A URL link for the user's profile. ProfileUrl *string // The time zone for a user. Timezone *string // A string containing the title of the user. Title *string // A unique string used to identify the user. The length limit is 128 characters. // This value can consist of letters, accented characters, symbols, numbers, and // punctuation. This value is specified at the time the user is created and stored // as an attribute of the user object in the identity store. UserName *string // A string indicating the type of user. UserType *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeUser{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeUser{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUser(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } func newServiceMetadataMiddleware_opDescribeUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "DescribeUser", } }
186
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves GroupId in an identity store. func (c *Client) GetGroupId(ctx context.Context, params *GetGroupIdInput, optFns ...func(*Options)) (*GetGroupIdOutput, error) { if params == nil { params = &GetGroupIdInput{} } result, metadata, err := c.invokeOperation(ctx, "GetGroupId", params, optFns, c.addOperationGetGroupIdMiddlewares) if err != nil { return nil, err } out := result.(*GetGroupIdOutput) out.ResultMetadata = metadata return out, nil } type GetGroupIdInput struct { // A unique identifier for a user or group that is not the primary identifier. // This value can be an identifier from an external identity provider (IdP) that is // associated with the user, the group, or a unique attribute. For the unique // attribute, the only valid path is displayName . // // This member is required. AlternateIdentifier types.AlternateIdentifier // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string noSmithyDocumentSerde } type GetGroupIdOutput struct { // The identifier for a group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetGroupIdMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetGroupId{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetGroupId{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetGroupIdValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroupId(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } func newServiceMetadataMiddleware_opGetGroupId(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "GetGroupId", } }
140
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the MembershipId in an identity store. func (c *Client) GetGroupMembershipId(ctx context.Context, params *GetGroupMembershipIdInput, optFns ...func(*Options)) (*GetGroupMembershipIdOutput, error) { if params == nil { params = &GetGroupMembershipIdInput{} } result, metadata, err := c.invokeOperation(ctx, "GetGroupMembershipId", params, optFns, c.addOperationGetGroupMembershipIdMiddlewares) if err != nil { return nil, err } out := result.(*GetGroupMembershipIdOutput) out.ResultMetadata = metadata return out, nil } type GetGroupMembershipIdInput struct { // The identifier for a group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // An object that contains the identifier of a group member. Setting the UserID // field to the specific identifier for a user indicates that the user is a member // of the group. // // This member is required. MemberId types.MemberId noSmithyDocumentSerde } type GetGroupMembershipIdOutput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The identifier for a GroupMembership in an identity store. // // This member is required. MembershipId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetGroupMembershipIdMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetGroupMembershipId{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetGroupMembershipId{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetGroupMembershipIdValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroupMembershipId(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } func newServiceMetadataMiddleware_opGetGroupMembershipId(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "GetGroupMembershipId", } }
144
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the UserId in an identity store. func (c *Client) GetUserId(ctx context.Context, params *GetUserIdInput, optFns ...func(*Options)) (*GetUserIdOutput, error) { if params == nil { params = &GetUserIdInput{} } result, metadata, err := c.invokeOperation(ctx, "GetUserId", params, optFns, c.addOperationGetUserIdMiddlewares) if err != nil { return nil, err } out := result.(*GetUserIdOutput) out.ResultMetadata = metadata return out, nil } type GetUserIdInput struct { // A unique identifier for a user or group that is not the primary identifier. // This value can be an identifier from an external identity provider (IdP) that is // associated with the user, the group, or a unique attribute. For the unique // attribute, the only valid paths are userName and emails.value . // // This member is required. AlternateIdentifier types.AlternateIdentifier // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string noSmithyDocumentSerde } type GetUserIdOutput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The identifier for a user in the identity store. // // This member is required. UserId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetUserIdMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetUserId{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetUserId{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetUserIdValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUserId(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } func newServiceMetadataMiddleware_opGetUserId(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "GetUserId", } }
140
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Checks the user's membership in all requested groups and returns if the member // exists in all queried groups. func (c *Client) IsMemberInGroups(ctx context.Context, params *IsMemberInGroupsInput, optFns ...func(*Options)) (*IsMemberInGroupsOutput, error) { if params == nil { params = &IsMemberInGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "IsMemberInGroups", params, optFns, c.addOperationIsMemberInGroupsMiddlewares) if err != nil { return nil, err } out := result.(*IsMemberInGroupsOutput) out.ResultMetadata = metadata return out, nil } type IsMemberInGroupsInput struct { // A list of identifiers for groups in the identity store. // // This member is required. GroupIds []string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // An object containing the identifier of a group member. // // This member is required. MemberId types.MemberId noSmithyDocumentSerde } type IsMemberInGroupsOutput struct { // A list containing the results of membership existence checks. // // This member is required. Results []types.GroupMembershipExistenceResult // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationIsMemberInGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpIsMemberInGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpIsMemberInGroups{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpIsMemberInGroupsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opIsMemberInGroups(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } func newServiceMetadataMiddleware_opIsMemberInGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "IsMemberInGroups", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // For the specified group in the specified identity store, returns the list of // all GroupMembership objects and returns results in paginated form. func (c *Client) ListGroupMemberships(ctx context.Context, params *ListGroupMembershipsInput, optFns ...func(*Options)) (*ListGroupMembershipsOutput, error) { if params == nil { params = &ListGroupMembershipsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListGroupMemberships", params, optFns, c.addOperationListGroupMembershipsMiddlewares) if err != nil { return nil, err } out := result.(*ListGroupMembershipsOutput) out.ResultMetadata = metadata return out, nil } type ListGroupMembershipsInput struct { // The identifier for a group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The maximum number of results to be returned per request. This parameter is // used in all List requests to specify how many results to return in one page. MaxResults *int32 // The pagination token used for the ListUsers , ListGroups and // ListGroupMemberships API operations. This value is generated by the identity // store service. It is returned in the API response if the total results are more // than the size of one page. This token is also returned when it is used in the // API request to search for the next page. NextToken *string noSmithyDocumentSerde } type ListGroupMembershipsOutput struct { // A list of GroupMembership objects in the group. // // This member is required. GroupMemberships []types.GroupMembership // The pagination token used for the ListUsers , ListGroups , and // ListGroupMemberships API operations. This value is generated by the identity // store service. It is returned in the API response if the total results are more // than the size of one page. This token is also returned when it is used in the // API request to search for the next page. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListGroupMemberships{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListGroupMemberships{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListGroupMembershipsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroupMemberships(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } // ListGroupMembershipsAPIClient is a client that implements the // ListGroupMemberships operation. type ListGroupMembershipsAPIClient interface { ListGroupMemberships(context.Context, *ListGroupMembershipsInput, ...func(*Options)) (*ListGroupMembershipsOutput, error) } var _ ListGroupMembershipsAPIClient = (*Client)(nil) // ListGroupMembershipsPaginatorOptions is the paginator options for // ListGroupMemberships type ListGroupMembershipsPaginatorOptions struct { // The maximum number of results to be returned per request. This parameter is // used in all List requests to specify how many results to return in one page. 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 } // ListGroupMembershipsPaginator is a paginator for ListGroupMemberships type ListGroupMembershipsPaginator struct { options ListGroupMembershipsPaginatorOptions client ListGroupMembershipsAPIClient params *ListGroupMembershipsInput nextToken *string firstPage bool } // NewListGroupMembershipsPaginator returns a new ListGroupMembershipsPaginator func NewListGroupMembershipsPaginator(client ListGroupMembershipsAPIClient, params *ListGroupMembershipsInput, optFns ...func(*ListGroupMembershipsPaginatorOptions)) *ListGroupMembershipsPaginator { if params == nil { params = &ListGroupMembershipsInput{} } options := ListGroupMembershipsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListGroupMembershipsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupMembershipsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroupMemberships page. func (p *ListGroupMembershipsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupMembershipsOutput, 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.ListGroupMemberships(ctx, &params, 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_opListGroupMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "ListGroupMemberships", } }
244
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // For the specified member in the specified identity store, returns the list of // all GroupMembership objects and returns results in paginated form. func (c *Client) ListGroupMembershipsForMember(ctx context.Context, params *ListGroupMembershipsForMemberInput, optFns ...func(*Options)) (*ListGroupMembershipsForMemberOutput, error) { if params == nil { params = &ListGroupMembershipsForMemberInput{} } result, metadata, err := c.invokeOperation(ctx, "ListGroupMembershipsForMember", params, optFns, c.addOperationListGroupMembershipsForMemberMiddlewares) if err != nil { return nil, err } out := result.(*ListGroupMembershipsForMemberOutput) out.ResultMetadata = metadata return out, nil } type ListGroupMembershipsForMemberInput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // An object that contains the identifier of a group member. Setting the UserID // field to the specific identifier for a user indicates that the user is a member // of the group. // // This member is required. MemberId types.MemberId // The maximum number of results to be returned per request. This parameter is // used in the ListUsers and ListGroups requests to specify how many results to // return in one page. The length limit is 50 characters. MaxResults *int32 // The pagination token used for the ListUsers , ListGroups , and // ListGroupMemberships API operations. This value is generated by the identity // store service. It is returned in the API response if the total results are more // than the size of one page. This token is also returned when it is used in the // API request to search for the next page. NextToken *string noSmithyDocumentSerde } type ListGroupMembershipsForMemberOutput struct { // A list of GroupMembership objects in the group for a specified member. // // This member is required. GroupMemberships []types.GroupMembership // The pagination token used for the ListUsers , ListGroups , and // ListGroupMemberships API operations. This value is generated by the identity // store service. It is returned in the API response if the total results are more // than the size of one page. This token is also returned when it is used in the // API request to search for the next page. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListGroupMembershipsForMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListGroupMembershipsForMember{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListGroupMembershipsForMember{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListGroupMembershipsForMemberValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroupMembershipsForMember(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } // ListGroupMembershipsForMemberAPIClient is a client that implements the // ListGroupMembershipsForMember operation. type ListGroupMembershipsForMemberAPIClient interface { ListGroupMembershipsForMember(context.Context, *ListGroupMembershipsForMemberInput, ...func(*Options)) (*ListGroupMembershipsForMemberOutput, error) } var _ ListGroupMembershipsForMemberAPIClient = (*Client)(nil) // ListGroupMembershipsForMemberPaginatorOptions is the paginator options for // ListGroupMembershipsForMember type ListGroupMembershipsForMemberPaginatorOptions struct { // The maximum number of results to be returned per request. This parameter is // used in the ListUsers and ListGroups requests to specify how many results to // return in one page. The length limit is 50 characters. 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 } // ListGroupMembershipsForMemberPaginator is a paginator for // ListGroupMembershipsForMember type ListGroupMembershipsForMemberPaginator struct { options ListGroupMembershipsForMemberPaginatorOptions client ListGroupMembershipsForMemberAPIClient params *ListGroupMembershipsForMemberInput nextToken *string firstPage bool } // NewListGroupMembershipsForMemberPaginator returns a new // ListGroupMembershipsForMemberPaginator func NewListGroupMembershipsForMemberPaginator(client ListGroupMembershipsForMemberAPIClient, params *ListGroupMembershipsForMemberInput, optFns ...func(*ListGroupMembershipsForMemberPaginatorOptions)) *ListGroupMembershipsForMemberPaginator { if params == nil { params = &ListGroupMembershipsForMemberInput{} } options := ListGroupMembershipsForMemberPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListGroupMembershipsForMemberPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupMembershipsForMemberPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroupMembershipsForMember page. func (p *ListGroupMembershipsForMemberPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupMembershipsForMemberOutput, 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.ListGroupMembershipsForMember(ctx, &params, 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_opListGroupMembershipsForMember(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "ListGroupMembershipsForMember", } }
250
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists all groups in the identity store. Returns a paginated list of complete // Group objects. Filtering for a Group by the DisplayName attribute is // deprecated. Instead, use the GetGroupId API action. func (c *Client) ListGroups(ctx context.Context, params *ListGroupsInput, optFns ...func(*Options)) (*ListGroupsOutput, error) { if params == nil { params = &ListGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListGroups", params, optFns, c.addOperationListGroupsMiddlewares) if err != nil { return nil, err } out := result.(*ListGroupsOutput) out.ResultMetadata = metadata return out, nil } type ListGroupsInput struct { // The globally unique identifier for the identity store, such as d-1234567890 . In // this example, d- is a fixed prefix, and 1234567890 is a randomly generated // string that contains numbers and lower case letters. This value is generated at // the time that a new identity store is created. // // This member is required. IdentityStoreId *string // A list of Filter objects, which is used in the ListUsers and ListGroups // requests. // // Deprecated: Using filters with ListGroups API is deprecated, please use // GetGroupId API instead. Filters []types.Filter // The maximum number of results to be returned per request. This parameter is // used in the ListUsers and ListGroups requests to specify how many results to // return in one page. The length limit is 50 characters. MaxResults *int32 // The pagination token used for the ListUsers and ListGroups API operations. This // value is generated by the identity store service. It is returned in the API // response if the total results are more than the size of one page. This token is // also returned when it is used in the API request to search for the next page. NextToken *string noSmithyDocumentSerde } type ListGroupsOutput struct { // A list of Group objects in the identity store. // // This member is required. Groups []types.Group // The pagination token used for the ListUsers and ListGroups API operations. This // value is generated by the identity store service. It is returned in the API // response if the total results are more than the size of one page. This token is // also returned when it1 is used in the API request to search for the next page. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListGroups{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListGroupsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroups(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } // ListGroupsAPIClient is a client that implements the ListGroups operation. type ListGroupsAPIClient interface { ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) } var _ ListGroupsAPIClient = (*Client)(nil) // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // The maximum number of results to be returned per request. This parameter is // used in the ListUsers and ListGroups requests to specify how many results to // return in one page. The length limit is 50 characters. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListGroupsPaginator is a paginator for ListGroups type ListGroupsPaginator struct { options ListGroupsPaginatorOptions client ListGroupsAPIClient params *ListGroupsInput nextToken *string firstPage bool } // NewListGroupsPaginator returns a new ListGroupsPaginator func NewListGroupsPaginator(client ListGroupsAPIClient, params *ListGroupsInput, optFns ...func(*ListGroupsPaginatorOptions)) *ListGroupsPaginator { if params == nil { params = &ListGroupsInput{} } options := ListGroupsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListGroupsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroups page. func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListGroups(ctx, &params, 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_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "ListGroups", } }
248
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists all users in the identity store. Returns a paginated list of complete User // objects. Filtering for a User by the UserName attribute is deprecated. Instead, // use the GetUserId API action. func (c *Client) ListUsers(ctx context.Context, params *ListUsersInput, optFns ...func(*Options)) (*ListUsersOutput, error) { if params == nil { params = &ListUsersInput{} } result, metadata, err := c.invokeOperation(ctx, "ListUsers", params, optFns, c.addOperationListUsersMiddlewares) if err != nil { return nil, err } out := result.(*ListUsersOutput) out.ResultMetadata = metadata return out, nil } type ListUsersInput struct { // The globally unique identifier for the identity store, such as d-1234567890 . In // this example, d- is a fixed prefix, and 1234567890 is a randomly generated // string that contains numbers and lower case letters. This value is generated at // the time that a new identity store is created. // // This member is required. IdentityStoreId *string // A list of Filter objects, which is used in the ListUsers and ListGroups // requests. // // Deprecated: Using filters with ListUsers API is deprecated, please use // GetGroupId API instead. Filters []types.Filter // The maximum number of results to be returned per request. This parameter is // used in the ListUsers and ListGroups requests to specify how many results to // return in one page. The length limit is 50 characters. MaxResults *int32 // The pagination token used for the ListUsers and ListGroups API operations. This // value is generated by the identity store service. It is returned in the API // response if the total results are more than the size of one page. This token is // also returned when it is used in the API request to search for the next page. NextToken *string noSmithyDocumentSerde } type ListUsersOutput struct { // A list of User objects in the identity store. // // This member is required. Users []types.User // The pagination token used for the ListUsers and ListGroups API operations. This // value is generated by the identity store service. It is returned in the API // response if the total results are more than the size of one page. This token is // also returned when it is used in the API request to search for the next page. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListUsers{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListUsers{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsers(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { 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 } return nil } // ListUsersAPIClient is a client that implements the ListUsers operation. type ListUsersAPIClient interface { ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) } var _ ListUsersAPIClient = (*Client)(nil) // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // The maximum number of results to be returned per request. This parameter is // used in the ListUsers and ListGroups requests to specify how many results to // return in one page. The length limit is 50 characters. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListUsersPaginator is a paginator for ListUsers type ListUsersPaginator struct { options ListUsersPaginatorOptions client ListUsersAPIClient params *ListUsersInput nextToken *string firstPage bool } // NewListUsersPaginator returns a new ListUsersPaginator func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, optFns ...func(*ListUsersPaginatorOptions)) *ListUsersPaginator { if params == nil { params = &ListUsersInput{} } options := ListUsersPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListUsersPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsersPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsers page. func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUsersOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListUsers(ctx, &params, 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_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "ListUsers", } }
248
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // For the specified group in the specified identity store, updates the group // metadata and attributes. func (c *Client) UpdateGroup(ctx context.Context, params *UpdateGroupInput, optFns ...func(*Options)) (*UpdateGroupOutput, error) { if params == nil { params = &UpdateGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateGroup", params, optFns, c.addOperationUpdateGroupMiddlewares) if err != nil { return nil, err } out := result.(*UpdateGroupOutput) out.ResultMetadata = metadata return out, nil } type UpdateGroupInput struct { // The identifier for a group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // A list of AttributeOperation objects to apply to the requested group. These // operations might add, replace, or remove an attribute. // // This member is required. Operations []types.AttributeOperation noSmithyDocumentSerde } type UpdateGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateGroup{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGroup(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "UpdateGroup", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // For the specified user in the specified identity store, updates the user // metadata and attributes. func (c *Client) UpdateUser(ctx context.Context, params *UpdateUserInput, optFns ...func(*Options)) (*UpdateUserOutput, error) { if params == nil { params = &UpdateUserInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateUser", params, optFns, c.addOperationUpdateUserMiddlewares) if err != nil { return nil, err } out := result.(*UpdateUserOutput) out.ResultMetadata = metadata return out, nil } type UpdateUserInput struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // A list of AttributeOperation objects to apply to the requested user. These // operations might add, replace, or remove an attribute. // // This member is required. Operations []types.AttributeOperation // The identifier for a user in the identity store. // // This member is required. UserId *string noSmithyDocumentSerde } type UpdateUserOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateUser{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateUser{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateUser(options.Region), middleware.Before); err != nil { return err } if err = 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 } return nil } func newServiceMetadataMiddleware_opUpdateUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "identitystore", OperationName: "UpdateUser", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" ) type awsAwsjson11_deserializeOpCreateGroup struct { } func (*awsAwsjson11_deserializeOpCreateGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateGroup(response, &metadata) } output := &CreateGroupOutput{} 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 = awsAwsjson11_deserializeOpDocumentCreateGroupOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode 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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateGroupMembership struct { } func (*awsAwsjson11_deserializeOpCreateGroupMembership) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateGroupMembership) 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, awsAwsjson11_deserializeOpErrorCreateGroupMembership(response, &metadata) } output := &CreateGroupMembershipOutput{} 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 = awsAwsjson11_deserializeOpDocumentCreateGroupMembershipOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateGroupMembership(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateUser struct { } func (*awsAwsjson11_deserializeOpCreateUser) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateUser(response, &metadata) } output := &CreateUserOutput{} 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 = awsAwsjson11_deserializeOpDocumentCreateUserOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode 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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteGroup struct { } func (*awsAwsjson11_deserializeOpDeleteGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteGroup(response, &metadata) } output := &DeleteGroupOutput{} 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 = awsAwsjson11_deserializeOpDocumentDeleteGroupOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode 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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteGroupMembership struct { } func (*awsAwsjson11_deserializeOpDeleteGroupMembership) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteGroupMembership) 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, awsAwsjson11_deserializeOpErrorDeleteGroupMembership(response, &metadata) } output := &DeleteGroupMembershipOutput{} 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 = awsAwsjson11_deserializeOpDocumentDeleteGroupMembershipOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteGroupMembership(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteUser struct { } func (*awsAwsjson11_deserializeOpDeleteUser) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteUser(response, &metadata) } output := &DeleteUserOutput{} 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 = awsAwsjson11_deserializeOpDocumentDeleteUserOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode 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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeGroup struct { } func (*awsAwsjson11_deserializeOpDescribeGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeGroup) 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, awsAwsjson11_deserializeOpErrorDescribeGroup(response, &metadata) } output := &DescribeGroupOutput{} 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 = awsAwsjson11_deserializeOpDocumentDescribeGroupOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeGroup(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeGroupMembership struct { } func (*awsAwsjson11_deserializeOpDescribeGroupMembership) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeGroupMembership) 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, awsAwsjson11_deserializeOpErrorDescribeGroupMembership(response, &metadata) } output := &DescribeGroupMembershipOutput{} 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 = awsAwsjson11_deserializeOpDocumentDescribeGroupMembershipOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeGroupMembership(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeUser struct { } func (*awsAwsjson11_deserializeOpDescribeUser) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeUser) 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, awsAwsjson11_deserializeOpErrorDescribeUser(response, &metadata) } output := &DescribeUserOutput{} 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 = awsAwsjson11_deserializeOpDocumentDescribeUserOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeUser(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetGroupId struct { } func (*awsAwsjson11_deserializeOpGetGroupId) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetGroupId) 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, awsAwsjson11_deserializeOpErrorGetGroupId(response, &metadata) } output := &GetGroupIdOutput{} 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 = awsAwsjson11_deserializeOpDocumentGetGroupIdOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetGroupId(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetGroupMembershipId struct { } func (*awsAwsjson11_deserializeOpGetGroupMembershipId) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetGroupMembershipId) 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, awsAwsjson11_deserializeOpErrorGetGroupMembershipId(response, &metadata) } output := &GetGroupMembershipIdOutput{} 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 = awsAwsjson11_deserializeOpDocumentGetGroupMembershipIdOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetGroupMembershipId(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetUserId struct { } func (*awsAwsjson11_deserializeOpGetUserId) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetUserId) 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, awsAwsjson11_deserializeOpErrorGetUserId(response, &metadata) } output := &GetUserIdOutput{} 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 = awsAwsjson11_deserializeOpDocumentGetUserIdOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetUserId(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpIsMemberInGroups struct { } func (*awsAwsjson11_deserializeOpIsMemberInGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpIsMemberInGroups) 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, awsAwsjson11_deserializeOpErrorIsMemberInGroups(response, &metadata) } output := &IsMemberInGroupsOutput{} 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 = awsAwsjson11_deserializeOpDocumentIsMemberInGroupsOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorIsMemberInGroups(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListGroupMemberships struct { } func (*awsAwsjson11_deserializeOpListGroupMemberships) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListGroupMemberships) 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, awsAwsjson11_deserializeOpErrorListGroupMemberships(response, &metadata) } output := &ListGroupMembershipsOutput{} 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 = awsAwsjson11_deserializeOpDocumentListGroupMembershipsOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListGroupMemberships(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListGroupMembershipsForMember struct { } func (*awsAwsjson11_deserializeOpListGroupMembershipsForMember) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListGroupMembershipsForMember) 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, awsAwsjson11_deserializeOpErrorListGroupMembershipsForMember(response, &metadata) } output := &ListGroupMembershipsForMemberOutput{} 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 = awsAwsjson11_deserializeOpDocumentListGroupMembershipsForMemberOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListGroupMembershipsForMember(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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListGroups struct { } func (*awsAwsjson11_deserializeOpListGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListGroups(response, &metadata) } output := &ListGroupsOutput{} 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 = awsAwsjson11_deserializeOpDocumentListGroupsOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode 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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListUsers struct { } func (*awsAwsjson11_deserializeOpListUsers) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListUsers(response, &metadata) } output := &ListUsersOutput{} 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 = awsAwsjson11_deserializeOpDocumentListUsersOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode 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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateGroup struct { } func (*awsAwsjson11_deserializeOpUpdateGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateGroup(response, &metadata) } output := &UpdateGroupOutput{} 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 = awsAwsjson11_deserializeOpDocumentUpdateGroupOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode 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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateUser struct { } func (*awsAwsjson11_deserializeOpUpdateUser) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateUser(response, &metadata) } output := &UpdateUserOutput{} 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 = awsAwsjson11_deserializeOpDocumentUpdateUserOutput(&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 out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode 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("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 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 } output := &types.AccessDeniedException{} err := awsAwsjson11_deserializeDocumentAccessDeniedException(&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 awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 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 } output := &types.ConflictException{} err := awsAwsjson11_deserializeDocumentConflictException(&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 awsAwsjson11_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 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 } output := &types.InternalServerException{} err := awsAwsjson11_deserializeDocumentInternalServerException(&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 awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 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 } output := &types.ResourceNotFoundException{} err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&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 awsAwsjson11_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 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 } output := &types.ServiceQuotaExceededException{} err := awsAwsjson11_deserializeDocumentServiceQuotaExceededException(&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 awsAwsjson11_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 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 } output := &types.ThrottlingException{} err := awsAwsjson11_deserializeDocumentThrottlingException(&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 awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 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 } output := &types.ValidationException{} err := awsAwsjson11_deserializeDocumentValidationException(&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 awsAwsjson11_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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RequestId to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAddress(v **types.Address, 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.Address if *v == nil { sv = &types.Address{} } else { sv = *v } for key, value := range shape { switch key { case "Country": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Country = ptr.String(jtv) } case "Formatted": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Formatted = ptr.String(jtv) } case "Locality": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Locality = ptr.String(jtv) } case "PostalCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.PostalCode = ptr.String(jtv) } case "Primary": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected SensitiveBooleanType to be of type *bool, got %T instead", value) } sv.Primary = jtv } case "Region": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Region = ptr.String(jtv) } case "StreetAddress": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.StreetAddress = ptr.String(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Type = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAddresses(v *[]types.Address, 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.Address if *v == nil { cv = []types.Address{} } else { cv = *v } for _, value := range shape { var col types.Address destAddr := &col if err := awsAwsjson11_deserializeDocumentAddress(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, 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.ConflictException if *v == nil { sv = &types.ConflictException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "Reason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConflictExceptionReason to be of type string, got %T instead", value) } sv.Reason = types.ConflictExceptionReason(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RequestId to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEmail(v **types.Email, 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.Email if *v == nil { sv = &types.Email{} } else { sv = *v } for key, value := range shape { switch key { case "Primary": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected SensitiveBooleanType to be of type *bool, got %T instead", value) } sv.Primary = jtv } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Type = ptr.String(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEmails(v *[]types.Email, 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.Email if *v == nil { cv = []types.Email{} } else { cv = *v } for _, value := range shape { var col types.Email destAddr := &col if err := awsAwsjson11_deserializeDocumentEmail(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentExternalId(v **types.ExternalId, 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.ExternalId if *v == nil { sv = &types.ExternalId{} } else { sv = *v } for key, value := range shape { switch key { case "Id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ExternalIdIdentifier to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "Issuer": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ExternalIdIssuer to be of type string, got %T instead", value) } sv.Issuer = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentExternalIds(v *[]types.ExternalId, 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.ExternalId if *v == nil { cv = []types.ExternalId{} } else { cv = *v } for _, value := range shape { var col types.ExternalId destAddr := &col if err := awsAwsjson11_deserializeDocumentExternalId(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentGroup(v **types.Group, 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.Group if *v == nil { sv = &types.Group{} } else { sv = *v } for key, value := range shape { switch key { case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "DisplayName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GroupDisplayName to be of type string, got %T instead", value) } sv.DisplayName = ptr.String(jtv) } case "ExternalIds": if err := awsAwsjson11_deserializeDocumentExternalIds(&sv.ExternalIds, value); err != nil { return err } case "GroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentGroupMembership(v **types.GroupMembership, 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.GroupMembership if *v == nil { sv = &types.GroupMembership{} } else { sv = *v } for key, value := range shape { switch key { case "GroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } case "MemberId": if err := awsAwsjson11_deserializeDocumentMemberId(&sv.MemberId, value); err != nil { return err } case "MembershipId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.MembershipId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentGroupMembershipExistenceResult(v **types.GroupMembershipExistenceResult, 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.GroupMembershipExistenceResult if *v == nil { sv = &types.GroupMembershipExistenceResult{} } else { sv = *v } for key, value := range shape { switch key { case "GroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } case "MemberId": if err := awsAwsjson11_deserializeDocumentMemberId(&sv.MemberId, value); err != nil { return err } case "MembershipExists": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected SensitiveBooleanType to be of type *bool, got %T instead", value) } sv.MembershipExists = jtv } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentGroupMembershipExistenceResults(v *[]types.GroupMembershipExistenceResult, 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.GroupMembershipExistenceResult if *v == nil { cv = []types.GroupMembershipExistenceResult{} } else { cv = *v } for _, value := range shape { var col types.GroupMembershipExistenceResult destAddr := &col if err := awsAwsjson11_deserializeDocumentGroupMembershipExistenceResult(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentGroupMemberships(v *[]types.GroupMembership, 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.GroupMembership if *v == nil { cv = []types.GroupMembership{} } else { cv = *v } for _, value := range shape { var col types.GroupMembership destAddr := &col if err := awsAwsjson11_deserializeDocumentGroupMembership(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentGroups(v *[]types.Group, 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.Group if *v == nil { cv = []types.Group{} } else { cv = *v } for _, value := range shape { var col types.Group destAddr := &col if err := awsAwsjson11_deserializeDocumentGroup(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentInternalServerException(v **types.InternalServerException, 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.InternalServerException if *v == nil { sv = &types.InternalServerException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RequestId to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } case "RetryAfterSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RetryAfterSeconds to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.RetryAfterSeconds = int32(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMemberId(v *types.MemberId, 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 uv types.MemberId loop: for key, value := range shape { if value == nil { continue } switch key { case "UserId": var mv string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } mv = jtv } uv = &types.MemberIdMemberUserId{Value: mv} break loop default: uv = &types.UnknownUnionMember{Tag: key} break loop } } *v = uv return nil } func awsAwsjson11_deserializeDocumentName(v **types.Name, 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.Name if *v == nil { sv = &types.Name{} } else { sv = *v } for key, value := range shape { switch key { case "FamilyName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.FamilyName = ptr.String(jtv) } case "Formatted": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Formatted = ptr.String(jtv) } case "GivenName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.GivenName = ptr.String(jtv) } case "HonorificPrefix": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.HonorificPrefix = ptr.String(jtv) } case "HonorificSuffix": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.HonorificSuffix = ptr.String(jtv) } case "MiddleName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.MiddleName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPhoneNumber(v **types.PhoneNumber, 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.PhoneNumber if *v == nil { sv = &types.PhoneNumber{} } else { sv = *v } for key, value := range shape { switch key { case "Primary": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected SensitiveBooleanType to be of type *bool, got %T instead", value) } sv.Primary = jtv } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Type = ptr.String(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPhoneNumbers(v *[]types.PhoneNumber, 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.PhoneNumber if *v == nil { cv = []types.PhoneNumber{} } else { cv = *v } for _, value := range shape { var col types.PhoneNumber destAddr := &col if err := awsAwsjson11_deserializeDocumentPhoneNumber(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, 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.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RequestId to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "ResourceType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) } sv.ResourceType = types.ResourceType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, 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.ServiceQuotaExceededException if *v == nil { sv = &types.ServiceQuotaExceededException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RequestId to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentThrottlingException(v **types.ThrottlingException, 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.ThrottlingException if *v == nil { sv = &types.ThrottlingException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RequestId to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } case "RetryAfterSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RetryAfterSeconds to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.RetryAfterSeconds = int32(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentUser(v **types.User, 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.User if *v == nil { sv = &types.User{} } else { sv = *v } for key, value := range shape { switch key { case "Addresses": if err := awsAwsjson11_deserializeDocumentAddresses(&sv.Addresses, value); err != nil { return err } case "DisplayName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.DisplayName = ptr.String(jtv) } case "Emails": if err := awsAwsjson11_deserializeDocumentEmails(&sv.Emails, value); err != nil { return err } case "ExternalIds": if err := awsAwsjson11_deserializeDocumentExternalIds(&sv.ExternalIds, value); err != nil { return err } case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } case "Locale": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Locale = ptr.String(jtv) } case "Name": if err := awsAwsjson11_deserializeDocumentName(&sv.Name, value); err != nil { return err } case "NickName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.NickName = ptr.String(jtv) } case "PhoneNumbers": if err := awsAwsjson11_deserializeDocumentPhoneNumbers(&sv.PhoneNumbers, value); err != nil { return err } case "PreferredLanguage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.PreferredLanguage = ptr.String(jtv) } case "ProfileUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.ProfileUrl = ptr.String(jtv) } case "Timezone": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Timezone = ptr.String(jtv) } case "Title": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Title = ptr.String(jtv) } case "UserId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.UserId = ptr.String(jtv) } case "UserName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UserName to be of type string, got %T instead", value) } sv.UserName = ptr.String(jtv) } case "UserType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.UserType = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentUsers(v *[]types.User, 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.User if *v == nil { cv = []types.User{} } else { cv = *v } for _, value := range shape { var col types.User destAddr := &col if err := awsAwsjson11_deserializeDocumentUser(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationException, 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.ValidationException if *v == nil { sv = &types.ValidationException{} } 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 ExceptionMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RequestId to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateGroupMembershipOutput(v **CreateGroupMembershipOutput, 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 *CreateGroupMembershipOutput if *v == nil { sv = &CreateGroupMembershipOutput{} } else { sv = *v } for key, value := range shape { switch key { case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } case "MembershipId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.MembershipId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateGroupOutput(v **CreateGroupOutput, 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 *CreateGroupOutput if *v == nil { sv = &CreateGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "GroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateUserOutput(v **CreateUserOutput, 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 *CreateUserOutput if *v == nil { sv = &CreateUserOutput{} } else { sv = *v } for key, value := range shape { switch key { case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } case "UserId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.UserId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteGroupMembershipOutput(v **DeleteGroupMembershipOutput, 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 *DeleteGroupMembershipOutput if *v == nil { sv = &DeleteGroupMembershipOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteGroupOutput(v **DeleteGroupOutput, 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 *DeleteGroupOutput if *v == nil { sv = &DeleteGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteUserOutput(v **DeleteUserOutput, 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 *DeleteUserOutput if *v == nil { sv = &DeleteUserOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeGroupMembershipOutput(v **DescribeGroupMembershipOutput, 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 *DescribeGroupMembershipOutput if *v == nil { sv = &DescribeGroupMembershipOutput{} } else { sv = *v } for key, value := range shape { switch key { case "GroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } case "MemberId": if err := awsAwsjson11_deserializeDocumentMemberId(&sv.MemberId, value); err != nil { return err } case "MembershipId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.MembershipId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutput, 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 *DescribeGroupOutput if *v == nil { sv = &DescribeGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "DisplayName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GroupDisplayName to be of type string, got %T instead", value) } sv.DisplayName = ptr.String(jtv) } case "ExternalIds": if err := awsAwsjson11_deserializeDocumentExternalIds(&sv.ExternalIds, value); err != nil { return err } case "GroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput, 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 *DescribeUserOutput if *v == nil { sv = &DescribeUserOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Addresses": if err := awsAwsjson11_deserializeDocumentAddresses(&sv.Addresses, value); err != nil { return err } case "DisplayName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.DisplayName = ptr.String(jtv) } case "Emails": if err := awsAwsjson11_deserializeDocumentEmails(&sv.Emails, value); err != nil { return err } case "ExternalIds": if err := awsAwsjson11_deserializeDocumentExternalIds(&sv.ExternalIds, value); err != nil { return err } case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } case "Locale": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Locale = ptr.String(jtv) } case "Name": if err := awsAwsjson11_deserializeDocumentName(&sv.Name, value); err != nil { return err } case "NickName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.NickName = ptr.String(jtv) } case "PhoneNumbers": if err := awsAwsjson11_deserializeDocumentPhoneNumbers(&sv.PhoneNumbers, value); err != nil { return err } case "PreferredLanguage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.PreferredLanguage = ptr.String(jtv) } case "ProfileUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.ProfileUrl = ptr.String(jtv) } case "Timezone": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Timezone = ptr.String(jtv) } case "Title": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.Title = ptr.String(jtv) } case "UserId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.UserId = ptr.String(jtv) } case "UserName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UserName to be of type string, got %T instead", value) } sv.UserName = ptr.String(jtv) } case "UserType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveStringType to be of type string, got %T instead", value) } sv.UserType = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetGroupIdOutput(v **GetGroupIdOutput, 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 *GetGroupIdOutput if *v == nil { sv = &GetGroupIdOutput{} } else { sv = *v } for key, value := range shape { switch key { case "GroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetGroupMembershipIdOutput(v **GetGroupMembershipIdOutput, 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 *GetGroupMembershipIdOutput if *v == nil { sv = &GetGroupMembershipIdOutput{} } else { sv = *v } for key, value := range shape { switch key { case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } case "MembershipId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.MembershipId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetUserIdOutput(v **GetUserIdOutput, 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 *GetUserIdOutput if *v == nil { sv = &GetUserIdOutput{} } else { sv = *v } for key, value := range shape { switch key { case "IdentityStoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) } sv.IdentityStoreId = ptr.String(jtv) } case "UserId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.UserId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentIsMemberInGroupsOutput(v **IsMemberInGroupsOutput, 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 *IsMemberInGroupsOutput if *v == nil { sv = &IsMemberInGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Results": if err := awsAwsjson11_deserializeDocumentGroupMembershipExistenceResults(&sv.Results, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListGroupMembershipsForMemberOutput(v **ListGroupMembershipsForMemberOutput, 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 *ListGroupMembershipsForMemberOutput if *v == nil { sv = &ListGroupMembershipsForMemberOutput{} } else { sv = *v } for key, value := range shape { switch key { case "GroupMemberships": if err := awsAwsjson11_deserializeDocumentGroupMemberships(&sv.GroupMemberships, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListGroupMembershipsOutput(v **ListGroupMembershipsOutput, 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 *ListGroupMembershipsOutput if *v == nil { sv = &ListGroupMembershipsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "GroupMemberships": if err := awsAwsjson11_deserializeDocumentGroupMemberships(&sv.GroupMemberships, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, 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 *ListGroupsOutput if *v == nil { sv = &ListGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Groups": if err := awsAwsjson11_deserializeDocumentGroups(&sv.Groups, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, 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 *ListUsersOutput if *v == nil { sv = &ListUsersOutput{} } 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 NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Users": if err := awsAwsjson11_deserializeDocumentUsers(&sv.Users, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateGroupOutput(v **UpdateGroupOutput, 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 *UpdateGroupOutput if *v == nil { sv = &UpdateGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateUserOutput(v **UpdateUserOutput, 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 *UpdateUserOutput if *v == nil { sv = &UpdateUserOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil }
5,003
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package identitystore provides the API client, operations, and parameter types // for AWS SSO Identity Store. // // The Identity Store service used by AWS IAM Identity Center (successor to AWS // Single Sign-On) provides a single place to retrieve all of your identities // (users and groups). For more information, see the IAM Identity Center User Guide (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) // . Although AWS Single Sign-On was renamed, the sso and identitystore API // namespaces will continue to retain their original name for backward // compatibility purposes. For more information, see IAM Identity Center rename (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed) // . This reference guide describes the identity store operations that you can call // programatically and includes detailed information about data types and errors. package identitystore
15
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/identitystore/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "identitystore" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package identitystore // goModuleVersion is the tagged release for this module const goModuleVersion = "1.16.13"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/identitystore/document" internaldocument "github.com/aws/aws-sdk-go-v2/service/identitystore/internal/document" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) type awsAwsjson11_serializeOpCreateGroup struct { } func (*awsAwsjson11_serializeOpCreateGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.CreateGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateGroupInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateGroupMembership struct { } func (*awsAwsjson11_serializeOpCreateGroupMembership) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateGroupMembership) 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.(*CreateGroupMembershipInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.CreateGroupMembership") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateGroupMembershipInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateUser struct { } func (*awsAwsjson11_serializeOpCreateUser) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.CreateUser") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateUserInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteGroup struct { } func (*awsAwsjson11_serializeOpDeleteGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.DeleteGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteGroupInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteGroupMembership struct { } func (*awsAwsjson11_serializeOpDeleteGroupMembership) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteGroupMembership) 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.(*DeleteGroupMembershipInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.DeleteGroupMembership") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteGroupMembershipInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteUser struct { } func (*awsAwsjson11_serializeOpDeleteUser) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.DeleteUser") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteUserInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeGroup struct { } func (*awsAwsjson11_serializeOpDescribeGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeGroup) 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.(*DescribeGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.DescribeGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeGroupInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeGroupMembership struct { } func (*awsAwsjson11_serializeOpDescribeGroupMembership) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeGroupMembership) 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.(*DescribeGroupMembershipInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.DescribeGroupMembership") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeGroupMembershipInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeUser struct { } func (*awsAwsjson11_serializeOpDescribeUser) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeUser) 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.(*DescribeUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.DescribeUser") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeUserInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetGroupId struct { } func (*awsAwsjson11_serializeOpGetGroupId) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetGroupId) 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.(*GetGroupIdInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.GetGroupId") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetGroupIdInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetGroupMembershipId struct { } func (*awsAwsjson11_serializeOpGetGroupMembershipId) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetGroupMembershipId) 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.(*GetGroupMembershipIdInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.GetGroupMembershipId") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetGroupMembershipIdInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetUserId struct { } func (*awsAwsjson11_serializeOpGetUserId) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetUserId) 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.(*GetUserIdInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.GetUserId") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetUserIdInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpIsMemberInGroups struct { } func (*awsAwsjson11_serializeOpIsMemberInGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpIsMemberInGroups) 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.(*IsMemberInGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.IsMemberInGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentIsMemberInGroupsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListGroupMemberships struct { } func (*awsAwsjson11_serializeOpListGroupMemberships) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListGroupMemberships) 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.(*ListGroupMembershipsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.ListGroupMemberships") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListGroupMembershipsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListGroupMembershipsForMember struct { } func (*awsAwsjson11_serializeOpListGroupMembershipsForMember) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListGroupMembershipsForMember) 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.(*ListGroupMembershipsForMemberInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.ListGroupMembershipsForMember") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListGroupMembershipsForMemberInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListGroups struct { } func (*awsAwsjson11_serializeOpListGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.ListGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListGroupsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListUsers struct { } func (*awsAwsjson11_serializeOpListUsers) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListUsersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.ListUsers") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListUsersInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateGroup struct { } func (*awsAwsjson11_serializeOpUpdateGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.UpdateGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateGroupInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateUser struct { } func (*awsAwsjson11_serializeOpUpdateUser) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSIdentityStore.UpdateUser") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateUserInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentAddress(v *types.Address, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Country != nil { ok := object.Key("Country") ok.String(*v.Country) } if v.Formatted != nil { ok := object.Key("Formatted") ok.String(*v.Formatted) } if v.Locality != nil { ok := object.Key("Locality") ok.String(*v.Locality) } if v.PostalCode != nil { ok := object.Key("PostalCode") ok.String(*v.PostalCode) } if v.Primary { ok := object.Key("Primary") ok.Boolean(v.Primary) } if v.Region != nil { ok := object.Key("Region") ok.String(*v.Region) } if v.StreetAddress != nil { ok := object.Key("StreetAddress") ok.String(*v.StreetAddress) } if v.Type != nil { ok := object.Key("Type") ok.String(*v.Type) } return nil } func awsAwsjson11_serializeDocumentAddresses(v []types.Address, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentAddress(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentAlternateIdentifier(v types.AlternateIdentifier, value smithyjson.Value) error { object := value.Object() defer object.Close() switch uv := v.(type) { case *types.AlternateIdentifierMemberExternalId: av := object.Key("ExternalId") if err := awsAwsjson11_serializeDocumentExternalId(&uv.Value, av); err != nil { return err } case *types.AlternateIdentifierMemberUniqueAttribute: av := object.Key("UniqueAttribute") if err := awsAwsjson11_serializeDocumentUniqueAttribute(&uv.Value, av); err != nil { return err } default: return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) } return nil } func awsAwsjson11_serializeDocumentAttributeOperation(v *types.AttributeOperation, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttributePath != nil { ok := object.Key("AttributePath") ok.String(*v.AttributePath) } if v.AttributeValue != nil { ok := object.Key("AttributeValue") if err := awsAwsjson11_serializeDocumentAttributeValue(v.AttributeValue, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentAttributeOperations(v []types.AttributeOperation, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentAttributeOperation(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentAttributeValue(v document.Interface, value smithyjson.Value) error { if v == nil { return nil } if !internaldocument.IsInterface(v) { return fmt.Errorf("%T is not a compatible document type", v) } db, err := v.MarshalSmithyDocument() if err != nil { return err } value.Write(db) return nil } func awsAwsjson11_serializeDocumentEmail(v *types.Email, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Primary { ok := object.Key("Primary") ok.Boolean(v.Primary) } if v.Type != nil { ok := object.Key("Type") ok.String(*v.Type) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson11_serializeDocumentEmails(v []types.Email, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentEmail(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentExternalId(v *types.ExternalId, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.Issuer != nil { ok := object.Key("Issuer") ok.String(*v.Issuer) } return nil } func awsAwsjson11_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttributePath != nil { ok := object.Key("AttributePath") ok.String(*v.AttributePath) } if v.AttributeValue != nil { ok := object.Key("AttributeValue") ok.String(*v.AttributeValue) } return nil } func awsAwsjson11_serializeDocumentFilters(v []types.Filter, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentFilter(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentGroupIds(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentMemberId(v types.MemberId, value smithyjson.Value) error { object := value.Object() defer object.Close() switch uv := v.(type) { case *types.MemberIdMemberUserId: av := object.Key("UserId") av.String(uv.Value) default: return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) } return nil } func awsAwsjson11_serializeDocumentName(v *types.Name, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FamilyName != nil { ok := object.Key("FamilyName") ok.String(*v.FamilyName) } if v.Formatted != nil { ok := object.Key("Formatted") ok.String(*v.Formatted) } if v.GivenName != nil { ok := object.Key("GivenName") ok.String(*v.GivenName) } if v.HonorificPrefix != nil { ok := object.Key("HonorificPrefix") ok.String(*v.HonorificPrefix) } if v.HonorificSuffix != nil { ok := object.Key("HonorificSuffix") ok.String(*v.HonorificSuffix) } if v.MiddleName != nil { ok := object.Key("MiddleName") ok.String(*v.MiddleName) } return nil } func awsAwsjson11_serializeDocumentPhoneNumber(v *types.PhoneNumber, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Primary { ok := object.Key("Primary") ok.Boolean(v.Primary) } if v.Type != nil { ok := object.Key("Type") ok.String(*v.Type) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson11_serializeDocumentPhoneNumbers(v []types.PhoneNumber, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentPhoneNumber(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentUniqueAttribute(v *types.UniqueAttribute, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttributePath != nil { ok := object.Key("AttributePath") ok.String(*v.AttributePath) } if v.AttributeValue != nil { ok := object.Key("AttributeValue") if err := awsAwsjson11_serializeDocumentAttributeValue(v.AttributeValue, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateGroupInput(v *CreateGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.DisplayName != nil { ok := object.Key("DisplayName") ok.String(*v.DisplayName) } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } return nil } func awsAwsjson11_serializeOpDocumentCreateGroupMembershipInput(v *CreateGroupMembershipInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.MemberId != nil { ok := object.Key("MemberId") if err := awsAwsjson11_serializeDocumentMemberId(v.MemberId, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Addresses != nil { ok := object.Key("Addresses") if err := awsAwsjson11_serializeDocumentAddresses(v.Addresses, ok); err != nil { return err } } if v.DisplayName != nil { ok := object.Key("DisplayName") ok.String(*v.DisplayName) } if v.Emails != nil { ok := object.Key("Emails") if err := awsAwsjson11_serializeDocumentEmails(v.Emails, ok); err != nil { return err } } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.Locale != nil { ok := object.Key("Locale") ok.String(*v.Locale) } if v.Name != nil { ok := object.Key("Name") if err := awsAwsjson11_serializeDocumentName(v.Name, ok); err != nil { return err } } if v.NickName != nil { ok := object.Key("NickName") ok.String(*v.NickName) } if v.PhoneNumbers != nil { ok := object.Key("PhoneNumbers") if err := awsAwsjson11_serializeDocumentPhoneNumbers(v.PhoneNumbers, ok); err != nil { return err } } if v.PreferredLanguage != nil { ok := object.Key("PreferredLanguage") ok.String(*v.PreferredLanguage) } if v.ProfileUrl != nil { ok := object.Key("ProfileUrl") ok.String(*v.ProfileUrl) } if v.Timezone != nil { ok := object.Key("Timezone") ok.String(*v.Timezone) } if v.Title != nil { ok := object.Key("Title") ok.String(*v.Title) } if v.UserName != nil { ok := object.Key("UserName") ok.String(*v.UserName) } if v.UserType != nil { ok := object.Key("UserType") ok.String(*v.UserType) } return nil } func awsAwsjson11_serializeOpDocumentDeleteGroupInput(v *DeleteGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteGroupMembershipInput(v *DeleteGroupMembershipInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.MembershipId != nil { ok := object.Key("MembershipId") ok.String(*v.MembershipId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteUserInput(v *DeleteUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeGroupInput(v *DescribeGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeGroupMembershipInput(v *DescribeGroupMembershipInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.MembershipId != nil { ok := object.Key("MembershipId") ok.String(*v.MembershipId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeUserInput(v *DescribeUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeOpDocumentGetGroupIdInput(v *GetGroupIdInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AlternateIdentifier != nil { ok := object.Key("AlternateIdentifier") if err := awsAwsjson11_serializeDocumentAlternateIdentifier(v.AlternateIdentifier, ok); err != nil { return err } } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } return nil } func awsAwsjson11_serializeOpDocumentGetGroupMembershipIdInput(v *GetGroupMembershipIdInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.MemberId != nil { ok := object.Key("MemberId") if err := awsAwsjson11_serializeDocumentMemberId(v.MemberId, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentGetUserIdInput(v *GetUserIdInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AlternateIdentifier != nil { ok := object.Key("AlternateIdentifier") if err := awsAwsjson11_serializeDocumentAlternateIdentifier(v.AlternateIdentifier, ok); err != nil { return err } } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } return nil } func awsAwsjson11_serializeOpDocumentIsMemberInGroupsInput(v *IsMemberInGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupIds != nil { ok := object.Key("GroupIds") if err := awsAwsjson11_serializeDocumentGroupIds(v.GroupIds, ok); err != nil { return err } } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.MemberId != nil { ok := object.Key("MemberId") if err := awsAwsjson11_serializeDocumentMemberId(v.MemberId, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentListGroupMembershipsForMemberInput(v *ListGroupMembershipsForMemberInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.MemberId != nil { ok := object.Key("MemberId") if err := awsAwsjson11_serializeDocumentMemberId(v.MemberId, ok); err != nil { return err } } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListGroupMembershipsInput(v *ListGroupMembershipsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListGroupsInput(v *ListGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Filters != nil { ok := object.Key("Filters") if err := awsAwsjson11_serializeDocumentFilters(v.Filters, ok); err != nil { return err } } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListUsersInput(v *ListUsersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Filters != nil { ok := object.Key("Filters") if err := awsAwsjson11_serializeDocumentFilters(v.Filters, ok); err != nil { return err } } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentUpdateGroupInput(v *UpdateGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.Operations != nil { ok := object.Key("Operations") if err := awsAwsjson11_serializeDocumentAttributeOperations(v.Operations, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateUserInput(v *UpdateUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IdentityStoreId != nil { ok := object.Key("IdentityStoreId") ok.String(*v.IdentityStoreId) } if v.Operations != nil { ok := object.Key("Operations") if err := awsAwsjson11_serializeDocumentAttributeOperations(v.Operations, ok); err != nil { return err } } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil }
1,877
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package identitystore import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpCreateGroup struct { } func (*validateOpCreateGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateGroupMembership struct { } func (*validateOpCreateGroupMembership) ID() string { return "OperationInputValidation" } func (m *validateOpCreateGroupMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateGroupMembershipInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateGroupMembershipInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateUser struct { } func (*validateOpCreateUser) ID() string { return "OperationInputValidation" } func (m *validateOpCreateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteGroup struct { } func (*validateOpDeleteGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteGroupMembership struct { } func (*validateOpDeleteGroupMembership) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteGroupMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteGroupMembershipInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteGroupMembershipInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteUser struct { } func (*validateOpDeleteUser) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeGroup struct { } func (*validateOpDescribeGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeGroupMembership struct { } func (*validateOpDescribeGroupMembership) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeGroupMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeGroupMembershipInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeGroupMembershipInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeUser struct { } func (*validateOpDescribeUser) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetGroupId struct { } func (*validateOpGetGroupId) ID() string { return "OperationInputValidation" } func (m *validateOpGetGroupId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetGroupIdInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetGroupIdInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetGroupMembershipId struct { } func (*validateOpGetGroupMembershipId) ID() string { return "OperationInputValidation" } func (m *validateOpGetGroupMembershipId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetGroupMembershipIdInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetGroupMembershipIdInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetUserId struct { } func (*validateOpGetUserId) ID() string { return "OperationInputValidation" } func (m *validateOpGetUserId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetUserIdInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetUserIdInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpIsMemberInGroups struct { } func (*validateOpIsMemberInGroups) ID() string { return "OperationInputValidation" } func (m *validateOpIsMemberInGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*IsMemberInGroupsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpIsMemberInGroupsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListGroupMembershipsForMember struct { } func (*validateOpListGroupMembershipsForMember) ID() string { return "OperationInputValidation" } func (m *validateOpListGroupMembershipsForMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListGroupMembershipsForMemberInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListGroupMembershipsForMemberInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListGroupMemberships struct { } func (*validateOpListGroupMemberships) ID() string { return "OperationInputValidation" } func (m *validateOpListGroupMemberships) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListGroupMembershipsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListGroupMembershipsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListGroups struct { } func (*validateOpListGroups) ID() string { return "OperationInputValidation" } func (m *validateOpListGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListGroupsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListGroupsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListUsers struct { } func (*validateOpListUsers) ID() string { return "OperationInputValidation" } func (m *validateOpListUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListUsersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListUsersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateGroup struct { } func (*validateOpUpdateGroup) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateUser struct { } func (*validateOpUpdateUser) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpCreateGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateGroup{}, middleware.After) } func addOpCreateGroupMembershipValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateGroupMembership{}, middleware.After) } func addOpCreateUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateUser{}, middleware.After) } func addOpDeleteGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteGroup{}, middleware.After) } func addOpDeleteGroupMembershipValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteGroupMembership{}, middleware.After) } func addOpDeleteUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteUser{}, middleware.After) } func addOpDescribeGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeGroup{}, middleware.After) } func addOpDescribeGroupMembershipValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeGroupMembership{}, middleware.After) } func addOpDescribeUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeUser{}, middleware.After) } func addOpGetGroupIdValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetGroupId{}, middleware.After) } func addOpGetGroupMembershipIdValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetGroupMembershipId{}, middleware.After) } func addOpGetUserIdValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetUserId{}, middleware.After) } func addOpIsMemberInGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpIsMemberInGroups{}, middleware.After) } func addOpListGroupMembershipsForMemberValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListGroupMembershipsForMember{}, middleware.After) } func addOpListGroupMembershipsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListGroupMemberships{}, middleware.After) } func addOpListGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListGroups{}, middleware.After) } func addOpListUsersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListUsers{}, middleware.After) } func addOpUpdateGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateGroup{}, middleware.After) } func addOpUpdateUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateUser{}, middleware.After) } func validateAlternateIdentifier(v types.AlternateIdentifier) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AlternateIdentifier"} switch uv := v.(type) { case *types.AlternateIdentifierMemberExternalId: if err := validateExternalId(&uv.Value); err != nil { invalidParams.AddNested("[ExternalId]", err.(smithy.InvalidParamsError)) } case *types.AlternateIdentifierMemberUniqueAttribute: if err := validateUniqueAttribute(&uv.Value); err != nil { invalidParams.AddNested("[UniqueAttribute]", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAttributeOperation(v *types.AttributeOperation) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AttributeOperation"} if v.AttributePath == nil { invalidParams.Add(smithy.NewErrParamRequired("AttributePath")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAttributeOperations(v []types.AttributeOperation) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AttributeOperations"} for i := range v { if err := validateAttributeOperation(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateExternalId(v *types.ExternalId) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ExternalId"} if v.Issuer == nil { invalidParams.Add(smithy.NewErrParamRequired("Issuer")) } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFilter(v *types.Filter) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Filter"} if v.AttributePath == nil { invalidParams.Add(smithy.NewErrParamRequired("AttributePath")) } if v.AttributeValue == nil { invalidParams.Add(smithy.NewErrParamRequired("AttributeValue")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFilters(v []types.Filter) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Filters"} for i := range v { if err := validateFilter(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateUniqueAttribute(v *types.UniqueAttribute) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UniqueAttribute"} if v.AttributePath == nil { invalidParams.Add(smithy.NewErrParamRequired("AttributePath")) } if v.AttributeValue == nil { invalidParams.Add(smithy.NewErrParamRequired("AttributeValue")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateGroupInput(v *CreateGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateGroupInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateGroupMembershipInput(v *CreateGroupMembershipInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateGroupMembershipInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.MemberId == nil { invalidParams.Add(smithy.NewErrParamRequired("MemberId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateUserInput(v *CreateUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateUserInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteGroupInput(v *DeleteGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteGroupInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteGroupMembershipInput(v *DeleteGroupMembershipInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteGroupMembershipInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.MembershipId == nil { invalidParams.Add(smithy.NewErrParamRequired("MembershipId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteUserInput(v *DeleteUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteUserInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeGroupInput(v *DescribeGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeGroupInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeGroupMembershipInput(v *DescribeGroupMembershipInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeGroupMembershipInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.MembershipId == nil { invalidParams.Add(smithy.NewErrParamRequired("MembershipId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeUserInput(v *DescribeUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeUserInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetGroupIdInput(v *GetGroupIdInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetGroupIdInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.AlternateIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("AlternateIdentifier")) } else if v.AlternateIdentifier != nil { if err := validateAlternateIdentifier(v.AlternateIdentifier); err != nil { invalidParams.AddNested("AlternateIdentifier", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetGroupMembershipIdInput(v *GetGroupMembershipIdInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetGroupMembershipIdInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.MemberId == nil { invalidParams.Add(smithy.NewErrParamRequired("MemberId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetUserIdInput(v *GetUserIdInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetUserIdInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.AlternateIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("AlternateIdentifier")) } else if v.AlternateIdentifier != nil { if err := validateAlternateIdentifier(v.AlternateIdentifier); err != nil { invalidParams.AddNested("AlternateIdentifier", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpIsMemberInGroupsInput(v *IsMemberInGroupsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "IsMemberInGroupsInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.MemberId == nil { invalidParams.Add(smithy.NewErrParamRequired("MemberId")) } if v.GroupIds == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListGroupMembershipsForMemberInput(v *ListGroupMembershipsForMemberInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListGroupMembershipsForMemberInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.MemberId == nil { invalidParams.Add(smithy.NewErrParamRequired("MemberId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListGroupMembershipsInput(v *ListGroupMembershipsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListGroupMembershipsInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListGroupsInput(v *ListGroupsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListGroupsInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.Filters != nil { if err := validateFilters(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListUsersInput(v *ListUsersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListUsersInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.Filters != nil { if err := validateFilters(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateGroupInput(v *UpdateGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateGroupInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.Operations == nil { invalidParams.Add(smithy.NewErrParamRequired("Operations")) } else if v.Operations != nil { if err := validateAttributeOperations(v.Operations); err != nil { invalidParams.AddNested("Operations", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateUserInput(v *UpdateUserInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateUserInput"} if v.IdentityStoreId == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) } if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if v.Operations == nil { invalidParams.Add(smithy.NewErrParamRequired("Operations")) } else if v.Operations != nil { if err := validateAttributeOperations(v.Operations); err != nil { invalidParams.AddNested("Operations", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
966
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package document implements encoding and decoding of open-content that has a JSON-like data model. // This data-model allows for UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a // map of UTF-8 strings to these values. // // Interface defines the semantics for how a document type is marshalled and unmarshalled for requests and responses // for the service. To send a document as input to the service you use NewLazyDocument and pass it the Go type to be // sent to the service. NewLazyDocument returns a document Interface type that encodes the provided Go type during // the request serialization step after you have invoked an API client operation that uses the document type. // // The following examples show how you can create document types using basic Go types. // // NewLazyDocument(map[string]interface{}{ // "favoriteNumber": 42, // "fruits": []string{"apple", "orange"}, // "capitals": map[string]interface{}{ // "Washington": "Olympia", // "Oregon": "Salem", // }, // "skyIsBlue": true, // }) // // NewLazyDocument(3.14159) // // NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) // // NewLazyDocument(true) // // Services can send document types as part of their API responses. To retrieve the content of a response document // you use the UnmarshalSmithyDocument method on the response document. When calling UnmarshalSmithyDocument you pass // a reference to the Go type that you want to unmarshal and map the response to. // // For example, if you expect to receive key/value map from the service response: // // var kv map[string]interface{} // if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { // // handle error // } // // If a service can return one or more data-types in the response, you can use an empty interface and type switch to // dynamically handle the response type. // // var v interface{} // if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { // // handle error // } // // switch vv := v.(type) { // case map[string]interface{}: // // handle key/value map // case []interface{}: // // handle array of values // case bool: // // handle boolean // case document.Number: // // handle an arbitrary precision number // case string: // // handle string // default: // // handle unknown case // } // // The mapping of Go types to document types is covered in more depth in https://pkg.go.dev/github.com/aws/smithy-go/document // including more in depth examples that cover user-defined structure types. package document
67
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package document import ( internaldocument "github.com/aws/aws-sdk-go-v2/service/identitystore/internal/document" ) // Interface defines a document which is a protocol-agnostic type which supports a // JSON-like data-model. You can use this type to send UTF-8 strings, arbitrary // precision numbers, booleans, nulls, a list of these values, and a map of UTF-8 // strings to these values. // // You create a document type using the NewLazyDocument function and passing it // the Go type to marshal. When receiving a document in an API response, you use // the document's UnmarshalSmithyDocument function to decode the response to your // desired Go type. Unless documented specifically generated structure types in // client packages or client types packages are not supported at this time. Such // types embed a noSmithyDocumentSerde and will cause an error to be returned when // attempting to send an API request. // // For more information see the accompanying package documentation and linked // references. type Interface = internaldocument.Interface // You create document type using the NewLazyDocument function and passing it the // Go type to be marshaled and sent to the service. The document marshaler supports // semantics similar to the encoding/json Go standard library. // // For more information see the accompanying package documentation and linked // references. func NewLazyDocument(v interface{}) Interface { return internaldocument.NewDocumentMarshaler(v) }
35
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package document import ( "bytes" "encoding/json" smithydocument "github.com/aws/smithy-go/document" smithydocumentjson "github.com/aws/smithy-go/document/json" ) // github.com/aws/aws-sdk-go-v2/service/identitystore/internal/document.smithyDocument // is an interface which is used to bind a document type to its service client. type smithyDocument interface { isSmithyDocument() } // github.com/aws/aws-sdk-go-v2/service/identitystore/internal/document.Interface // is a JSON-like data model type that is protocol agnostic and is usedto send // open-content to a service. type Interface interface { smithyDocument smithydocument.Marshaler smithydocument.Unmarshaler } type documentMarshaler struct { value interface{} } func (m *documentMarshaler) UnmarshalSmithyDocument(v interface{}) error { mBytes, err := m.MarshalSmithyDocument() if err != nil { return err } jDecoder := json.NewDecoder(bytes.NewReader(mBytes)) jDecoder.UseNumber() var jv interface{} if err := jDecoder.Decode(&v); err != nil { return err } return NewDocumentUnmarshaler(v).UnmarshalSmithyDocument(&jv) } func (m *documentMarshaler) MarshalSmithyDocument() ([]byte, error) { return smithydocumentjson.NewEncoder().Encode(m.value) } func (m *documentMarshaler) isSmithyDocument() {} var _ Interface = (*documentMarshaler)(nil) type documentUnmarshaler struct { value interface{} } func (m *documentUnmarshaler) UnmarshalSmithyDocument(v interface{}) error { decoder := smithydocumentjson.NewDecoder() return decoder.DecodeJSONInterface(m.value, v) } func (m *documentUnmarshaler) MarshalSmithyDocument() ([]byte, error) { return json.Marshal(m.value) } func (m *documentUnmarshaler) isSmithyDocument() {} var _ Interface = (*documentUnmarshaler)(nil) // NewDocumentMarshaler creates a new document marshaler for the given input type func NewDocumentMarshaler(v interface{}) Interface { return &documentMarshaler{ value: v, } } // NewDocumentUnmarshaler creates a new document unmarshaler for the given service // response func NewDocumentUnmarshaler(v interface{}) Interface { return &documentUnmarshaler{ value: v, } } // github.com/aws/aws-sdk-go-v2/service/identitystore/internal/document.IsInterface // returns whether the given Interface implementation is a valid client // implementation func IsInterface(v Interface) (ok bool) { defer func() { if err := recover(); err != nil { ok = false } }() v.isSmithyDocument() return true }
100
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package document import ( smithydocument "github.com/aws/smithy-go/document" ) var _ smithyDocument = (Interface)(nil) var _ smithydocument.Marshaler = (Interface)(nil) var _ smithydocument.Unmarshaler = (Interface)(nil)
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver identitystore endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "identitystore.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "identitystore-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "identitystore-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "identitystore.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "identitystore.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "identitystore-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "identitystore-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "identitystore.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "identitystore-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "identitystore.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "identitystore-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "identitystore.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "identitystore-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "identitystore.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "identitystore-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "identitystore.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "identitystore.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "identitystore.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "identitystore-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "identitystore.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "fips-us-gov-east-1", }: endpoints.Endpoint{ Hostname: "identitystore.us-gov-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-gov-west-1", }: endpoints.Endpoint{ Hostname: "identitystore.us-gov-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-gov-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-gov-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "identitystore.us-gov-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-gov-west-1", Variant: endpoints.FIPSVariant, }: { Hostname: "identitystore.us-gov-west-1.amazonaws.com", }, }, }, }
394
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type ConflictExceptionReason string // Enum values for ConflictExceptionReason const ( ConflictExceptionReasonUniquenessConstraintViolation ConflictExceptionReason = "UNIQUENESS_CONSTRAINT_VIOLATION" ConflictExceptionReasonConcurrentModification ConflictExceptionReason = "CONCURRENT_MODIFICATION" ) // Values returns all known values for ConflictExceptionReason. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ConflictExceptionReason) Values() []ConflictExceptionReason { return []ConflictExceptionReason{ "UNIQUENESS_CONSTRAINT_VIOLATION", "CONCURRENT_MODIFICATION", } } type ResourceType string // Enum values for ResourceType const ( ResourceTypeGroup ResourceType = "GROUP" ResourceTypeUser ResourceType = "USER" ResourceTypeIdentityStore ResourceType = "IDENTITY_STORE" ResourceTypeGroupMembership ResourceType = "GROUP_MEMBERSHIP" ) // Values returns all known values for ResourceType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ResourceType) Values() []ResourceType { return []ResourceType{ "GROUP", "USER", "IDENTITY_STORE", "GROUP_MEMBERSHIP", } }
44
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // You do not have sufficient access to perform this action. type AccessDeniedException struct { Message *string ErrorCodeOverride *string RequestId *string noSmithyDocumentSerde } func (e *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AccessDeniedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AccessDeniedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AccessDeniedException" } return *e.ErrorCodeOverride } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // This request cannot be completed for one of the following reasons: // - Performing the requested operation would violate an existing uniqueness // claim in the identity store. Resolve the conflict before retrying this request. // - The requested resource was being concurrently modified by another request. type ConflictException struct { Message *string ErrorCodeOverride *string RequestId *string Reason ConflictExceptionReason noSmithyDocumentSerde } func (e *ConflictException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ConflictException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ConflictException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ConflictException" } return *e.ErrorCodeOverride } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request processing has failed because of an unknown error, exception or // failure with an internal server. type InternalServerException struct { Message *string ErrorCodeOverride *string RequestId *string RetryAfterSeconds int32 noSmithyDocumentSerde } func (e *InternalServerException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InternalServerException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InternalServerException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InternalServerException" } return *e.ErrorCodeOverride } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // Indicates that a requested resource is not found. type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string ResourceType ResourceType ResourceId *string RequestId *string noSmithyDocumentSerde } func (e *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundException" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request would cause the number of users or groups in the identity store to // exceed the maximum allowed. type ServiceQuotaExceededException struct { Message *string ErrorCodeOverride *string RequestId *string noSmithyDocumentSerde } func (e *ServiceQuotaExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ServiceQuotaExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ServiceQuotaExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ServiceQuotaExceededException" } return *e.ErrorCodeOverride } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Indicates that the principal has crossed the throttling limits of the API // operations. type ThrottlingException struct { Message *string ErrorCodeOverride *string RequestId *string RetryAfterSeconds int32 noSmithyDocumentSerde } func (e *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ThrottlingException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ThrottlingException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ThrottlingException" } return *e.ErrorCodeOverride } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request failed because it contains a syntax error. type ValidationException struct { Message *string ErrorCodeOverride *string RequestId *string noSmithyDocumentSerde } func (e *ValidationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ValidationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ValidationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ValidationException" } return *e.ErrorCodeOverride } func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
216
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "github.com/aws/aws-sdk-go-v2/service/identitystore/document" smithydocument "github.com/aws/smithy-go/document" ) // The address associated with the specified user. type Address struct { // The country of the address. Country *string // A string containing a formatted version of the address for display. Formatted *string // A string of the address locality. Locality *string // The postal code of the address. PostalCode *string // A Boolean value representing whether this is the primary address for the // associated resource. Primary bool // The region of the address. Region *string // The street of the address. StreetAddress *string // A string representing the type of address. For example, "Home." Type *string noSmithyDocumentSerde } // A unique identifier for a user or group that is not the primary identifier. // This value can be an identifier from an external identity provider (IdP) that is // associated with the user, the group, or a unique attribute. // // The following types satisfy this interface: // // AlternateIdentifierMemberExternalId // AlternateIdentifierMemberUniqueAttribute type AlternateIdentifier interface { isAlternateIdentifier() } // The identifier issued to this resource by an external identity provider. type AlternateIdentifierMemberExternalId struct { Value ExternalId noSmithyDocumentSerde } func (*AlternateIdentifierMemberExternalId) isAlternateIdentifier() {} // An entity attribute that's unique to a specific entity. type AlternateIdentifierMemberUniqueAttribute struct { Value UniqueAttribute noSmithyDocumentSerde } func (*AlternateIdentifierMemberUniqueAttribute) isAlternateIdentifier() {} // An operation that applies to the requested group. This operation might add, // replace, or remove an attribute. type AttributeOperation struct { // A string representation of the path to a given attribute or sub-attribute. // Supports JMESPath. // // This member is required. AttributePath *string // The value of the attribute. This is a Document type. This type is not supported // by Java V1, Go V1, and older versions of the AWS CLI. AttributeValue document.Interface noSmithyDocumentSerde } // The email address associated with the user. type Email struct { // A Boolean value representing whether this is the primary email address for the // associated resource. Primary bool // A string representing the type of address. For example, "Work." Type *string // A string containing an email address. For example, "johndoe@amazon.com." Value *string noSmithyDocumentSerde } // The identifier issued to this resource by an external identity provider. type ExternalId struct { // The identifier issued to this resource by an external identity provider. // // This member is required. Id *string // The issuer for an external identifier. // // This member is required. Issuer *string noSmithyDocumentSerde } // A query filter used by ListUsers and ListGroups . This filter object provides // the attribute name and attribute value to search users or groups. type Filter struct { // The attribute path that is used to specify which attribute name to search. // Length limit is 255 characters. For example, UserName is a valid attribute path // for the ListUsers API, and DisplayName is a valid attribute path for the // ListGroups API. // // This member is required. AttributePath *string // Represents the data for an attribute. Each attribute value is described as a // name-value pair. // // This member is required. AttributeValue *string noSmithyDocumentSerde } // A group object that contains the metadata and attributes for a specified group. type Group struct { // The identifier for a group in the identity store. // // This member is required. GroupId *string // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // A string containing a description of the specified group. Description *string // The display name value for the group. The length limit is 1,024 characters. // This value can consist of letters, accented characters, symbols, numbers, // punctuation, tab, new line, carriage return, space, and nonbreaking space in // this attribute. This value is specified at the time the group is created and // stored as an attribute of the group object in the identity store. DisplayName *string // A list of ExternalId objects that contains the identifiers issued to this // resource by an external identity provider. ExternalIds []ExternalId noSmithyDocumentSerde } // Contains the identifiers for a group, a group member, and a GroupMembership // object in the identity store. type GroupMembership struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The identifier for a group in the identity store. GroupId *string // An object that contains the identifier of a group member. Setting the UserID // field to the specific identifier for a user indicates that the user is a member // of the group. MemberId MemberId // The identifier for a GroupMembership object in an identity store. MembershipId *string noSmithyDocumentSerde } // Indicates whether a resource is a member of a group in the identity store. type GroupMembershipExistenceResult struct { // The identifier for a group in the identity store. GroupId *string // An object that contains the identifier of a group member. Setting the UserID // field to the specific identifier for a user indicates that the user is a member // of the group. MemberId MemberId // Indicates whether a membership relation exists or not. MembershipExists bool noSmithyDocumentSerde } // An object containing the identifier of a group member. // // The following types satisfy this interface: // // MemberIdMemberUserId type MemberId interface { isMemberId() } // An object containing the identifiers of resources that can be members. type MemberIdMemberUserId struct { Value string noSmithyDocumentSerde } func (*MemberIdMemberUserId) isMemberId() {} // The full name of the user. type Name struct { // The family name of the user. FamilyName *string // A string containing a formatted version of the name for display. Formatted *string // The given name of the user. GivenName *string // The honorific prefix of the user. For example, "Dr." HonorificPrefix *string // The honorific suffix of the user. For example, "M.D." HonorificSuffix *string // The middle name of the user. MiddleName *string noSmithyDocumentSerde } // The phone number associated with the user. type PhoneNumber struct { // A Boolean value representing whether this is the primary phone number for the // associated resource. Primary bool // A string representing the type of a phone number. For example, "Mobile." Type *string // A string containing a phone number. For example, "8675309" or "+1 (800) // 123-4567". Value *string noSmithyDocumentSerde } // An entity attribute that's unique to a specific entity. type UniqueAttribute struct { // A string representation of the path to a given attribute or sub-attribute. // Supports JMESPath. // // This member is required. AttributePath *string // The value of the attribute. This is a Document type. This type is not supported // by Java V1, Go V1, and older versions of the AWS CLI. // // This member is required. AttributeValue document.Interface noSmithyDocumentSerde } // A user object that contains the metadata and attributes for a specified user. type User struct { // The globally unique identifier for the identity store. // // This member is required. IdentityStoreId *string // The identifier for a user in the identity store. // // This member is required. UserId *string // A list of Address objects containing addresses associated with the user. Addresses []Address // A string containing the name of the user that is formatted for display when the // user is referenced. For example, "John Doe." DisplayName *string // A list of Email objects containing email addresses associated with the user. Emails []Email // A list of ExternalId objects that contains the identifiers issued to this // resource by an external identity provider. ExternalIds []ExternalId // A string containing the geographical region or location of the user. Locale *string // An object containing the name of the user. Name *Name // A string containing an alternate name for the user. NickName *string // A list of PhoneNumber objects containing phone numbers associated with the user. PhoneNumbers []PhoneNumber // A string containing the preferred language of the user. For example, "American // English" or "en-us." PreferredLanguage *string // A string containing a URL that might be associated with the user. ProfileUrl *string // A string containing the time zone of the user. Timezone *string // A string containing the title of the user. Possible values are left // unspecified. The value can vary based on your specific use case. Title *string // A unique string used to identify the user. The length limit is 128 characters. // This value can consist of letters, accented characters, symbols, numbers, and // punctuation. This value is specified at the time the user is created and stored // as an attribute of the user object in the identity store. UserName *string // A string indicating the type of user. Possible values are left unspecified. The // value can vary based on your specific use case. UserType *string noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde // UnknownUnionMember is returned when a union member is returned over the wire, // but has an unknown tag. type UnknownUnionMember struct { Tag string Value []byte noSmithyDocumentSerde } func (*UnknownUnionMember) isAlternateIdentifier() {} func (*UnknownUnionMember) isMemberId() {}
367
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types_test import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/identitystore/types" ) func ExampleAlternateIdentifier_outputUsage() { var union types.AlternateIdentifier // type switches can be used to check the union value switch v := union.(type) { case *types.AlternateIdentifierMemberExternalId: _ = v.Value // Value is types.ExternalId case *types.AlternateIdentifierMemberUniqueAttribute: _ = v.Value // Value is types.UniqueAttribute case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } } var _ *types.ExternalId var _ *types.UniqueAttribute func ExampleMemberId_outputUsage() { var union types.MemberId // type switches can be used to check the union value switch v := union.(type) { case *types.MemberIdMemberUserId: _ = v.Value // Value is string case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } } var _ *string
49
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "imagebuilder" const ServiceAPIVersion = "2019-12-02" // Client provides the API client to make operations call for EC2 Image Builder. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) resolveIdempotencyTokenProvider(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // Provides idempotency tokens values that will be automatically populated into // idempotent API operations. IdempotencyTokenProvider IdempotencyTokenProvider // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "imagebuilder", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return } o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
454
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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" ) // CancelImageCreation cancels the creation of Image. This operation can only be // used on images in a non-terminal state. func (c *Client) CancelImageCreation(ctx context.Context, params *CancelImageCreationInput, optFns ...func(*Options)) (*CancelImageCreationOutput, error) { if params == nil { params = &CancelImageCreationInput{} } result, metadata, err := c.invokeOperation(ctx, "CancelImageCreation", params, optFns, c.addOperationCancelImageCreationMiddlewares) if err != nil { return nil, err } out := result.(*CancelImageCreationOutput) out.ResultMetadata = metadata return out, nil } type CancelImageCreationInput struct { // Unique, case-sensitive identifier you provide to ensure idempotency of the // request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) // in the Amazon EC2 API Reference. // // This member is required. ClientToken *string // The Amazon Resource Name (ARN) of the image that you want to cancel creation // for. // // This member is required. ImageBuildVersionArn *string noSmithyDocumentSerde } type CancelImageCreationOutput struct { // The idempotency token that was used for this request. ClientToken *string // The ARN of the image whose creation this request canceled. ImageBuildVersionArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCancelImageCreationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelImageCreation{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelImageCreation{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCancelImageCreationMiddleware(stack, options); err != nil { return err } if err = addOpCancelImageCreationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelImageCreation(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 } return nil } type idempotencyToken_initializeOpCancelImageCreation struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCancelImageCreation) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCancelImageCreation) 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.(*CancelImageCreationInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CancelImageCreationInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCancelImageCreationMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCancelImageCreation{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCancelImageCreation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "CancelImageCreation", } }
176
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new component that can be used to build, validate, test, and assess // your image. The component is based on a YAML document that you specify using // exactly one of the following methods: // - Inline, using the data property in the request body. // - A URL that points to a YAML document file stored in Amazon S3, using the uri // property in the request body. func (c *Client) CreateComponent(ctx context.Context, params *CreateComponentInput, optFns ...func(*Options)) (*CreateComponentOutput, error) { if params == nil { params = &CreateComponentInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateComponent", params, optFns, c.addOperationCreateComponentMiddlewares) if err != nil { return nil, err } out := result.(*CreateComponentOutput) out.ResultMetadata = metadata return out, nil } type CreateComponentInput struct { // The idempotency token of the component. // // This member is required. ClientToken *string // The name of the component. // // This member is required. Name *string // The operating system platform of the component. // // This member is required. Platform types.Platform // The semantic version of the component. This version follows the semantic // version syntax. The semantic version has four nodes: ../. You can assign values // for the first three, and can filter on all of them. Assignment: For the first // three nodes you can assign any positive integer value, including zero, with an // upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically // assigns the build number to the fourth node. Patterns: You can use any numeric // pattern that adheres to the assignment requirements for the nodes that you can // assign. For example, you might choose a software version pattern, such as 1.0.0, // or a date, such as 2021.01.01. // // This member is required. SemanticVersion *string // The change description of the component. Describes what change has been made in // this version, or what makes this version different from other versions of this // component. ChangeDescription *string // Component data contains inline YAML document content for the component. // Alternatively, you can specify the uri of a YAML document file stored in Amazon // S3. However, you cannot specify both properties. Data *string // Describes the contents of the component. Description *string // The ID of the KMS key that is used to encrypt this component. KmsKeyId *string // The operating system (OS) version supported by the component. If the OS // information is available, a prefix match is performed against the base image OS // version during image recipe creation. SupportedOsVersions []string // The tags that apply to the component. Tags map[string]string // The uri of a YAML component document file. This must be an S3 URL ( // s3://bucket/key ), and the requester must have permission to access the S3 // bucket it points to. If you use Amazon S3, you can specify component content up // to your service quota. Alternatively, you can specify the YAML document inline, // using the component data property. You cannot specify both properties. Uri *string noSmithyDocumentSerde } type CreateComponentOutput struct { // The idempotency token used to make this request idempotent. ClientToken *string // The Amazon Resource Name (ARN) of the component that this request created. ComponentBuildVersionArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateComponent{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateComponent{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateComponentMiddleware(stack, options); err != nil { return err } if err = addOpCreateComponentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateComponent(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 } return nil } type idempotencyToken_initializeOpCreateComponent struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateComponent) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateComponent) 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.(*CreateComponentInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateComponentInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateComponentMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateComponent{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateComponent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "CreateComponent", } }
227
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new container recipe. Container recipes define how images are // configured, tested, and assessed. func (c *Client) CreateContainerRecipe(ctx context.Context, params *CreateContainerRecipeInput, optFns ...func(*Options)) (*CreateContainerRecipeOutput, error) { if params == nil { params = &CreateContainerRecipeInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateContainerRecipe", params, optFns, c.addOperationCreateContainerRecipeMiddlewares) if err != nil { return nil, err } out := result.(*CreateContainerRecipeOutput) out.ResultMetadata = metadata return out, nil } type CreateContainerRecipeInput struct { // The client token used to make this request idempotent. // // This member is required. ClientToken *string // Components for build and test that are included in the container recipe. // Recipes require a minimum of one build component, and can have a maximum of 20 // build and test components in any combination. // // This member is required. Components []types.ComponentConfiguration // The type of container to create. // // This member is required. ContainerType types.ContainerType // The name of the container recipe. // // This member is required. Name *string // The base image for the container recipe. // // This member is required. ParentImage *string // The semantic version of the container recipe. This version follows the semantic // version syntax. The semantic version has four nodes: ../. You can assign values // for the first three, and can filter on all of them. Assignment: For the first // three nodes you can assign any positive integer value, including zero, with an // upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically // assigns the build number to the fourth node. Patterns: You can use any numeric // pattern that adheres to the assignment requirements for the nodes that you can // assign. For example, you might choose a software version pattern, such as 1.0.0, // or a date, such as 2021.01.01. // // This member is required. SemanticVersion *string // The destination repository for the container image. // // This member is required. TargetRepository *types.TargetContainerRepository // The description of the container recipe. Description *string // The Dockerfile template used to build your image as an inline data blob. DockerfileTemplateData *string // The Amazon S3 URI for the Dockerfile that will be used to build your container // image. DockerfileTemplateUri *string // Specifies the operating system version for the base image. ImageOsVersionOverride *string // A group of options that can be used to configure an instance for building and // testing container images. InstanceConfiguration *types.InstanceConfiguration // Identifies which KMS key is used to encrypt the container image. KmsKeyId *string // Specifies the operating system platform when you use a custom base image. PlatformOverride types.Platform // Tags that are attached to the container recipe. Tags map[string]string // The working directory for use during build and test workflows. WorkingDirectory *string noSmithyDocumentSerde } type CreateContainerRecipeOutput struct { // The client token used to make this request idempotent. ClientToken *string // Returns the Amazon Resource Name (ARN) of the container recipe that the request // created. ContainerRecipeArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateContainerRecipeMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateContainerRecipe{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateContainerRecipe{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateContainerRecipeMiddleware(stack, options); err != nil { return err } if err = addOpCreateContainerRecipeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContainerRecipe(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 } return nil } type idempotencyToken_initializeOpCreateContainerRecipe struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateContainerRecipe) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateContainerRecipe) 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.(*CreateContainerRecipeInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateContainerRecipeInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateContainerRecipeMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateContainerRecipe{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateContainerRecipe(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "CreateContainerRecipe", } }
239
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new distribution configuration. Distribution configurations define // and configure the outputs of your pipeline. func (c *Client) CreateDistributionConfiguration(ctx context.Context, params *CreateDistributionConfigurationInput, optFns ...func(*Options)) (*CreateDistributionConfigurationOutput, error) { if params == nil { params = &CreateDistributionConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateDistributionConfiguration", params, optFns, c.addOperationCreateDistributionConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*CreateDistributionConfigurationOutput) out.ResultMetadata = metadata return out, nil } type CreateDistributionConfigurationInput struct { // The idempotency token of the distribution configuration. // // This member is required. ClientToken *string // The distributions of the distribution configuration. // // This member is required. Distributions []types.Distribution // The name of the distribution configuration. // // This member is required. Name *string // The description of the distribution configuration. Description *string // The tags of the distribution configuration. Tags map[string]string noSmithyDocumentSerde } type CreateDistributionConfigurationOutput struct { // The idempotency token used to make this request idempotent. ClientToken *string // The Amazon Resource Name (ARN) of the distribution configuration that was // created by this request. DistributionConfigurationArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateDistributionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateDistributionConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateDistributionConfiguration{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateDistributionConfigurationMiddleware(stack, options); err != nil { return err } if err = addOpCreateDistributionConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDistributionConfiguration(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 } return nil } type idempotencyToken_initializeOpCreateDistributionConfiguration struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateDistributionConfiguration) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateDistributionConfiguration) 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.(*CreateDistributionConfigurationInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateDistributionConfigurationInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateDistributionConfigurationMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateDistributionConfiguration{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateDistributionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "CreateDistributionConfiguration", } }
186
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new image. This request will create a new image along with all of the // configured output resources defined in the distribution configuration. You must // specify exactly one recipe for your image, using either a ContainerRecipeArn or // an ImageRecipeArn. func (c *Client) CreateImage(ctx context.Context, params *CreateImageInput, optFns ...func(*Options)) (*CreateImageOutput, error) { if params == nil { params = &CreateImageInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateImage", params, optFns, c.addOperationCreateImageMiddlewares) if err != nil { return nil, err } out := result.(*CreateImageOutput) out.ResultMetadata = metadata return out, nil } type CreateImageInput struct { // The idempotency token used to make this request idempotent. // // This member is required. ClientToken *string // The Amazon Resource Name (ARN) of the infrastructure configuration that defines // the environment in which your image will be built and tested. // // This member is required. InfrastructureConfigurationArn *string // The Amazon Resource Name (ARN) of the container recipe that defines how images // are configured and tested. ContainerRecipeArn *string // The Amazon Resource Name (ARN) of the distribution configuration that defines // and configures the outputs of your pipeline. DistributionConfigurationArn *string // Collects additional information about the image being created, including the // operating system (OS) version and package list. This information is used to // enhance the overall experience of using EC2 Image Builder. Enabled by default. EnhancedImageMetadataEnabled *bool // The Amazon Resource Name (ARN) of the image recipe that defines how images are // configured, tested, and assessed. ImageRecipeArn *string // Contains settings for vulnerability scans. ImageScanningConfiguration *types.ImageScanningConfiguration // The image tests configuration of the image. ImageTestsConfiguration *types.ImageTestsConfiguration // The tags of the image. Tags map[string]string noSmithyDocumentSerde } type CreateImageOutput struct { // The idempotency token used to make this request idempotent. ClientToken *string // The Amazon Resource Name (ARN) of the image that this request created. ImageBuildVersionArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateImageMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateImage{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateImage{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateImageMiddleware(stack, options); err != nil { return err } if err = addOpCreateImageValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateImage(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 } return nil } type idempotencyToken_initializeOpCreateImage struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateImage) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateImage) 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.(*CreateImageInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateImageInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateImageMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateImage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "CreateImage", } }
203
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new image pipeline. Image pipelines enable you to automate the // creation and distribution of images. func (c *Client) CreateImagePipeline(ctx context.Context, params *CreateImagePipelineInput, optFns ...func(*Options)) (*CreateImagePipelineOutput, error) { if params == nil { params = &CreateImagePipelineInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateImagePipeline", params, optFns, c.addOperationCreateImagePipelineMiddlewares) if err != nil { return nil, err } out := result.(*CreateImagePipelineOutput) out.ResultMetadata = metadata return out, nil } type CreateImagePipelineInput struct { // The idempotency token used to make this request idempotent. // // This member is required. ClientToken *string // The Amazon Resource Name (ARN) of the infrastructure configuration that will be // used to build images created by this image pipeline. // // This member is required. InfrastructureConfigurationArn *string // The name of the image pipeline. // // This member is required. Name *string // The Amazon Resource Name (ARN) of the container recipe that is used to // configure images created by this container pipeline. ContainerRecipeArn *string // The description of the image pipeline. Description *string // The Amazon Resource Name (ARN) of the distribution configuration that will be // used to configure and distribute images created by this image pipeline. DistributionConfigurationArn *string // Collects additional information about the image being created, including the // operating system (OS) version and package list. This information is used to // enhance the overall experience of using EC2 Image Builder. Enabled by default. EnhancedImageMetadataEnabled *bool // The Amazon Resource Name (ARN) of the image recipe that will be used to // configure images created by this image pipeline. ImageRecipeArn *string // Contains settings for vulnerability scans. ImageScanningConfiguration *types.ImageScanningConfiguration // The image test configuration of the image pipeline. ImageTestsConfiguration *types.ImageTestsConfiguration // The schedule of the image pipeline. Schedule *types.Schedule // The status of the image pipeline. Status types.PipelineStatus // The tags of the image pipeline. Tags map[string]string noSmithyDocumentSerde } type CreateImagePipelineOutput struct { // The idempotency token used to make this request idempotent. ClientToken *string // The Amazon Resource Name (ARN) of the image pipeline that was created by this // request. ImagePipelineArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateImagePipelineMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateImagePipeline{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateImagePipeline{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateImagePipelineMiddleware(stack, options); err != nil { return err } if err = addOpCreateImagePipelineValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateImagePipeline(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 } return nil } type idempotencyToken_initializeOpCreateImagePipeline struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateImagePipeline) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateImagePipeline) 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.(*CreateImagePipelineInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateImagePipelineInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateImagePipelineMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateImagePipeline{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateImagePipeline(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "CreateImagePipeline", } }
216
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new image recipe. Image recipes define how images are configured, // tested, and assessed. func (c *Client) CreateImageRecipe(ctx context.Context, params *CreateImageRecipeInput, optFns ...func(*Options)) (*CreateImageRecipeOutput, error) { if params == nil { params = &CreateImageRecipeInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateImageRecipe", params, optFns, c.addOperationCreateImageRecipeMiddlewares) if err != nil { return nil, err } out := result.(*CreateImageRecipeOutput) out.ResultMetadata = metadata return out, nil } type CreateImageRecipeInput struct { // The idempotency token used to make this request idempotent. // // This member is required. ClientToken *string // The components included in the image recipe. // // This member is required. Components []types.ComponentConfiguration // The name of the image recipe. // // This member is required. Name *string // The base image of the image recipe. The value of the string can be the ARN of // the base image or an AMI ID. The format for the ARN follows this example: // arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/x.x.x // . You can provide the specific version that you want to use, or you can use a // wildcard in all of the fields. If you enter an AMI ID for the string value, you // must have access to the AMI, and the AMI must be in the same Region in which you // are using Image Builder. // // This member is required. ParentImage *string // The semantic version of the image recipe. This version follows the semantic // version syntax. The semantic version has four nodes: ../. You can assign values // for the first three, and can filter on all of them. Assignment: For the first // three nodes you can assign any positive integer value, including zero, with an // upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically // assigns the build number to the fourth node. Patterns: You can use any numeric // pattern that adheres to the assignment requirements for the nodes that you can // assign. For example, you might choose a software version pattern, such as 1.0.0, // or a date, such as 2021.01.01. // // This member is required. SemanticVersion *string // Specify additional settings and launch scripts for your build instances. AdditionalInstanceConfiguration *types.AdditionalInstanceConfiguration // The block device mappings of the image recipe. BlockDeviceMappings []types.InstanceBlockDeviceMapping // The description of the image recipe. Description *string // The tags of the image recipe. Tags map[string]string // The working directory used during build and test workflows. WorkingDirectory *string noSmithyDocumentSerde } type CreateImageRecipeOutput struct { // The idempotency token used to make this request idempotent. ClientToken *string // The Amazon Resource Name (ARN) of the image recipe that was created by this // request. ImageRecipeArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateImageRecipeMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateImageRecipe{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateImageRecipe{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateImageRecipeMiddleware(stack, options); err != nil { return err } if err = addOpCreateImageRecipeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateImageRecipe(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 } return nil } type idempotencyToken_initializeOpCreateImageRecipe struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateImageRecipe) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateImageRecipe) 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.(*CreateImageRecipeInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateImageRecipeInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateImageRecipeMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateImageRecipe{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateImageRecipe(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "CreateImageRecipe", } }
219
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new infrastructure configuration. An infrastructure configuration // defines the environment in which your image will be built and tested. func (c *Client) CreateInfrastructureConfiguration(ctx context.Context, params *CreateInfrastructureConfigurationInput, optFns ...func(*Options)) (*CreateInfrastructureConfigurationOutput, error) { if params == nil { params = &CreateInfrastructureConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateInfrastructureConfiguration", params, optFns, c.addOperationCreateInfrastructureConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*CreateInfrastructureConfigurationOutput) out.ResultMetadata = metadata return out, nil } type CreateInfrastructureConfigurationInput struct { // The idempotency token used to make this request idempotent. // // This member is required. ClientToken *string // The instance profile to associate with the instance used to customize your // Amazon EC2 AMI. // // This member is required. InstanceProfileName *string // The name of the infrastructure configuration. // // This member is required. Name *string // The description of the infrastructure configuration. Description *string // The instance metadata options that you can set for the HTTP requests that // pipeline builds use to launch EC2 build and test instances. InstanceMetadataOptions *types.InstanceMetadataOptions // The instance types of the infrastructure configuration. You can specify one or // more instance types to use for this build. The service will pick one of these // instance types based on availability. InstanceTypes []string // The key pair of the infrastructure configuration. You can use this to log on to // and debug the instance used to create your image. KeyPair *string // The logging configuration of the infrastructure configuration. Logging *types.Logging // The tags attached to the resource created by Image Builder. ResourceTags map[string]string // The security group IDs to associate with the instance used to customize your // Amazon EC2 AMI. SecurityGroupIds []string // The Amazon Resource Name (ARN) for the SNS topic to which we send image build // event notifications. EC2 Image Builder is unable to send notifications to SNS // topics that are encrypted using keys from other accounts. The key that is used // to encrypt the SNS topic must reside in the account that the Image Builder // service runs under. SnsTopicArn *string // The subnet ID in which to place the instance used to customize your Amazon EC2 // AMI. SubnetId *string // The tags of the infrastructure configuration. Tags map[string]string // The terminate instance on failure setting of the infrastructure configuration. // Set to false if you want Image Builder to retain the instance used to configure // your AMI if the build or test phase of your workflow fails. TerminateInstanceOnFailure *bool noSmithyDocumentSerde } type CreateInfrastructureConfigurationOutput struct { // The idempotency token used to make this request idempotent. ClientToken *string // The Amazon Resource Name (ARN) of the infrastructure configuration that was // created by this request. InfrastructureConfigurationArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateInfrastructureConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateInfrastructureConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateInfrastructureConfiguration{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateInfrastructureConfigurationMiddleware(stack, options); err != nil { return err } if err = addOpCreateInfrastructureConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInfrastructureConfiguration(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 } return nil } type idempotencyToken_initializeOpCreateInfrastructureConfiguration struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateInfrastructureConfiguration) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateInfrastructureConfiguration) 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.(*CreateInfrastructureConfigurationInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateInfrastructureConfigurationInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateInfrastructureConfigurationMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateInfrastructureConfiguration{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateInfrastructureConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "CreateInfrastructureConfiguration", } }
226
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a component build version. func (c *Client) DeleteComponent(ctx context.Context, params *DeleteComponentInput, optFns ...func(*Options)) (*DeleteComponentOutput, error) { if params == nil { params = &DeleteComponentInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteComponent", params, optFns, c.addOperationDeleteComponentMiddlewares) if err != nil { return nil, err } out := result.(*DeleteComponentOutput) out.ResultMetadata = metadata return out, nil } type DeleteComponentInput struct { // The Amazon Resource Name (ARN) of the component build version to delete. // // This member is required. ComponentBuildVersionArn *string noSmithyDocumentSerde } type DeleteComponentOutput struct { // The ARN of the component build version that this request deleted. ComponentBuildVersionArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteComponent{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteComponent{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteComponentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteComponent(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 } return nil } func newServiceMetadataMiddleware_opDeleteComponent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "DeleteComponent", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a container recipe. func (c *Client) DeleteContainerRecipe(ctx context.Context, params *DeleteContainerRecipeInput, optFns ...func(*Options)) (*DeleteContainerRecipeOutput, error) { if params == nil { params = &DeleteContainerRecipeInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteContainerRecipe", params, optFns, c.addOperationDeleteContainerRecipeMiddlewares) if err != nil { return nil, err } out := result.(*DeleteContainerRecipeOutput) out.ResultMetadata = metadata return out, nil } type DeleteContainerRecipeInput struct { // The Amazon Resource Name (ARN) of the container recipe to delete. // // This member is required. ContainerRecipeArn *string noSmithyDocumentSerde } type DeleteContainerRecipeOutput struct { // The Amazon Resource Name (ARN) of the container recipe that was deleted. ContainerRecipeArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteContainerRecipeMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteContainerRecipe{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteContainerRecipe{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteContainerRecipeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteContainerRecipe(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 } return nil } func newServiceMetadataMiddleware_opDeleteContainerRecipe(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "DeleteContainerRecipe", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a distribution configuration. func (c *Client) DeleteDistributionConfiguration(ctx context.Context, params *DeleteDistributionConfigurationInput, optFns ...func(*Options)) (*DeleteDistributionConfigurationOutput, error) { if params == nil { params = &DeleteDistributionConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteDistributionConfiguration", params, optFns, c.addOperationDeleteDistributionConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DeleteDistributionConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DeleteDistributionConfigurationInput struct { // The Amazon Resource Name (ARN) of the distribution configuration to delete. // // This member is required. DistributionConfigurationArn *string noSmithyDocumentSerde } type DeleteDistributionConfigurationOutput struct { // The Amazon Resource Name (ARN) of the distribution configuration that was // deleted. DistributionConfigurationArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteDistributionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteDistributionConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteDistributionConfiguration{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteDistributionConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDistributionConfiguration(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 } return nil } func newServiceMetadataMiddleware_opDeleteDistributionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "DeleteDistributionConfiguration", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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 Image Builder image resource. This does not delete any EC2 AMIs or // ECR container images that are created during the image build process. You must // clean those up separately, using the appropriate Amazon EC2 or Amazon ECR // console actions, or API or CLI commands. // - To deregister an EC2 Linux AMI, see Deregister your Linux AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/deregister-ami.html) // in the Amazon EC2 User Guide . // - To deregister an EC2 Windows AMI, see Deregister your Windows AMI (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/deregister-ami.html) // in the Amazon EC2 Windows Guide . // - To delete a container image from Amazon ECR, see Deleting an image (https://docs.aws.amazon.com/AmazonECR/latest/userguide/delete_image.html) // in the Amazon ECR User Guide. func (c *Client) DeleteImage(ctx context.Context, params *DeleteImageInput, optFns ...func(*Options)) (*DeleteImageOutput, error) { if params == nil { params = &DeleteImageInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteImage", params, optFns, c.addOperationDeleteImageMiddlewares) if err != nil { return nil, err } out := result.(*DeleteImageOutput) out.ResultMetadata = metadata return out, nil } type DeleteImageInput struct { // The Amazon Resource Name (ARN) of the Image Builder image resource to delete. // // This member is required. ImageBuildVersionArn *string noSmithyDocumentSerde } type DeleteImageOutput struct { // The ARN of the Image Builder image resource that this request deleted. ImageBuildVersionArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteImageMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteImage{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteImage{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteImageValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteImage(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 } return nil } func newServiceMetadataMiddleware_opDeleteImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "DeleteImage", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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 image pipeline. func (c *Client) DeleteImagePipeline(ctx context.Context, params *DeleteImagePipelineInput, optFns ...func(*Options)) (*DeleteImagePipelineOutput, error) { if params == nil { params = &DeleteImagePipelineInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteImagePipeline", params, optFns, c.addOperationDeleteImagePipelineMiddlewares) if err != nil { return nil, err } out := result.(*DeleteImagePipelineOutput) out.ResultMetadata = metadata return out, nil } type DeleteImagePipelineInput struct { // The Amazon Resource Name (ARN) of the image pipeline to delete. // // This member is required. ImagePipelineArn *string noSmithyDocumentSerde } type DeleteImagePipelineOutput struct { // The Amazon Resource Name (ARN) of the image pipeline that was deleted. ImagePipelineArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteImagePipelineMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteImagePipeline{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteImagePipeline{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteImagePipelineValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteImagePipeline(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 } return nil } func newServiceMetadataMiddleware_opDeleteImagePipeline(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "DeleteImagePipeline", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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 image recipe. func (c *Client) DeleteImageRecipe(ctx context.Context, params *DeleteImageRecipeInput, optFns ...func(*Options)) (*DeleteImageRecipeOutput, error) { if params == nil { params = &DeleteImageRecipeInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteImageRecipe", params, optFns, c.addOperationDeleteImageRecipeMiddlewares) if err != nil { return nil, err } out := result.(*DeleteImageRecipeOutput) out.ResultMetadata = metadata return out, nil } type DeleteImageRecipeInput struct { // The Amazon Resource Name (ARN) of the image recipe to delete. // // This member is required. ImageRecipeArn *string noSmithyDocumentSerde } type DeleteImageRecipeOutput struct { // The Amazon Resource Name (ARN) of the image recipe that was deleted. ImageRecipeArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteImageRecipeMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteImageRecipe{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteImageRecipe{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteImageRecipeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteImageRecipe(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 } return nil } func newServiceMetadataMiddleware_opDeleteImageRecipe(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "DeleteImageRecipe", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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 infrastructure configuration. func (c *Client) DeleteInfrastructureConfiguration(ctx context.Context, params *DeleteInfrastructureConfigurationInput, optFns ...func(*Options)) (*DeleteInfrastructureConfigurationOutput, error) { if params == nil { params = &DeleteInfrastructureConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteInfrastructureConfiguration", params, optFns, c.addOperationDeleteInfrastructureConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DeleteInfrastructureConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DeleteInfrastructureConfigurationInput struct { // The Amazon Resource Name (ARN) of the infrastructure configuration to delete. // // This member is required. InfrastructureConfigurationArn *string noSmithyDocumentSerde } type DeleteInfrastructureConfigurationOutput struct { // The Amazon Resource Name (ARN) of the infrastructure configuration that was // deleted. InfrastructureConfigurationArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteInfrastructureConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteInfrastructureConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteInfrastructureConfiguration{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteInfrastructureConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInfrastructureConfiguration(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 } return nil } func newServiceMetadataMiddleware_opDeleteInfrastructureConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "DeleteInfrastructureConfiguration", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets a component object. func (c *Client) GetComponent(ctx context.Context, params *GetComponentInput, optFns ...func(*Options)) (*GetComponentOutput, error) { if params == nil { params = &GetComponentInput{} } result, metadata, err := c.invokeOperation(ctx, "GetComponent", params, optFns, c.addOperationGetComponentMiddlewares) if err != nil { return nil, err } out := result.(*GetComponentOutput) out.ResultMetadata = metadata return out, nil } type GetComponentInput struct { // The Amazon Resource Name (ARN) of the component that you want to get. Regex // requires the suffix /\d+$ . // // This member is required. ComponentBuildVersionArn *string noSmithyDocumentSerde } type GetComponentOutput struct { // The component object associated with the specified ARN. Component *types.Component // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetComponent{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetComponent{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetComponentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetComponent(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 } return nil } func newServiceMetadataMiddleware_opGetComponent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetComponent", } }
129
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets a component policy. func (c *Client) GetComponentPolicy(ctx context.Context, params *GetComponentPolicyInput, optFns ...func(*Options)) (*GetComponentPolicyOutput, error) { if params == nil { params = &GetComponentPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "GetComponentPolicy", params, optFns, c.addOperationGetComponentPolicyMiddlewares) if err != nil { return nil, err } out := result.(*GetComponentPolicyOutput) out.ResultMetadata = metadata return out, nil } type GetComponentPolicyInput struct { // The Amazon Resource Name (ARN) of the component whose policy you want to // retrieve. // // This member is required. ComponentArn *string noSmithyDocumentSerde } type GetComponentPolicyOutput struct { // The component policy. Policy *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetComponentPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetComponentPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetComponentPolicy{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetComponentPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetComponentPolicy(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 } return nil } func newServiceMetadataMiddleware_opGetComponentPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetComponentPolicy", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves a container recipe. func (c *Client) GetContainerRecipe(ctx context.Context, params *GetContainerRecipeInput, optFns ...func(*Options)) (*GetContainerRecipeOutput, error) { if params == nil { params = &GetContainerRecipeInput{} } result, metadata, err := c.invokeOperation(ctx, "GetContainerRecipe", params, optFns, c.addOperationGetContainerRecipeMiddlewares) if err != nil { return nil, err } out := result.(*GetContainerRecipeOutput) out.ResultMetadata = metadata return out, nil } type GetContainerRecipeInput struct { // The Amazon Resource Name (ARN) of the container recipe to retrieve. // // This member is required. ContainerRecipeArn *string noSmithyDocumentSerde } type GetContainerRecipeOutput struct { // The container recipe object that is returned. ContainerRecipe *types.ContainerRecipe // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetContainerRecipeMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetContainerRecipe{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetContainerRecipe{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetContainerRecipeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContainerRecipe(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 } return nil } func newServiceMetadataMiddleware_opGetContainerRecipe(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetContainerRecipe", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the policy for a container recipe. func (c *Client) GetContainerRecipePolicy(ctx context.Context, params *GetContainerRecipePolicyInput, optFns ...func(*Options)) (*GetContainerRecipePolicyOutput, error) { if params == nil { params = &GetContainerRecipePolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "GetContainerRecipePolicy", params, optFns, c.addOperationGetContainerRecipePolicyMiddlewares) if err != nil { return nil, err } out := result.(*GetContainerRecipePolicyOutput) out.ResultMetadata = metadata return out, nil } type GetContainerRecipePolicyInput struct { // The Amazon Resource Name (ARN) of the container recipe for the policy being // requested. // // This member is required. ContainerRecipeArn *string noSmithyDocumentSerde } type GetContainerRecipePolicyOutput struct { // The container recipe policy object that is returned. Policy *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetContainerRecipePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetContainerRecipePolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetContainerRecipePolicy{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetContainerRecipePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContainerRecipePolicy(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 } return nil } func newServiceMetadataMiddleware_opGetContainerRecipePolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetContainerRecipePolicy", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets a distribution configuration. func (c *Client) GetDistributionConfiguration(ctx context.Context, params *GetDistributionConfigurationInput, optFns ...func(*Options)) (*GetDistributionConfigurationOutput, error) { if params == nil { params = &GetDistributionConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "GetDistributionConfiguration", params, optFns, c.addOperationGetDistributionConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*GetDistributionConfigurationOutput) out.ResultMetadata = metadata return out, nil } type GetDistributionConfigurationInput struct { // The Amazon Resource Name (ARN) of the distribution configuration that you want // to retrieve. // // This member is required. DistributionConfigurationArn *string noSmithyDocumentSerde } type GetDistributionConfigurationOutput struct { // The distribution configuration object. DistributionConfiguration *types.DistributionConfiguration // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetDistributionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetDistributionConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetDistributionConfiguration{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetDistributionConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDistributionConfiguration(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 } return nil } func newServiceMetadataMiddleware_opGetDistributionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetDistributionConfiguration", } }
129
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets an image. func (c *Client) GetImage(ctx context.Context, params *GetImageInput, optFns ...func(*Options)) (*GetImageOutput, error) { if params == nil { params = &GetImageInput{} } result, metadata, err := c.invokeOperation(ctx, "GetImage", params, optFns, c.addOperationGetImageMiddlewares) if err != nil { return nil, err } out := result.(*GetImageOutput) out.ResultMetadata = metadata return out, nil } type GetImageInput struct { // The Amazon Resource Name (ARN) of the image that you want to get. // // This member is required. ImageBuildVersionArn *string noSmithyDocumentSerde } type GetImageOutput struct { // The image object. Image *types.Image // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetImageMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetImage{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetImage{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetImageValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImage(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 } return nil } func newServiceMetadataMiddleware_opGetImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetImage", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets an image pipeline. func (c *Client) GetImagePipeline(ctx context.Context, params *GetImagePipelineInput, optFns ...func(*Options)) (*GetImagePipelineOutput, error) { if params == nil { params = &GetImagePipelineInput{} } result, metadata, err := c.invokeOperation(ctx, "GetImagePipeline", params, optFns, c.addOperationGetImagePipelineMiddlewares) if err != nil { return nil, err } out := result.(*GetImagePipelineOutput) out.ResultMetadata = metadata return out, nil } type GetImagePipelineInput struct { // The Amazon Resource Name (ARN) of the image pipeline that you want to retrieve. // // This member is required. ImagePipelineArn *string noSmithyDocumentSerde } type GetImagePipelineOutput struct { // The image pipeline object. ImagePipeline *types.ImagePipeline // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetImagePipelineMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetImagePipeline{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetImagePipeline{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetImagePipelineValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImagePipeline(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 } return nil } func newServiceMetadataMiddleware_opGetImagePipeline(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetImagePipeline", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets an image policy. func (c *Client) GetImagePolicy(ctx context.Context, params *GetImagePolicyInput, optFns ...func(*Options)) (*GetImagePolicyOutput, error) { if params == nil { params = &GetImagePolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "GetImagePolicy", params, optFns, c.addOperationGetImagePolicyMiddlewares) if err != nil { return nil, err } out := result.(*GetImagePolicyOutput) out.ResultMetadata = metadata return out, nil } type GetImagePolicyInput struct { // The Amazon Resource Name (ARN) of the image whose policy you want to retrieve. // // This member is required. ImageArn *string noSmithyDocumentSerde } type GetImagePolicyOutput struct { // The image policy object. Policy *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetImagePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetImagePolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetImagePolicy{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetImagePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImagePolicy(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 } return nil } func newServiceMetadataMiddleware_opGetImagePolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetImagePolicy", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets an image recipe. func (c *Client) GetImageRecipe(ctx context.Context, params *GetImageRecipeInput, optFns ...func(*Options)) (*GetImageRecipeOutput, error) { if params == nil { params = &GetImageRecipeInput{} } result, metadata, err := c.invokeOperation(ctx, "GetImageRecipe", params, optFns, c.addOperationGetImageRecipeMiddlewares) if err != nil { return nil, err } out := result.(*GetImageRecipeOutput) out.ResultMetadata = metadata return out, nil } type GetImageRecipeInput struct { // The Amazon Resource Name (ARN) of the image recipe that you want to retrieve. // // This member is required. ImageRecipeArn *string noSmithyDocumentSerde } type GetImageRecipeOutput struct { // The image recipe object. ImageRecipe *types.ImageRecipe // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetImageRecipeMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetImageRecipe{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetImageRecipe{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetImageRecipeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImageRecipe(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 } return nil } func newServiceMetadataMiddleware_opGetImageRecipe(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetImageRecipe", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets an image recipe policy. func (c *Client) GetImageRecipePolicy(ctx context.Context, params *GetImageRecipePolicyInput, optFns ...func(*Options)) (*GetImageRecipePolicyOutput, error) { if params == nil { params = &GetImageRecipePolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "GetImageRecipePolicy", params, optFns, c.addOperationGetImageRecipePolicyMiddlewares) if err != nil { return nil, err } out := result.(*GetImageRecipePolicyOutput) out.ResultMetadata = metadata return out, nil } type GetImageRecipePolicyInput struct { // The Amazon Resource Name (ARN) of the image recipe whose policy you want to // retrieve. // // This member is required. ImageRecipeArn *string noSmithyDocumentSerde } type GetImageRecipePolicyOutput struct { // The image recipe policy object. Policy *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetImageRecipePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetImageRecipePolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetImageRecipePolicy{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetImageRecipePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImageRecipePolicy(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 } return nil } func newServiceMetadataMiddleware_opGetImageRecipePolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetImageRecipePolicy", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets an infrastructure configuration. func (c *Client) GetInfrastructureConfiguration(ctx context.Context, params *GetInfrastructureConfigurationInput, optFns ...func(*Options)) (*GetInfrastructureConfigurationOutput, error) { if params == nil { params = &GetInfrastructureConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "GetInfrastructureConfiguration", params, optFns, c.addOperationGetInfrastructureConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*GetInfrastructureConfigurationOutput) out.ResultMetadata = metadata return out, nil } // GetInfrastructureConfiguration request object. type GetInfrastructureConfigurationInput struct { // The Amazon Resource Name (ARN) of the infrastructure configuration that you // want to retrieve. // // This member is required. InfrastructureConfigurationArn *string noSmithyDocumentSerde } // GetInfrastructureConfiguration response object. type GetInfrastructureConfigurationOutput struct { // The infrastructure configuration object. InfrastructureConfiguration *types.InfrastructureConfiguration // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetInfrastructureConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetInfrastructureConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetInfrastructureConfiguration{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetInfrastructureConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInfrastructureConfiguration(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 } return nil } func newServiceMetadataMiddleware_opGetInfrastructureConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetInfrastructureConfiguration", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Get the runtime information that was logged for a specific runtime instance of // the workflow. func (c *Client) GetWorkflowExecution(ctx context.Context, params *GetWorkflowExecutionInput, optFns ...func(*Options)) (*GetWorkflowExecutionOutput, error) { if params == nil { params = &GetWorkflowExecutionInput{} } result, metadata, err := c.invokeOperation(ctx, "GetWorkflowExecution", params, optFns, c.addOperationGetWorkflowExecutionMiddlewares) if err != nil { return nil, err } out := result.(*GetWorkflowExecutionOutput) out.ResultMetadata = metadata return out, nil } type GetWorkflowExecutionInput struct { // Use the unique identifier for a runtime instance of the workflow to get runtime // details. // // This member is required. WorkflowExecutionId *string noSmithyDocumentSerde } type GetWorkflowExecutionOutput struct { // The timestamp when the specified runtime instance of the workflow finished. EndTime *string // The Amazon Resource Name (ARN) of the image resource build version that the // specified runtime instance of the workflow created. ImageBuildVersionArn *string // The output message from the specified runtime instance of the workflow, if // applicable. Message *string // The request ID that uniquely identifies this request. RequestId *string // The timestamp when the specified runtime instance of the workflow started. StartTime *string // The current runtime status for the specified runtime instance of the workflow. Status types.WorkflowExecutionStatus // The total number of steps in the specified runtime instance of the workflow // that ran. This number should equal the sum of the step counts for steps that // succeeded, were skipped, and failed. TotalStepCount int32 // A runtime count for the number of steps that failed in the specified runtime // instance of the workflow. TotalStepsFailed int32 // A runtime count for the number of steps that were skipped in the specified // runtime instance of the workflow. TotalStepsSkipped int32 // A runtime count for the number of steps that ran successfully in the specified // runtime instance of the workflow. TotalStepsSucceeded int32 // The type of workflow that Image Builder ran for the specified runtime instance // of the workflow. Type types.WorkflowType // The Amazon Resource Name (ARN) of the build version for the Image Builder // workflow resource that defines the specified runtime instance of the workflow. WorkflowBuildVersionArn *string // The unique identifier that Image Builder assigned to keep track of runtime // details when it ran the workflow. WorkflowExecutionId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetWorkflowExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetWorkflowExecution{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetWorkflowExecution{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetWorkflowExecutionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetWorkflowExecution(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 } return nil } func newServiceMetadataMiddleware_opGetWorkflowExecution(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetWorkflowExecution", } }
173
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" 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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Get the runtime information that was logged for a specific runtime instance of // the workflow step. func (c *Client) GetWorkflowStepExecution(ctx context.Context, params *GetWorkflowStepExecutionInput, optFns ...func(*Options)) (*GetWorkflowStepExecutionOutput, error) { if params == nil { params = &GetWorkflowStepExecutionInput{} } result, metadata, err := c.invokeOperation(ctx, "GetWorkflowStepExecution", params, optFns, c.addOperationGetWorkflowStepExecutionMiddlewares) if err != nil { return nil, err } out := result.(*GetWorkflowStepExecutionOutput) out.ResultMetadata = metadata return out, nil } type GetWorkflowStepExecutionInput struct { // Use the unique identifier for a specific runtime instance of the workflow step // to get runtime details for that step. // // This member is required. StepExecutionId *string noSmithyDocumentSerde } type GetWorkflowStepExecutionOutput struct { // The name of the action that the specified step performs. Action *string // Describes the specified workflow step. Description *string // The timestamp when the specified runtime instance of the workflow step finished. EndTime *string // The Amazon Resource Name (ARN) of the image resource build version that the // specified runtime instance of the workflow step creates. ImageBuildVersionArn *string // Input parameters that Image Builder provided for the specified runtime instance // of the workflow step. Inputs *string // The output message from the specified runtime instance of the workflow step, if // applicable. Message *string // The name of the specified runtime instance of the workflow step. Name *string // The action to perform if the workflow step fails. OnFailure *string // The file names that the specified runtime version of the workflow step created // as output. Outputs *string // The request ID that uniquely identifies this request. RequestId *string // Reports on the rollback status of the specified runtime version of the workflow // step, if applicable. RollbackStatus types.WorkflowStepExecutionRollbackStatus // The timestamp when the specified runtime version of the workflow step started. StartTime *string // The current status for the specified runtime version of the workflow step. Status types.WorkflowStepExecutionStatus // The unique identifier for the runtime version of the workflow step that you // specified in the request. StepExecutionId *string // The maximum duration in seconds for this step to complete its action. TimeoutSeconds *int32 // The Amazon Resource Name (ARN) of the build version for the Image Builder // workflow resource that defines this workflow step. WorkflowBuildVersionArn *string // The unique identifier that Image Builder assigned to keep track of runtime // details when it ran the workflow. WorkflowExecutionId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetWorkflowStepExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetWorkflowStepExecution{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetWorkflowStepExecution{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetWorkflowStepExecutionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetWorkflowStepExecution(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 } return nil } func newServiceMetadataMiddleware_opGetWorkflowStepExecution(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "GetWorkflowStepExecution", } }
183
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Imports a component and transforms its data into a component document. func (c *Client) ImportComponent(ctx context.Context, params *ImportComponentInput, optFns ...func(*Options)) (*ImportComponentOutput, error) { if params == nil { params = &ImportComponentInput{} } result, metadata, err := c.invokeOperation(ctx, "ImportComponent", params, optFns, c.addOperationImportComponentMiddlewares) if err != nil { return nil, err } out := result.(*ImportComponentOutput) out.ResultMetadata = metadata return out, nil } type ImportComponentInput struct { // The idempotency token of the component. // // This member is required. ClientToken *string // The format of the resource that you want to import as a component. // // This member is required. Format types.ComponentFormat // The name of the component. // // This member is required. Name *string // The platform of the component. // // This member is required. Platform types.Platform // The semantic version of the component. This version follows the semantic // version syntax. The semantic version has four nodes: ../. You can assign values // for the first three, and can filter on all of them. Filtering: With semantic // versioning, you have the flexibility to use wildcards (x) to specify the most // recent versions or nodes when selecting the base image or components for your // recipe. When you use a wildcard in any node, all nodes to the right of the first // wildcard must also be wildcards. // // This member is required. SemanticVersion *string // The type of the component denotes whether the component is used to build the // image, or only to test it. // // This member is required. Type types.ComponentType // The change description of the component. This description indicates the change // that has been made in this version, or what makes this version different from // other versions of this component. ChangeDescription *string // The data of the component. Used to specify the data inline. Either data or uri // can be used to specify the data within the component. Data *string // The description of the component. Describes the contents of the component. Description *string // The ID of the KMS key that should be used to encrypt this component. KmsKeyId *string // The tags of the component. Tags map[string]string // The uri of the component. Must be an Amazon S3 URL and the requester must have // permission to access the Amazon S3 bucket. If you use Amazon S3, you can specify // component content up to your service quota. Either data or uri can be used to // specify the data within the component. Uri *string noSmithyDocumentSerde } type ImportComponentOutput struct { // The idempotency token used to make this request idempotent. ClientToken *string // The Amazon Resource Name (ARN) of the imported component. ComponentBuildVersionArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationImportComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpImportComponent{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpImportComponent{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opImportComponentMiddleware(stack, options); err != nil { return err } if err = addOpImportComponentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportComponent(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 } return nil } type idempotencyToken_initializeOpImportComponent struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpImportComponent) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpImportComponent) 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.(*ImportComponentInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *ImportComponentInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opImportComponentMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpImportComponent{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opImportComponent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "ImportComponent", } }
224
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // When you export your virtual machine (VM) from its virtualization environment, // that process creates a set of one or more disk container files that act as // snapshots of your VM’s environment, settings, and data. The Amazon EC2 API // ImportImage (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportImage.html) // action uses those files to import your VM and create an AMI. To import using the // CLI command, see import-image (https://docs.aws.amazon.com/cli/latest/reference/ec2/import-image.html) // You can reference the task ID from the VM import to pull in the AMI that the // import created as the base image for your Image Builder recipe. func (c *Client) ImportVmImage(ctx context.Context, params *ImportVmImageInput, optFns ...func(*Options)) (*ImportVmImageOutput, error) { if params == nil { params = &ImportVmImageInput{} } result, metadata, err := c.invokeOperation(ctx, "ImportVmImage", params, optFns, c.addOperationImportVmImageMiddlewares) if err != nil { return nil, err } out := result.(*ImportVmImageOutput) out.ResultMetadata = metadata return out, nil } type ImportVmImageInput struct { // Unique, case-sensitive identifier you provide to ensure idempotency of the // request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) // in the Amazon EC2 API Reference. // // This member is required. ClientToken *string // The name of the base image that is created by the import process. // // This member is required. Name *string // The operating system platform for the imported VM. // // This member is required. Platform types.Platform // The semantic version to attach to the base image that was created during the // import process. This version follows the semantic version syntax. The semantic // version has four nodes: ../. You can assign values for the first three, and can // filter on all of them. Assignment: For the first three nodes you can assign any // positive integer value, including zero, with an upper limit of 2^30-1, or // 1073741823 for each node. Image Builder automatically assigns the build number // to the fourth node. Patterns: You can use any numeric pattern that adheres to // the assignment requirements for the nodes that you can assign. For example, you // might choose a software version pattern, such as 1.0.0, or a date, such as // 2021.01.01. // // This member is required. SemanticVersion *string // The importTaskId (API) or ImportTaskId (CLI) from the Amazon EC2 VM import // process. Image Builder retrieves information from the import process to pull in // the AMI that is created from the VM source as the base image for your recipe. // // This member is required. VmImportTaskId *string // The description for the base image that is created by the import process. Description *string // The operating system version for the imported VM. OsVersion *string // Tags that are attached to the import resources. Tags map[string]string noSmithyDocumentSerde } type ImportVmImageOutput struct { // The idempotency token that was used for this request. ClientToken *string // The Amazon Resource Name (ARN) of the AMI that was created during the VM import // process. This AMI is used as the base image for the recipe that imported the VM. ImageArn *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationImportVmImageMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpImportVmImage{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpImportVmImage{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opImportVmImageMiddleware(stack, options); err != nil { return err } if err = addOpImportVmImageValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportVmImage(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 } return nil } type idempotencyToken_initializeOpImportVmImage struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpImportVmImage) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpImportVmImage) 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.(*ImportVmImageInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *ImportVmImageInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opImportVmImageMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpImportVmImage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opImportVmImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "ImportVmImage", } }
218
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the list of component build versions for the specified semantic // version. The semantic version has four nodes: ../. You can assign values for the // first three, and can filter on all of them. Filtering: With semantic versioning, // you have the flexibility to use wildcards (x) to specify the most recent // versions or nodes when selecting the base image or components for your recipe. // When you use a wildcard in any node, all nodes to the right of the first // wildcard must also be wildcards. func (c *Client) ListComponentBuildVersions(ctx context.Context, params *ListComponentBuildVersionsInput, optFns ...func(*Options)) (*ListComponentBuildVersionsOutput, error) { if params == nil { params = &ListComponentBuildVersionsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListComponentBuildVersions", params, optFns, c.addOperationListComponentBuildVersionsMiddlewares) if err != nil { return nil, err } out := result.(*ListComponentBuildVersionsOutput) out.ResultMetadata = metadata return out, nil } type ListComponentBuildVersionsInput struct { // The component version Amazon Resource Name (ARN) whose versions you want to // list. // // This member is required. ComponentVersionArn *string // The maximum items to return in a request. MaxResults *int32 // A token to specify where to start paginating. This is the NextToken from a // previously truncated response. NextToken *string noSmithyDocumentSerde } type ListComponentBuildVersionsOutput struct { // The list of component summaries for the specified semantic version. ComponentSummaryList []types.ComponentSummary // The next token used for paginated responses. When this field isn't empty, there // are additional elements that the service has'ot included in this request. Use // this token with the next request to retrieve additional objects. NextToken *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListComponentBuildVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListComponentBuildVersions{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListComponentBuildVersions{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListComponentBuildVersionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComponentBuildVersions(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 } return nil } // ListComponentBuildVersionsAPIClient is a client that implements the // ListComponentBuildVersions operation. type ListComponentBuildVersionsAPIClient interface { ListComponentBuildVersions(context.Context, *ListComponentBuildVersionsInput, ...func(*Options)) (*ListComponentBuildVersionsOutput, error) } var _ ListComponentBuildVersionsAPIClient = (*Client)(nil) // ListComponentBuildVersionsPaginatorOptions is the paginator options for // ListComponentBuildVersions type ListComponentBuildVersionsPaginatorOptions struct { // The maximum items to return in a request. 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 } // ListComponentBuildVersionsPaginator is a paginator for // ListComponentBuildVersions type ListComponentBuildVersionsPaginator struct { options ListComponentBuildVersionsPaginatorOptions client ListComponentBuildVersionsAPIClient params *ListComponentBuildVersionsInput nextToken *string firstPage bool } // NewListComponentBuildVersionsPaginator returns a new // ListComponentBuildVersionsPaginator func NewListComponentBuildVersionsPaginator(client ListComponentBuildVersionsAPIClient, params *ListComponentBuildVersionsInput, optFns ...func(*ListComponentBuildVersionsPaginatorOptions)) *ListComponentBuildVersionsPaginator { if params == nil { params = &ListComponentBuildVersionsInput{} } options := ListComponentBuildVersionsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListComponentBuildVersionsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComponentBuildVersionsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComponentBuildVersions page. func (p *ListComponentBuildVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListComponentBuildVersionsOutput, 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.ListComponentBuildVersions(ctx, &params, 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_opListComponentBuildVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "ListComponentBuildVersions", } }
241
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the list of components that can be filtered by name, or by using the // listed filters to streamline results. Newly created components can take up to // two minutes to appear in the ListComponents API Results. The semantic version // has four nodes: ../. You can assign values for the first three, and can filter // on all of them. Filtering: With semantic versioning, you have the flexibility to // use wildcards (x) to specify the most recent versions or nodes when selecting // the base image or components for your recipe. When you use a wildcard in any // node, all nodes to the right of the first wildcard must also be wildcards. func (c *Client) ListComponents(ctx context.Context, params *ListComponentsInput, optFns ...func(*Options)) (*ListComponentsOutput, error) { if params == nil { params = &ListComponentsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListComponents", params, optFns, c.addOperationListComponentsMiddlewares) if err != nil { return nil, err } out := result.(*ListComponentsOutput) out.ResultMetadata = metadata return out, nil } type ListComponentsInput struct { // Returns the list of components for the specified name. ByName bool // Use the following filters to streamline results: // - description // - name // - platform // - supportedOsVersion // - type // - version Filters []types.Filter // The maximum items to return in a request. MaxResults *int32 // A token to specify where to start paginating. This is the NextToken from a // previously truncated response. NextToken *string // Filters results based on the type of owner for the component. By default, this // request returns a list of components that your account owns. To see results for // other types of owners, you can specify components that Amazon manages, third // party components, or components that other accounts have shared with you. Owner types.Ownership noSmithyDocumentSerde } type ListComponentsOutput struct { // The list of component semantic versions. The semantic version has four nodes: // ../. You can assign values for the first three, and can filter on all of them. ComponentVersionList []types.ComponentVersion // The next token used for paginated responses. When this field isn't empty, there // are additional elements that the service has'ot included in this request. Use // this token with the next request to retrieve additional objects. NextToken *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListComponents{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListComponents{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComponents(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 } return nil } // ListComponentsAPIClient is a client that implements the ListComponents // operation. type ListComponentsAPIClient interface { ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) } var _ ListComponentsAPIClient = (*Client)(nil) // ListComponentsPaginatorOptions is the paginator options for ListComponents type ListComponentsPaginatorOptions struct { // The maximum items to return in a request. 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 } // ListComponentsPaginator is a paginator for ListComponents type ListComponentsPaginator struct { options ListComponentsPaginatorOptions client ListComponentsAPIClient params *ListComponentsInput nextToken *string firstPage bool } // NewListComponentsPaginator returns a new ListComponentsPaginator func NewListComponentsPaginator(client ListComponentsAPIClient, params *ListComponentsInput, optFns ...func(*ListComponentsPaginatorOptions)) *ListComponentsPaginator { if params == nil { params = &ListComponentsInput{} } options := ListComponentsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListComponentsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComponentsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComponents page. func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListComponentsOutput, 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.ListComponents(ctx, &params, 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_opListComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "ListComponents", } }
249
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of container recipes. func (c *Client) ListContainerRecipes(ctx context.Context, params *ListContainerRecipesInput, optFns ...func(*Options)) (*ListContainerRecipesOutput, error) { if params == nil { params = &ListContainerRecipesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListContainerRecipes", params, optFns, c.addOperationListContainerRecipesMiddlewares) if err != nil { return nil, err } out := result.(*ListContainerRecipesOutput) out.ResultMetadata = metadata return out, nil } type ListContainerRecipesInput struct { // Use the following filters to streamline results: // - containerType // - name // - parentImage // - platform Filters []types.Filter // The maximum items to return in a request. MaxResults *int32 // A token to specify where to start paginating. This is the NextToken from a // previously truncated response. NextToken *string // Returns container recipes belonging to the specified owner, that have been // shared with you. You can omit this field to return container recipes belonging // to your account. Owner types.Ownership noSmithyDocumentSerde } type ListContainerRecipesOutput struct { // The list of container recipes returned for the request. ContainerRecipeSummaryList []types.ContainerRecipeSummary // The next token used for paginated responses. When this field isn't empty, there // are additional elements that the service has'ot included in this request. Use // this token with the next request to retrieve additional objects. NextToken *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListContainerRecipesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListContainerRecipes{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListContainerRecipes{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContainerRecipes(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 } return nil } // ListContainerRecipesAPIClient is a client that implements the // ListContainerRecipes operation. type ListContainerRecipesAPIClient interface { ListContainerRecipes(context.Context, *ListContainerRecipesInput, ...func(*Options)) (*ListContainerRecipesOutput, error) } var _ ListContainerRecipesAPIClient = (*Client)(nil) // ListContainerRecipesPaginatorOptions is the paginator options for // ListContainerRecipes type ListContainerRecipesPaginatorOptions struct { // The maximum items to return in a request. 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 } // ListContainerRecipesPaginator is a paginator for ListContainerRecipes type ListContainerRecipesPaginator struct { options ListContainerRecipesPaginatorOptions client ListContainerRecipesAPIClient params *ListContainerRecipesInput nextToken *string firstPage bool } // NewListContainerRecipesPaginator returns a new ListContainerRecipesPaginator func NewListContainerRecipesPaginator(client ListContainerRecipesAPIClient, params *ListContainerRecipesInput, optFns ...func(*ListContainerRecipesPaginatorOptions)) *ListContainerRecipesPaginator { if params == nil { params = &ListContainerRecipesInput{} } options := ListContainerRecipesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListContainerRecipesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContainerRecipesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContainerRecipes page. func (p *ListContainerRecipesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListContainerRecipesOutput, 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.ListContainerRecipes(ctx, &params, 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_opListContainerRecipes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "ListContainerRecipes", } }
236
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of distribution configurations. func (c *Client) ListDistributionConfigurations(ctx context.Context, params *ListDistributionConfigurationsInput, optFns ...func(*Options)) (*ListDistributionConfigurationsOutput, error) { if params == nil { params = &ListDistributionConfigurationsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListDistributionConfigurations", params, optFns, c.addOperationListDistributionConfigurationsMiddlewares) if err != nil { return nil, err } out := result.(*ListDistributionConfigurationsOutput) out.ResultMetadata = metadata return out, nil } type ListDistributionConfigurationsInput struct { // You can filter on name to streamline results. Filters []types.Filter // The maximum items to return in a request. MaxResults *int32 // A token to specify where to start paginating. This is the NextToken from a // previously truncated response. NextToken *string noSmithyDocumentSerde } type ListDistributionConfigurationsOutput struct { // The list of distributions. DistributionConfigurationSummaryList []types.DistributionConfigurationSummary // The next token used for paginated responses. When this field isn't empty, there // are additional elements that the service has'ot included in this request. Use // this token with the next request to retrieve additional objects. NextToken *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListDistributionConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListDistributionConfigurations{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDistributionConfigurations{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionConfigurations(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 } return nil } // ListDistributionConfigurationsAPIClient is a client that implements the // ListDistributionConfigurations operation. type ListDistributionConfigurationsAPIClient interface { ListDistributionConfigurations(context.Context, *ListDistributionConfigurationsInput, ...func(*Options)) (*ListDistributionConfigurationsOutput, error) } var _ ListDistributionConfigurationsAPIClient = (*Client)(nil) // ListDistributionConfigurationsPaginatorOptions is the paginator options for // ListDistributionConfigurations type ListDistributionConfigurationsPaginatorOptions struct { // The maximum items to return in a request. 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 } // ListDistributionConfigurationsPaginator is a paginator for // ListDistributionConfigurations type ListDistributionConfigurationsPaginator struct { options ListDistributionConfigurationsPaginatorOptions client ListDistributionConfigurationsAPIClient params *ListDistributionConfigurationsInput nextToken *string firstPage bool } // NewListDistributionConfigurationsPaginator returns a new // ListDistributionConfigurationsPaginator func NewListDistributionConfigurationsPaginator(client ListDistributionConfigurationsAPIClient, params *ListDistributionConfigurationsInput, optFns ...func(*ListDistributionConfigurationsPaginatorOptions)) *ListDistributionConfigurationsPaginator { if params == nil { params = &ListDistributionConfigurationsInput{} } options := ListDistributionConfigurationsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListDistributionConfigurationsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDistributionConfigurationsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDistributionConfigurations page. func (p *ListDistributionConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDistributionConfigurationsOutput, 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.ListDistributionConfigurations(ctx, &params, 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_opListDistributionConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "ListDistributionConfigurations", } }
229
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package imagebuilder import ( "context" "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/imagebuilder/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of image build versions. func (c *Client) ListImageBuildVersions(ctx context.Context, params *ListImageBuildVersionsInput, optFns ...func(*Options)) (*ListImageBuildVersionsOutput, error) { if params == nil { params = &ListImageBuildVersionsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListImageBuildVersions", params, optFns, c.addOperationListImageBuildVersionsMiddlewares) if err != nil { return nil, err } out := result.(*ListImageBuildVersionsOutput) out.ResultMetadata = metadata return out, nil } type ListImageBuildVersionsInput struct { // The Amazon Resource Name (ARN) of the image whose build versions you want to // retrieve. // // This member is required. ImageVersionArn *string // Use the following filters to streamline results: // - name // - osVersion // - platform // - type // - version Filters []types.Filter // The maximum items to return in a request. MaxResults *int32 // A token to specify where to start paginating. This is the NextToken from a // previously truncated response. NextToken *string noSmithyDocumentSerde } type ListImageBuildVersionsOutput struct { // The list of image build versions. ImageSummaryList []types.ImageSummary // The next token used for paginated responses. When this field isn't empty, there // are additional elements that the service has'ot included in this request. Use // this token with the next request to retrieve additional objects. NextToken *string // The request ID that uniquely identifies this request. RequestId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListImageBuildVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListImageBuildVersions{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListImageBuildVersions{}, middleware.After) if 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 = addHTTPSignerV4Middleware(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); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListImageBuildVersionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImageBuildVersions(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 } return nil } // ListImageBuildVersionsAPIClient is a client that implements the // ListImageBuildVersions operation. type ListImageBuildVersionsAPIClient interface { ListImageBuildVersions(context.Context, *ListImageBuildVersionsInput, ...func(*Options)) (*ListImageBuildVersionsOutput, error) } var _ ListImageBuildVersionsAPIClient = (*Client)(nil) // ListImageBuildVersionsPaginatorOptions is the paginator options for // ListImageBuildVersions type ListImageBuildVersionsPaginatorOptions struct { // The maximum items to return in a request. 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 } // ListImageBuildVersionsPaginator is a paginator for ListImageBuildVersions type ListImageBuildVersionsPaginator struct { options ListImageBuildVersionsPaginatorOptions client ListImageBuildVersionsAPIClient params *ListImageBuildVersionsInput nextToken *string firstPage bool } // NewListImageBuildVersionsPaginator returns a new ListImageBuildVersionsPaginator func NewListImageBuildVersionsPaginator(client ListImageBuildVersionsAPIClient, params *ListImageBuildVersionsInput, optFns ...func(*ListImageBuildVersionsPaginatorOptions)) *ListImageBuildVersionsPaginator { if params == nil { params = &ListImageBuildVersionsInput{} } options := ListImageBuildVersionsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListImageBuildVersionsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImageBuildVersionsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImageBuildVersions page. func (p *ListImageBuildVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListImageBuildVersionsOutput, 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.ListImageBuildVersions(ctx, &params, 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_opListImageBuildVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "imagebuilder", OperationName: "ListImageBuildVersions", } }
241