Struct aws_sdk_cognitoidentity::Client
source · pub struct Client { /* private fields */ }
Expand description
Client for Amazon Cognito Identity
Client for invoking operations on Amazon Cognito Identity. Each operation on Amazon Cognito Identity is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_cognitoidentity::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Config
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_cognitoidentity::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CreateIdentityPool
operation has
a Client::create_identity_pool
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.create_identity_pool()
.identity_pool_name("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn create_identity_pool(&self) -> CreateIdentityPoolFluentBuilder
pub fn create_identity_pool(&self) -> CreateIdentityPoolFluentBuilder
Constructs a fluent builder for the CreateIdentityPool
operation.
- The fluent builder is configurable:
identity_pool_name(impl Into<String>)
/set_identity_pool_name(Option<String>)
:
required: trueA string that you provide.
allow_unauthenticated_identities(bool)
/set_allow_unauthenticated_identities(Option<bool>)
:
required: trueTRUE if the identity pool supports unauthenticated logins.
allow_classic_flow(bool)
/set_allow_classic_flow(Option<bool>)
:
required: falseEnables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.
supported_login_providers(impl Into<String>, impl Into<String>)
/set_supported_login_providers(Option<HashMap::<String, String>>)
:
required: falseOptional key:value pairs mapping provider names to provider app IDs.
developer_provider_name(impl Into<String>)
/set_developer_provider_name(Option<String>)
:
required: falseThe “domain” by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the
DeveloperProviderName
, you can use letters as well as period (.
), underscore (_
), and dash (-
).Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.
open_id_connect_provider_arns(impl Into<String>)
/set_open_id_connect_provider_arns(Option<Vec::<String>>)
:
required: falseThe Amazon Resource Names (ARN) of the OpenID Connect providers.
cognito_identity_providers(CognitoIdentityProvider)
/set_cognito_identity_providers(Option<Vec::<CognitoIdentityProvider>>)
:
required: falseAn array of Amazon Cognito user pools and their client IDs.
saml_provider_arns(impl Into<String>)
/set_saml_provider_arns(Option<Vec::<String>>)
:
required: falseAn array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.
identity_pool_tags(impl Into<String>, impl Into<String>)
/set_identity_pool_tags(Option<HashMap::<String, String>>)
:
required: falseTags to assign 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.
- On success, responds with
CreateIdentityPoolOutput
with field(s):identity_pool_id(String)
:An identity pool ID in the format REGION:GUID.
identity_pool_name(String)
:A string that you provide.
allow_unauthenticated_identities(bool)
:TRUE if the identity pool supports unauthenticated logins.
allow_classic_flow(Option<bool>)
:Enables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.
supported_login_providers(Option<HashMap::<String, String>>)
:Optional key:value pairs mapping provider names to provider app IDs.
developer_provider_name(Option<String>)
:The “domain” by which Cognito will refer to your users.
open_id_connect_provider_arns(Option<Vec::<String>>)
:The ARNs of the OpenID Connect providers.
cognito_identity_providers(Option<Vec::<CognitoIdentityProvider>>)
:A list representing an Amazon Cognito user pool and its client ID.
saml_provider_arns(Option<Vec::<String>>)
:An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.
identity_pool_tags(Option<HashMap::<String, String>>)
: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.
- On failure, responds with
SdkError<CreateIdentityPoolError>
source§impl Client
impl Client
sourcepub fn delete_identities(&self) -> DeleteIdentitiesFluentBuilder
pub fn delete_identities(&self) -> DeleteIdentitiesFluentBuilder
Constructs a fluent builder for the DeleteIdentities
operation.
- The fluent builder is configurable:
identity_ids_to_delete(impl Into<String>)
/set_identity_ids_to_delete(Option<Vec::<String>>)
:
required: trueA list of 1-60 identities that you want to delete.
- On success, responds with
DeleteIdentitiesOutput
with field(s):unprocessed_identity_ids(Option<Vec::<UnprocessedIdentityId>>)
:An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.
- On failure, responds with
SdkError<DeleteIdentitiesError>
source§impl Client
impl Client
sourcepub fn delete_identity_pool(&self) -> DeleteIdentityPoolFluentBuilder
pub fn delete_identity_pool(&self) -> DeleteIdentityPoolFluentBuilder
Constructs a fluent builder for the DeleteIdentityPool
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
- On success, responds with
DeleteIdentityPoolOutput
- On failure, responds with
SdkError<DeleteIdentityPoolError>
source§impl Client
impl Client
sourcepub fn describe_identity(&self) -> DescribeIdentityFluentBuilder
pub fn describe_identity(&self) -> DescribeIdentityFluentBuilder
Constructs a fluent builder for the DescribeIdentity
operation.
- The fluent builder is configurable:
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
:
required: trueA unique identifier in the format REGION:GUID.
- On success, responds with
DescribeIdentityOutput
with field(s):identity_id(Option<String>)
:A unique identifier in the format REGION:GUID.
logins(Option<Vec::<String>>)
:The provider names.
creation_date(Option<DateTime>)
:Date on which the identity was created.
last_modified_date(Option<DateTime>)
:Date on which the identity was last modified.
- On failure, responds with
SdkError<DescribeIdentityError>
source§impl Client
impl Client
sourcepub fn describe_identity_pool(&self) -> DescribeIdentityPoolFluentBuilder
pub fn describe_identity_pool(&self) -> DescribeIdentityPoolFluentBuilder
Constructs a fluent builder for the DescribeIdentityPool
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
- On success, responds with
DescribeIdentityPoolOutput
with field(s):identity_pool_id(String)
:An identity pool ID in the format REGION:GUID.
identity_pool_name(String)
:A string that you provide.
allow_unauthenticated_identities(bool)
:TRUE if the identity pool supports unauthenticated logins.
allow_classic_flow(Option<bool>)
:Enables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.
supported_login_providers(Option<HashMap::<String, String>>)
:Optional key:value pairs mapping provider names to provider app IDs.
developer_provider_name(Option<String>)
:The “domain” by which Cognito will refer to your users.
open_id_connect_provider_arns(Option<Vec::<String>>)
:The ARNs of the OpenID Connect providers.
cognito_identity_providers(Option<Vec::<CognitoIdentityProvider>>)
:A list representing an Amazon Cognito user pool and its client ID.
saml_provider_arns(Option<Vec::<String>>)
:An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.
identity_pool_tags(Option<HashMap::<String, String>>)
: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.
- On failure, responds with
SdkError<DescribeIdentityPoolError>
source§impl Client
impl Client
sourcepub fn get_credentials_for_identity(
&self
) -> GetCredentialsForIdentityFluentBuilder
pub fn get_credentials_for_identity( &self ) -> GetCredentialsForIdentityFluentBuilder
Constructs a fluent builder for the GetCredentialsForIdentity
operation.
- The fluent builder is configurable:
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
:
required: trueA unique identifier in the format REGION:GUID.
logins(impl Into<String>, impl Into<String>)
/set_logins(Option<HashMap::<String, String>>)
:
required: falseA set of optional name-value pairs that map provider names to provider tokens. The name-value pair will follow the syntax “provider_name”: “provider_user_identifier”.
Logins should not be specified when trying to get credentials for an unauthenticated identity.
The Logins parameter is required when using identities associated with external identity providers such as Facebook. For examples of
Logins
maps, see the code examples in the External Identity Providers section of the Amazon Cognito Developer Guide.custom_role_arn(impl Into<String>)
/set_custom_role_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the role to be assumed when multiple roles were received in the token from the identity provider. For example, a SAML-based identity provider. This parameter is optional for identity providers that do not support role customization.
- On success, responds with
GetCredentialsForIdentityOutput
with field(s):identity_id(Option<String>)
:A unique identifier in the format REGION:GUID.
credentials(Option<Credentials>)
:Credentials for the provided identity ID.
- On failure, responds with
SdkError<GetCredentialsForIdentityError>
source§impl Client
impl Client
sourcepub fn get_id(&self) -> GetIdFluentBuilder
pub fn get_id(&self) -> GetIdFluentBuilder
Constructs a fluent builder for the GetId
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: falseA standard AWS account ID (9+ digits).
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
logins(impl Into<String>, impl Into<String>)
/set_logins(Option<HashMap::<String, String>>)
:
required: falseA set of optional name-value pairs that map provider names to provider tokens. The available provider names for
Logins
are as follows:-
Facebook:
graph.facebook.com
-
Amazon Cognito user pool:
cognito-idp.
, for example,.amazonaws.com/ <your_user_pool_id></your_user_pool_id> cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789
. -
Google:
accounts.google.com
-
Amazon:
www.amazon.com
-
Twitter:
api.twitter.com
-
Digits:
www.digits.com
-
- On success, responds with
GetIdOutput
with field(s):identity_id(Option<String>)
:A unique identifier in the format REGION:GUID.
- On failure, responds with
SdkError<GetIdError>
source§impl Client
impl Client
sourcepub fn get_identity_pool_roles(&self) -> GetIdentityPoolRolesFluentBuilder
pub fn get_identity_pool_roles(&self) -> GetIdentityPoolRolesFluentBuilder
Constructs a fluent builder for the GetIdentityPoolRoles
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
- On success, responds with
GetIdentityPoolRolesOutput
with field(s):identity_pool_id(Option<String>)
:An identity pool ID in the format REGION:GUID.
roles(Option<HashMap::<String, String>>)
:The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported.
role_mappings(Option<HashMap::<String, RoleMapping>>)
:How users for a specific identity provider are to mapped to roles. This is a String-to-
RoleMapping
object map. The string identifies the identity provider, for example, “graph.facebook.com” or “cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id”.
- On failure, responds with
SdkError<GetIdentityPoolRolesError>
source§impl Client
impl Client
sourcepub fn get_open_id_token(&self) -> GetOpenIdTokenFluentBuilder
pub fn get_open_id_token(&self) -> GetOpenIdTokenFluentBuilder
Constructs a fluent builder for the GetOpenIdToken
operation.
- The fluent builder is configurable:
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
:
required: trueA unique identifier in the format REGION:GUID.
logins(impl Into<String>, impl Into<String>)
/set_logins(Option<HashMap::<String, String>>)
:
required: falseA set of optional name-value pairs that map provider names to provider tokens. When using graph.facebook.com and www.amazon.com, supply the access_token returned from the provider’s authflow. For accounts.google.com, an Amazon Cognito user pool provider, or any other OpenID Connect provider, always include the
id_token
.
- On success, responds with
GetOpenIdTokenOutput
with field(s):identity_id(Option<String>)
:A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one passed on input.
token(Option<String>)
:An OpenID token, valid for 10 minutes.
- On failure, responds with
SdkError<GetOpenIdTokenError>
source§impl Client
impl Client
sourcepub fn get_open_id_token_for_developer_identity(
&self
) -> GetOpenIdTokenForDeveloperIdentityFluentBuilder
pub fn get_open_id_token_for_developer_identity( &self ) -> GetOpenIdTokenForDeveloperIdentityFluentBuilder
Constructs a fluent builder for the GetOpenIdTokenForDeveloperIdentity
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
:
required: falseA unique identifier in the format REGION:GUID.
logins(impl Into<String>, impl Into<String>)
/set_logins(Option<HashMap::<String, String>>)
:
required: trueA set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax
“developer_provider_name”: “developer_user_identifier”
. The developer provider is the “domain” by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.principal_tags(impl Into<String>, impl Into<String>)
/set_principal_tags(Option<HashMap::<String, String>>)
:
required: falseUse this operation to configure attribute mappings for custom providers.
token_duration(i64)
/set_token_duration(Option<i64>)
:
required: falseThe expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don’t provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token’s duration.
Please provide for a small grace period, usually no more than 5 minutes, to account for clock skew.
- On success, responds with
GetOpenIdTokenForDeveloperIdentityOutput
with field(s):identity_id(Option<String>)
:A unique identifier in the format REGION:GUID.
token(Option<String>)
:An OpenID token.
- On failure, responds with
SdkError<GetOpenIdTokenForDeveloperIdentityError>
source§impl Client
impl Client
sourcepub fn get_principal_tag_attribute_map(
&self
) -> GetPrincipalTagAttributeMapFluentBuilder
pub fn get_principal_tag_attribute_map( &self ) -> GetPrincipalTagAttributeMapFluentBuilder
Constructs a fluent builder for the GetPrincipalTagAttributeMap
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueYou can use this operation to get the ID of the Identity Pool you setup attribute mappings for.
identity_provider_name(impl Into<String>)
/set_identity_provider_name(Option<String>)
:
required: trueYou can use this operation to get the provider name.
- On success, responds with
GetPrincipalTagAttributeMapOutput
with field(s):identity_pool_id(Option<String>)
:You can use this operation to get the ID of the Identity Pool you setup attribute mappings for.
identity_provider_name(Option<String>)
:You can use this operation to get the provider name.
use_defaults(Option<bool>)
:You can use this operation to list
principal_tags(Option<HashMap::<String, String>>)
:You can use this operation to add principal tags. The
PrincipalTags
operation enables you to reference user attributes in your IAM permissions policy.
- On failure, responds with
SdkError<GetPrincipalTagAttributeMapError>
source§impl Client
impl Client
sourcepub fn list_identities(&self) -> ListIdentitiesFluentBuilder
pub fn list_identities(&self) -> ListIdentitiesFluentBuilder
Constructs a fluent builder for the ListIdentities
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
max_results(i32)
/set_max_results(Option<i32>)
:
required: trueThe maximum number of identities to return.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA pagination token.
hide_disabled(bool)
/set_hide_disabled(Option<bool>)
:
required: falseAn optional boolean parameter that allows you to hide disabled identities. If omitted, the ListIdentities API will include disabled identities in the response.
- On success, responds with
ListIdentitiesOutput
with field(s):identity_pool_id(Option<String>)
:An identity pool ID in the format REGION:GUID.
identities(Option<Vec::<IdentityDescription>>)
:An object containing a set of identities and associated mappings.
next_token(Option<String>)
:A pagination token.
- On failure, responds with
SdkError<ListIdentitiesError>
source§impl Client
impl Client
sourcepub fn list_identity_pools(&self) -> ListIdentityPoolsFluentBuilder
pub fn list_identity_pools(&self) -> ListIdentityPoolsFluentBuilder
Constructs a fluent builder for the ListIdentityPools
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: trueThe maximum number of identities to return.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA pagination token.
- On success, responds with
ListIdentityPoolsOutput
with field(s):identity_pools(Option<Vec::<IdentityPoolShortDescription>>)
:The identity pools returned by the ListIdentityPools action.
next_token(Option<String>)
:A pagination token.
- On failure, responds with
SdkError<ListIdentityPoolsError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the identity pool that the tags are assigned to.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:The tags that are assigned to the identity pool.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn lookup_developer_identity(&self) -> LookupDeveloperIdentityFluentBuilder
pub fn lookup_developer_identity(&self) -> LookupDeveloperIdentityFluentBuilder
Constructs a fluent builder for the LookupDeveloperIdentity
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
:
required: falseA unique identifier in the format REGION:GUID.
developer_user_identifier(impl Into<String>)
/set_developer_user_identifier(Option<String>)
:
required: falseA unique ID used by your backend authentication process to identify a user. Typically, a developer identity provider would issue many developer user identifiers, in keeping with the number of users.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of identities to return.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA pagination token. The first call you make will have
NextToken
set to null. After that the service will returnNextToken
values as needed. For example, let’s say you make a request withMaxResults
set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.
- On success, responds with
LookupDeveloperIdentityOutput
with field(s):identity_id(Option<String>)
:A unique identifier in the format REGION:GUID.
developer_user_identifier_list(Option<Vec::<String>>)
:This is the list of developer user identifiers associated with an identity ID. Cognito supports the association of multiple developer user identifiers with an identity ID.
next_token(Option<String>)
:A pagination token. The first call you make will have
NextToken
set to null. After that the service will returnNextToken
values as needed. For example, let’s say you make a request withMaxResults
set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.
- On failure, responds with
SdkError<LookupDeveloperIdentityError>
source§impl Client
impl Client
sourcepub fn merge_developer_identities(
&self
) -> MergeDeveloperIdentitiesFluentBuilder
pub fn merge_developer_identities( &self ) -> MergeDeveloperIdentitiesFluentBuilder
Constructs a fluent builder for the MergeDeveloperIdentities
operation.
- The fluent builder is configurable:
source_user_identifier(impl Into<String>)
/set_source_user_identifier(Option<String>)
:
required: trueUser identifier for the source user. The value should be a
DeveloperUserIdentifier
.destination_user_identifier(impl Into<String>)
/set_destination_user_identifier(Option<String>)
:
required: trueUser identifier for the destination user. The value should be a
DeveloperUserIdentifier
.developer_provider_name(impl Into<String>)
/set_developer_provider_name(Option<String>)
:
required: trueThe “domain” by which Cognito will refer to your users. This is a (pseudo) domain name that you provide while creating an identity pool. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the
DeveloperProviderName
, you can use letters as well as period (.), underscore (_), and dash (-).identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
- On success, responds with
MergeDeveloperIdentitiesOutput
with field(s):identity_id(Option<String>)
:A unique identifier in the format REGION:GUID.
- On failure, responds with
SdkError<MergeDeveloperIdentitiesError>
source§impl Client
impl Client
sourcepub fn set_identity_pool_roles(&self) -> SetIdentityPoolRolesFluentBuilder
pub fn set_identity_pool_roles(&self) -> SetIdentityPoolRolesFluentBuilder
Constructs a fluent builder for the SetIdentityPoolRoles
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
roles(impl Into<String>, impl Into<String>)
/set_roles(Option<HashMap::<String, String>>)
:
required: trueThe map of roles associated with this pool. For a given role, the key will be either “authenticated” or “unauthenticated” and the value will be the Role ARN.
role_mappings(impl Into<String>, RoleMapping)
/set_role_mappings(Option<HashMap::<String, RoleMapping>>)
:
required: falseHow users for a specific identity provider are to mapped to roles. This is a string to
RoleMapping
object map. The string identifies the identity provider, for example, “graph.facebook.com” or “cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id”.Up to 25 rules can be specified per identity provider.
- On success, responds with
SetIdentityPoolRolesOutput
- On failure, responds with
SdkError<SetIdentityPoolRolesError>
source§impl Client
impl Client
sourcepub fn set_principal_tag_attribute_map(
&self
) -> SetPrincipalTagAttributeMapFluentBuilder
pub fn set_principal_tag_attribute_map( &self ) -> SetPrincipalTagAttributeMapFluentBuilder
Constructs a fluent builder for the SetPrincipalTagAttributeMap
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueThe ID of the Identity Pool you want to set attribute mappings for.
identity_provider_name(impl Into<String>)
/set_identity_provider_name(Option<String>)
:
required: trueThe provider name you want to use for attribute mappings.
use_defaults(bool)
/set_use_defaults(Option<bool>)
:
required: falseYou can use this operation to use default (username and clientID) attribute mappings.
principal_tags(impl Into<String>, impl Into<String>)
/set_principal_tags(Option<HashMap::<String, String>>)
:
required: falseYou can use this operation to add principal tags.
- On success, responds with
SetPrincipalTagAttributeMapOutput
with field(s):identity_pool_id(Option<String>)
:The ID of the Identity Pool you want to set attribute mappings for.
identity_provider_name(Option<String>)
:The provider name you want to use for attribute mappings.
use_defaults(Option<bool>)
:You can use this operation to select default (username and clientID) attribute mappings.
principal_tags(Option<HashMap::<String, String>>)
:You can use this operation to add principal tags. The
PrincipalTags
operation enables you to reference user attributes in your IAM permissions policy.
- On failure, responds with
SdkError<SetPrincipalTagAttributeMapError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the identity pool.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueThe tags to assign to the identity pool.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn unlink_developer_identity(&self) -> UnlinkDeveloperIdentityFluentBuilder
pub fn unlink_developer_identity(&self) -> UnlinkDeveloperIdentityFluentBuilder
Constructs a fluent builder for the UnlinkDeveloperIdentity
operation.
- The fluent builder is configurable:
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
:
required: trueA unique identifier in the format REGION:GUID.
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
developer_provider_name(impl Into<String>)
/set_developer_provider_name(Option<String>)
:
required: trueThe “domain” by which Cognito will refer to your users.
developer_user_identifier(impl Into<String>)
/set_developer_user_identifier(Option<String>)
:
required: trueA unique ID used by your backend authentication process to identify a user.
- On success, responds with
UnlinkDeveloperIdentityOutput
- On failure, responds with
SdkError<UnlinkDeveloperIdentityError>
source§impl Client
impl Client
sourcepub fn unlink_identity(&self) -> UnlinkIdentityFluentBuilder
pub fn unlink_identity(&self) -> UnlinkIdentityFluentBuilder
Constructs a fluent builder for the UnlinkIdentity
operation.
- The fluent builder is configurable:
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
:
required: trueA unique identifier in the format REGION:GUID.
logins(impl Into<String>, impl Into<String>)
/set_logins(Option<HashMap::<String, String>>)
:
required: trueA set of optional name-value pairs that map provider names to provider tokens.
logins_to_remove(impl Into<String>)
/set_logins_to_remove(Option<Vec::<String>>)
:
required: trueProvider names to unlink from this identity.
- On success, responds with
UnlinkIdentityOutput
- On failure, responds with
SdkError<UnlinkIdentityError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the identity pool.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe keys of the tags to remove from the user pool.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_identity_pool(&self) -> UpdateIdentityPoolFluentBuilder
pub fn update_identity_pool(&self) -> UpdateIdentityPoolFluentBuilder
Constructs a fluent builder for the UpdateIdentityPool
operation.
- The fluent builder is configurable:
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: trueAn identity pool ID in the format REGION:GUID.
identity_pool_name(impl Into<String>)
/set_identity_pool_name(Option<String>)
:
required: trueA string that you provide.
allow_unauthenticated_identities(bool)
/set_allow_unauthenticated_identities(Option<bool>)
:
required: trueTRUE if the identity pool supports unauthenticated logins.
allow_classic_flow(bool)
/set_allow_classic_flow(Option<bool>)
:
required: falseEnables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.
supported_login_providers(impl Into<String>, impl Into<String>)
/set_supported_login_providers(Option<HashMap::<String, String>>)
:
required: falseOptional key:value pairs mapping provider names to provider app IDs.
developer_provider_name(impl Into<String>)
/set_developer_provider_name(Option<String>)
:
required: falseThe “domain” by which Cognito will refer to your users.
open_id_connect_provider_arns(impl Into<String>)
/set_open_id_connect_provider_arns(Option<Vec::<String>>)
:
required: falseThe ARNs of the OpenID Connect providers.
cognito_identity_providers(CognitoIdentityProvider)
/set_cognito_identity_providers(Option<Vec::<CognitoIdentityProvider>>)
:
required: falseA list representing an Amazon Cognito user pool and its client ID.
saml_provider_arns(impl Into<String>)
/set_saml_provider_arns(Option<Vec::<String>>)
:
required: falseAn array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.
identity_pool_tags(impl Into<String>, impl Into<String>)
/set_identity_pool_tags(Option<HashMap::<String, String>>)
:
required: falseThe 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.
- On success, responds with
UpdateIdentityPoolOutput
with field(s):identity_pool_id(String)
:An identity pool ID in the format REGION:GUID.
identity_pool_name(String)
:A string that you provide.
allow_unauthenticated_identities(bool)
:TRUE if the identity pool supports unauthenticated logins.
allow_classic_flow(Option<bool>)
:Enables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.
supported_login_providers(Option<HashMap::<String, String>>)
:Optional key:value pairs mapping provider names to provider app IDs.
developer_provider_name(Option<String>)
:The “domain” by which Cognito will refer to your users.
open_id_connect_provider_arns(Option<Vec::<String>>)
:The ARNs of the OpenID Connect providers.
cognito_identity_providers(Option<Vec::<CognitoIdentityProvider>>)
:A list representing an Amazon Cognito user pool and its client ID.
saml_provider_arns(Option<Vec::<String>>)
:An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.
identity_pool_tags(Option<HashMap::<String, String>>)
: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.
- On failure, responds with
SdkError<UpdateIdentityPoolError>
source§impl Client
impl Client
sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more