View a markdown version of this page

AWS::Cognito::CIMDPolicy - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.

AWS::Cognito::CIMDPolicy

Creates a Client ID Metadata Document (CIMD) policy for an app client. With a CIMD policy, OAuth clients can identify themselves to your user pool with an HTTPS URL as their client ID. Amazon Cognito retrieves the client metadata document from that URL and accepts the client only when the URL matches one of the URL patterns in the policy.

Note

Amazon Cognito evaluates Amazon 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.

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Cognito::CIMDPolicy", "Properties" : { "CacheDuration" : Integer, "ClientId" : String, "PolicyName" : String, "URLPatterns" : [ String, ... ], "UserPoolId" : String } }

YAML

Type: AWS::Cognito::CIMDPolicy Properties: CacheDuration: Integer ClientId: String PolicyName: String URLPatterns: - String UserPoolId: String

Properties

CacheDuration

The length of time, in seconds, that Amazon Cognito caches a client metadata document when the document's Cache-Control header doesn't set a max-age between one day and one year. When the header sets a max-age in that range, Amazon Cognito uses the header value instead.

Required: No

Type: Integer

Minimum: 86400

Maximum: 31556952

Update requires: No interruption

ClientId

The ID of the app client that the CIMD policy is associated with. Amazon Cognito omits this value when the app client no longer exists.

Required: Yes

Type: String

Pattern: [\w+]+

Minimum: 1

Maximum: 128

Update requires: No interruption

PolicyName

The friendly name of the CIMD policy.

Required: Yes

Type: String

Pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}\p{Z}]+

Minimum: 1

Maximum: 32

Update requires: No interruption

URLPatterns

The HTTPS URL patterns that a client ID metadata document URL must match. Each pattern contains at most one * wildcard.

Required: Yes

Type: Array of String

Minimum: 1

Maximum: 5

Update requires: No interruption

UserPoolId

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

Required: Yes

Type: String

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

Minimum: 1

Maximum: 55

Update requires: Replacement

Return values

Ref

Fn::GetAtt

CIMDPolicyId

The ID of the CIMD policy.