1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package cognitoidentity 4 5import ( 6 "context" 7 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 8 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 9 "github.com/aws/aws-sdk-go-v2/service/cognitoidentity/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Updates an identity pool. You must use AWS Developer credentials to call this 15// API. 16func (c *Client) UpdateIdentityPool(ctx context.Context, params *UpdateIdentityPoolInput, optFns ...func(*Options)) (*UpdateIdentityPoolOutput, error) { 17 if params == nil { 18 params = &UpdateIdentityPoolInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "UpdateIdentityPool", params, optFns, addOperationUpdateIdentityPoolMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*UpdateIdentityPoolOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29} 30 31// An object representing an Amazon Cognito identity pool. 32type UpdateIdentityPoolInput struct { 33 34 // TRUE if the identity pool supports unauthenticated logins. 35 // 36 // This member is required. 37 AllowUnauthenticatedIdentities bool 38 39 // An identity pool ID in the format REGION:GUID. 40 // 41 // This member is required. 42 IdentityPoolId *string 43 44 // A string that you provide. 45 // 46 // This member is required. 47 IdentityPoolName *string 48 49 // Enables or disables the Basic (Classic) authentication flow. For more 50 // information, see Identity Pools (Federated Identities) Authentication Flow 51 // (https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html) 52 // in the Amazon Cognito Developer Guide. 53 AllowClassicFlow *bool 54 55 // A list representing an Amazon Cognito user pool and its client ID. 56 CognitoIdentityProviders []types.CognitoIdentityProvider 57 58 // The "domain" by which Cognito will refer to your users. 59 DeveloperProviderName *string 60 61 // The tags that are assigned to the identity pool. A tag is a label that you can 62 // apply to identity pools to categorize and manage them in different ways, such as 63 // by purpose, owner, environment, or other criteria. 64 IdentityPoolTags map[string]string 65 66 // A list of OpendID Connect provider ARNs. 67 OpenIdConnectProviderARNs []string 68 69 // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity 70 // pool. 71 SamlProviderARNs []string 72 73 // Optional key:value pairs mapping provider names to provider app IDs. 74 SupportedLoginProviders map[string]string 75} 76 77// An object representing an Amazon Cognito identity pool. 78type UpdateIdentityPoolOutput struct { 79 80 // TRUE if the identity pool supports unauthenticated logins. 81 // 82 // This member is required. 83 AllowUnauthenticatedIdentities bool 84 85 // An identity pool ID in the format REGION:GUID. 86 // 87 // This member is required. 88 IdentityPoolId *string 89 90 // A string that you provide. 91 // 92 // This member is required. 93 IdentityPoolName *string 94 95 // Enables or disables the Basic (Classic) authentication flow. For more 96 // information, see Identity Pools (Federated Identities) Authentication Flow 97 // (https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html) 98 // in the Amazon Cognito Developer Guide. 99 AllowClassicFlow *bool 100 101 // A list representing an Amazon Cognito user pool and its client ID. 102 CognitoIdentityProviders []types.CognitoIdentityProvider 103 104 // The "domain" by which Cognito will refer to your users. 105 DeveloperProviderName *string 106 107 // The tags that are assigned to the identity pool. A tag is a label that you can 108 // apply to identity pools to categorize and manage them in different ways, such as 109 // by purpose, owner, environment, or other criteria. 110 IdentityPoolTags map[string]string 111 112 // A list of OpendID Connect provider ARNs. 113 OpenIdConnectProviderARNs []string 114 115 // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity 116 // pool. 117 SamlProviderARNs []string 118 119 // Optional key:value pairs mapping provider names to provider app IDs. 120 SupportedLoginProviders map[string]string 121 122 // Metadata pertaining to the operation's result. 123 ResultMetadata middleware.Metadata 124} 125 126func addOperationUpdateIdentityPoolMiddlewares(stack *middleware.Stack, options Options) (err error) { 127 err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateIdentityPool{}, middleware.After) 128 if err != nil { 129 return err 130 } 131 err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateIdentityPool{}, middleware.After) 132 if err != nil { 133 return err 134 } 135 if err = addSetLoggerMiddleware(stack, options); err != nil { 136 return err 137 } 138 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 139 return err 140 } 141 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 142 return err 143 } 144 if err = addResolveEndpointMiddleware(stack, options); err != nil { 145 return err 146 } 147 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 148 return err 149 } 150 if err = addRetryMiddlewares(stack, options); err != nil { 151 return err 152 } 153 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 154 return err 155 } 156 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 157 return err 158 } 159 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 160 return err 161 } 162 if err = addClientUserAgent(stack); err != nil { 163 return err 164 } 165 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 166 return err 167 } 168 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 169 return err 170 } 171 if err = addOpUpdateIdentityPoolValidationMiddleware(stack); err != nil { 172 return err 173 } 174 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateIdentityPool(options.Region), middleware.Before); err != nil { 175 return err 176 } 177 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 178 return err 179 } 180 if err = addResponseErrorMiddleware(stack); err != nil { 181 return err 182 } 183 if err = addRequestResponseLogging(stack, options); err != nil { 184 return err 185 } 186 return nil 187} 188 189func newServiceMetadataMiddleware_opUpdateIdentityPool(region string) *awsmiddleware.RegisterServiceMetadata { 190 return &awsmiddleware.RegisterServiceMetadata{ 191 Region: region, 192 ServiceID: ServiceID, 193 SigningName: "cognito-identity", 194 OperationName: "UpdateIdentityPool", 195 } 196} 197