updateIdentityPool method
- required bool allowUnauthenticatedIdentities,
- required String identityPoolId,
- required String identityPoolName,
- bool? allowClassicFlow,
- List<
CognitoIdentityProvider> ? cognitoIdentityProviders, - String? developerProviderName,
- Map<
String, String> ? identityPoolTags, - List<
String> ? openIdConnectProviderARNs, - List<
String> ? samlProviderARNs, - Map<
String, String> ? supportedLoginProviders,
Updates an identity pool.
You must use AWS Developer credentials to call this API.
May throw InvalidParameterException. May throw ResourceNotFoundException. May throw NotAuthorizedException. May throw ResourceConflictException. May throw TooManyRequestsException. May throw InternalErrorException. May throw ConcurrentModificationException. May throw LimitExceededException.
Parameter allowUnauthenticatedIdentities
:
TRUE if the identity pool supports unauthenticated logins.
Parameter identityPoolId
:
An identity pool ID in the format REGION:GUID.
Parameter identityPoolName
:
A string that you provide.
Parameter allowClassicFlow
:
Enables or disables the Basic (Classic) authentication flow. For more
information, see Identity
Pools (Federated Identities) Authentication Flow in the Amazon
Cognito Developer Guide.
Parameter cognitoIdentityProviders
:
A list representing an Amazon Cognito user pool and its client ID.
Parameter developerProviderName
:
The "domain" by which Cognito will refer to your users.
Parameter identityPoolTags
:
The tags that are assigned to the identity pool. A tag is a label that you
can apply to identity pools to categorize and manage them in different
ways, such as by purpose, owner, environment, or other criteria.
Parameter openIdConnectProviderARNs
:
A list of OpendID Connect provider ARNs.
Parameter samlProviderARNs
:
An array of Amazon Resource Names (ARNs) of the SAML provider for your
identity pool.
Parameter supportedLoginProviders
:
Optional key:value pairs mapping provider names to provider app IDs.
Implementation
Future<IdentityPool> updateIdentityPool({
required bool allowUnauthenticatedIdentities,
required String identityPoolId,
required String identityPoolName,
bool? allowClassicFlow,
List<CognitoIdentityProvider>? cognitoIdentityProviders,
String? developerProviderName,
Map<String, String>? identityPoolTags,
List<String>? openIdConnectProviderARNs,
List<String>? samlProviderARNs,
Map<String, String>? supportedLoginProviders,
}) async {
ArgumentError.checkNotNull(
allowUnauthenticatedIdentities, 'allowUnauthenticatedIdentities');
ArgumentError.checkNotNull(identityPoolId, 'identityPoolId');
_s.validateStringLength(
'identityPoolId',
identityPoolId,
1,
55,
isRequired: true,
);
ArgumentError.checkNotNull(identityPoolName, 'identityPoolName');
_s.validateStringLength(
'identityPoolName',
identityPoolName,
1,
128,
isRequired: true,
);
_s.validateStringLength(
'developerProviderName',
developerProviderName,
1,
128,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCognitoIdentityService.UpdateIdentityPool'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AllowUnauthenticatedIdentities': allowUnauthenticatedIdentities,
'IdentityPoolId': identityPoolId,
'IdentityPoolName': identityPoolName,
if (allowClassicFlow != null) 'AllowClassicFlow': allowClassicFlow,
if (cognitoIdentityProviders != null)
'CognitoIdentityProviders': cognitoIdentityProviders,
if (developerProviderName != null)
'DeveloperProviderName': developerProviderName,
if (identityPoolTags != null) 'IdentityPoolTags': identityPoolTags,
if (openIdConnectProviderARNs != null)
'OpenIdConnectProviderARNs': openIdConnectProviderARNs,
if (samlProviderARNs != null) 'SamlProviderARNs': samlProviderARNs,
if (supportedLoginProviders != null)
'SupportedLoginProviders': supportedLoginProviders,
},
);
return IdentityPool.fromJson(jsonResponse.body);
}