View a markdown version of this page

UpdateClientMetadataURLState - Amazon Cognito User Pools

UpdateClientMetadataURLState

Changes the cache state of a client metadata document URL for a Client ID Metadata Document (CIMD) policy. Refresh a URL to make Amazon Cognito retrieve the client metadata document again, or invalidate it to remove the cached document.

Note

Amazon Cognito evaluates AWS Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.

Request Syntax

{ "Action": "string", "CIMDPolicyId": "string", "URL": "string", "UserPoolId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Action

The action to take on the cached client metadata document. Valid values are as follows:

  • REFRESH: Retrieve the document from the URL again.

  • INVALIDATE: Remove the cached document.

Type: String

Valid Values: REFRESH | INVALIDATE

Required: Yes

CIMDPolicyId

The ID of the CIMD policy that the URL belongs to.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-z0-9]+$

Required: Yes

URL

The client metadata document URL whose cache state you want to change.

Type: String

Length Constraints: Minimum length of 12. Maximum length of 256.

Pattern: ^https://[^\s]+$

Required: Yes

UserPoolId

The ID of the user pool that contains the CIMD policy.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+_[0-9a-zA-Z]+

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Error Types.

CachedCIMDURLDoesNotExistException

This exception is thrown when Amazon Cognito doesn't have a cached client metadata document for the URL in the request.

HTTP Status Code: 400

FeatureUnavailableInTierException

This exception is thrown when a feature that you attempted to use or configure isn't included in your user pool's current feature plan. This can occur when:

  • You configure a feature that your feature plan doesn't support.

  • You make a request that uses a feature that requires a higher feature plan.

To resolve this issue, upgrade your user pool to a feature plan that includes the feature.

HTTP Status Code: 400

InternalErrorException

This exception is thrown when Amazon Cognito encounters an internal error.

message

The message returned when Amazon Cognito throws an internal error exception.

HTTP Status Code: 500

InvalidParameterException

This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

message

The message returned when the Amazon Cognito service throws an invalid parameter exception.

reasonCode

The reason code of the exception.

HTTP Status Code: 400

NotAuthorizedException

This exception is thrown when a user isn't authorized.

message

The message returned when the Amazon Cognito service returns a not authorized exception.

HTTP Status Code: 400

OperationNotEnabledException

This exception is thrown when an operation is not available in the current region or for the current user pool configuration. This can occur when attempting to perform operations that are not supported in secondary replica regions.

HTTP Status Code: 400

ResourceNotFoundException

This exception is thrown when the Amazon Cognito service can't find the requested resource.

message

The message returned when the Amazon Cognito service returns a resource not found exception.

HTTP Status Code: 400

TooManyRequestsException

This exception is thrown when the user has made too many requests for a given operation.

message

The message returned when the Amazon Cognito service returns a too many requests exception.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: