Skip to main content

user_pool_clients

Creates, updates, deletes or gets an user_pool_client resource or lists user_pool_clients in a region

Overview

Nameuser_pool_clients
TypeResource
DescriptionResource Type definition for AWS::Cognito::UserPoolClient
Idawscc.cognito.user_pool_clients

Fields

NameDatatypeDescription
client_namestring
explicit_auth_flowsarray
generate_secretboolean
read_attributesarray
auth_session_validityinteger
refresh_token_validityinteger
access_token_validityinteger
id_token_validityinteger
token_validity_unitsobject
refresh_token_rotationobject
user_pool_idstring
write_attributesarray
allowed_oauth_flowsarray
allowed_oauth_flows_user_pool_clientboolean
allowed_oauth_scopesarray
callback_urlsarray
default_redirect_uristring
logout_urlsarray
supported_identity_providersarray
analytics_configurationobject
prevent_user_existence_errorsstring
enable_token_revocationboolean
enable_propagate_additional_user_context_databoolean
namestring
client_secretstring
client_idstring
regionstringAWS region.

For more information, see AWS::Cognito::UserPoolClient.

Methods

NameResourceAccessible byRequired Params
create_resourceuser_pool_clientsINSERTUserPoolId, region
delete_resourceuser_pool_clientsDELETEIdentifier, region
update_resourceuser_pool_clientsUPDATEIdentifier, PatchDocument, region
list_resourcesuser_pool_clients_list_onlySELECTregion
get_resourceuser_pool_clientsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual user_pool_client.

SELECT
region,
client_name,
explicit_auth_flows,
generate_secret,
read_attributes,
auth_session_validity,
refresh_token_validity,
access_token_validity,
id_token_validity,
token_validity_units,
refresh_token_rotation,
user_pool_id,
write_attributes,
allowed_oauth_flows,
allowed_oauth_flows_user_pool_client,
allowed_oauth_scopes,
callback_urls,
default_redirect_uri,
logout_urls,
supported_identity_providers,
analytics_configuration,
prevent_user_existence_errors,
enable_token_revocation,
enable_propagate_additional_user_context_data,
name,
client_secret,
client_id
FROM awscc.cognito.user_pool_clients
WHERE
region = '{{ region }}' AND
Identifier = '{{ user_pool_id }}|{{ client_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new user_pool_client resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.cognito.user_pool_clients (
UserPoolId,
region
)
SELECT
'{{ user_pool_id }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a user_pool_client resource, using stack-deploy.

/*+ update */
UPDATE awscc.cognito.user_pool_clients
SET PatchDocument = string('{{ {
"ClientName": client_name,
"ExplicitAuthFlows": explicit_auth_flows,
"ReadAttributes": read_attributes,
"AuthSessionValidity": auth_session_validity,
"RefreshTokenValidity": refresh_token_validity,
"AccessTokenValidity": access_token_validity,
"IdTokenValidity": id_token_validity,
"TokenValidityUnits": token_validity_units,
"RefreshTokenRotation": refresh_token_rotation,
"WriteAttributes": write_attributes,
"AllowedOAuthFlows": allowed_oauth_flows,
"AllowedOAuthFlowsUserPoolClient": allowed_oauth_flows_user_pool_client,
"AllowedOAuthScopes": allowed_oauth_scopes,
"CallbackURLs": callback_urls,
"DefaultRedirectURI": default_redirect_uri,
"LogoutURLs": logout_urls,
"SupportedIdentityProviders": supported_identity_providers,
"AnalyticsConfiguration": analytics_configuration,
"PreventUserExistenceErrors": prevent_user_existence_errors,
"EnableTokenRevocation": enable_token_revocation,
"EnablePropagateAdditionalUserContextData": enable_propagate_additional_user_context_data
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ user_pool_id }}|{{ client_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.cognito.user_pool_clients
WHERE
Identifier = '{{ user_pool_id }}|{{ client_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the user_pool_clients resource, the following permissions are required:

cognito-idp:CreateUserPoolClient,
iam:PassRole,
iam:PutRolePolicy,
iam:CreateServiceLinkedRole