aws_sdk_cognitoidentityprovider/client/
update_identity_provider.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`UpdateIdentityProvider`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`user_pool_id(impl Into<String>)`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::user_pool_id) / [`set_user_pool_id(Option<String>)`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::set_user_pool_id):<br>required: **true**<br><p>The Id of the user pool where you want to update your IdP.</p><br>
7    ///   - [`provider_name(impl Into<String>)`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::provider_name) / [`set_provider_name(Option<String>)`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::set_provider_name):<br>required: **true**<br><p>The name of the IdP that you want to update. You can pass the identity provider name in the <code>identity_provider</code> query parameter of requests to the <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html">Authorize endpoint</a> to silently redirect to sign-in with the associated IdP.</p><br>
8    ///   - [`provider_details(impl Into<String>, impl Into<String>)`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::provider_details) / [`set_provider_details(Option<HashMap::<String, String>>)`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::set_provider_details):<br>required: **false**<br><p>The scopes, URLs, and identifiers for your external identity provider. The following examples describe the provider detail keys for each IdP type. These values and their schema are subject to change. Social IdP <code>authorize_scopes</code> values must match the values listed here.</p> <dl>  <dt>   OpenID Connect (OIDC)  </dt>  <dd>   <p>Amazon Cognito accepts the following elements when it can't discover endpoint URLs from <code>oidc_issuer</code>: <code>attributes_url</code>, <code>authorize_url</code>, <code>jwks_uri</code>, <code>token_url</code>.</p>   <p>Create or update request: <code>"ProviderDetails": { "attributes_request_method": "GET", "attributes_url": "https://auth.example.com/userInfo", "authorize_scopes": "openid profile email", "authorize_url": "https://auth.example.com/authorize", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "jwks_uri": "https://auth.example.com/.well-known/jwks.json", "oidc_issuer": "https://auth.example.com", "token_url": "https://example.com/token" }</code></p>   <p>Describe response: <code>"ProviderDetails": { "attributes_request_method": "GET", "attributes_url": "https://auth.example.com/userInfo", "attributes_url_add_attributes": "false", "authorize_scopes": "openid profile email", "authorize_url": "https://auth.example.com/authorize", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "jwks_uri": "https://auth.example.com/.well-known/jwks.json", "oidc_issuer": "https://auth.example.com", "token_url": "https://example.com/token" }</code></p>  </dd>  <dt>   SAML  </dt>  <dd>   <p>Create or update request with Metadata URL: <code>"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }</code></p>   <p>Create or update request with Metadata file: <code>"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataFile": "\[metadata XML\]", "RequestSigningAlgorithm": "rsa-sha256" }</code></p>   <p>The value of <code>MetadataFile</code> must be the plaintext metadata document with all quote (") characters escaped by backslashes.</p>   <p>Describe response: <code>"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "ActiveEncryptionCertificate": "\[certificate\]", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256", "SLORedirectBindingURI": "https://auth.example.com/slo/saml", "SSORedirectBindingURI": "https://auth.example.com/sso/saml" }</code></p>  </dd>  <dt>   LoginWithAmazon  </dt>  <dd>   <p>Create or update request: <code>"ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"</code></p>   <p>Describe response: <code>"ProviderDetails": { "attributes_url": "https://api.amazon.com/user/profile", "attributes_url_add_attributes": "false", "authorize_scopes": "profile postal_code", "authorize_url": "https://www.amazon.com/ap/oa", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret", "token_request_method": "POST", "token_url": "https://api.amazon.com/auth/o2/token" }</code></p>  </dd>  <dt>   Google  </dt>  <dd>   <p>Create or update request: <code>"ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }</code></p>   <p>Describe response: <code>"ProviderDetails": { "attributes_url": "https://people.googleapis.com/v1/people/me?personFields=", "attributes_url_add_attributes": "true", "authorize_scopes": "email profile openid", "authorize_url": "https://accounts.google.com/o/oauth2/v2/auth", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret", "oidc_issuer": "https://accounts.google.com", "token_request_method": "POST", "token_url": "https://www.googleapis.com/oauth2/v4/token" }</code></p>  </dd>  <dt>   SignInWithApple  </dt>  <dd>   <p>Create or update request: <code>"ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE", "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }</code></p>   <p>Describe response: <code>"ProviderDetails": { "attributes_url_add_attributes": "false", "authorize_scopes": "email name", "authorize_url": "https://appleid.apple.com/auth/authorize", "client_id": "com.example.cognito", "key_id": "1EXAMPLE", "oidc_issuer": "https://appleid.apple.com", "team_id": "2EXAMPLE", "token_request_method": "POST", "token_url": "https://appleid.apple.com/auth/token" }</code></p>  </dd>  <dt>   Facebook  </dt>  <dd>   <p>Create or update request: <code>"ProviderDetails": { "api_version": "v17.0", "authorize_scopes": "public_profile, email", "client_id": "1example23456789", "client_secret": "provider-app-client-secret" }</code></p>   <p>Describe response: <code>"ProviderDetails": { "api_version": "v17.0", "attributes_url": "https://graph.facebook.com/v17.0/me?fields=", "attributes_url_add_attributes": "true", "authorize_scopes": "public_profile, email", "authorize_url": "https://www.facebook.com/v17.0/dialog/oauth", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "token_request_method": "GET", "token_url": "https://graph.facebook.com/v17.0/oauth/access_token" }</code></p>  </dd> </dl><br>
9    ///   - [`attribute_mapping(impl Into<String>, impl Into<String>)`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::attribute_mapping) / [`set_attribute_mapping(Option<HashMap::<String, String>>)`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::set_attribute_mapping):<br>required: **false**<br><p>A mapping of IdP attributes to standard and custom user pool attributes. Specify a user pool attribute as the key of the key-value pair, and the IdP attribute claim name as the value.</p><br>
10    ///   - [`idp_identifiers(impl Into<String>)`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::idp_identifiers) / [`set_idp_identifiers(Option<Vec::<String>>)`](crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::set_idp_identifiers):<br>required: **false**<br><p>An array of IdP identifiers, for example <code>"IdPIdentifiers": \[ "MyIdP", "MyIdP2" \]</code>. Identifiers are friendly names that you can pass in the <code>idp_identifier</code> query parameter of requests to the <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html">Authorize endpoint</a> to silently redirect to sign-in with the associated IdP. Identifiers in a domain format also enable the use of <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managing-saml-idp-naming.html">email-address matching with SAML providers</a>.</p><br>
11    /// - On success, responds with [`UpdateIdentityProviderOutput`](crate::operation::update_identity_provider::UpdateIdentityProviderOutput) with field(s):
12    ///   - [`identity_provider(Option<IdentityProviderType>)`](crate::operation::update_identity_provider::UpdateIdentityProviderOutput::identity_provider): <p>The identity provider details.</p>
13    /// - On failure, responds with [`SdkError<UpdateIdentityProviderError>`](crate::operation::update_identity_provider::UpdateIdentityProviderError)
14    pub fn update_identity_provider(&self) -> crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder {
15        crate::operation::update_identity_provider::builders::UpdateIdentityProviderFluentBuilder::new(self.handle.clone())
16    }
17}