AWS::Cognito::UserPoolResourceServer
AWS::Cognito::UserPoolResourceServer
リソースは、新しい OAuth 2.0 リソースサーバーを作成してそのサーバーでカスタムスコープを定義します。
構文
AWS CloudFormation テンプレートでこのエンティティを宣言するには、次の構文を使用します。
JSON
{ "Type" : "AWS::Cognito::UserPoolResourceServer", "Properties" : { "Identifier" :
String
, "Name" :String
, "Scopes" :[ ResourceServerScopeType, ... ]
, "UserPoolId" :String
} }
YAML
Type: AWS::Cognito::UserPoolResourceServer Properties: Identifier:
String
Name:String
Scopes:- ResourceServerScopeType
UserPoolId:String
プロパティ
Identifier
-
リソースサーバーの一意のリソースサーバー識別子。これは、リソースサーバーが存在する HTTPS エンドポイントにすることもできます。例:
https://my-weather-api.example.com
。必須: はい
タイプ: 文字列
最小:
1
最大:
256
パターン:
[\x21\x23-\x5B\x5D-\x7E]+
Update requires: Replacement
Name
-
リソースサーバーのわかりやすい名前。
必須: はい
タイプ: 文字列
最小:
1
最大:
256
パターン:
[\w\s+=,.@-]+
Update requires: No interruption
Scopes
-
スコープ。各スコープはマップです。この場合、キーは
name
で、値はスコープのdescription
です。必須: いいえ
タイプ: ResourceServerScopeType のリスト
最大:
100
Update requires: No interruption
UserPoolId
-
ユーザープールのユーザープール ID。
必須: はい
タイプ: 文字列
最小:
1
最大:
55
パターン:
[\w-]+_[0-9a-zA-Z]+
Update requires: Replacement
戻り値
参照番号
このリソースの論理 ID を組み込みの Ref
関数に渡すと、Ref
は次を返します: physicalResourceId。リソースサーバー識別子「Identifier」です。次に例を示します。
{ "Ref": "yourResourceServerIdentifier" }
Amazon Cognito リソースサーバー yourResourceServerIdentifier
の場合、Ref はリソースサーバーの名前を返します。
For more information about using the Ref
function, see Ref.
例
ユーザープールの新しいリソースサーバーを作成する
次の例では、参照されるユーザープールに識別子「Identifier」を持つリソースサーバー「Name」を作成します。
JSON
{ "UserPoolResourceServer": { "Type": "AWS::Cognito::UserPoolResourceServer", "Properties": { "UserPoolId": { "Ref": "UserPool" }, "Identifier": "Identifier", "Name": "Name", "Scopes": [{ "ScopeName": "ScopeName1", "ScopeDescription": "description" }, { "ScopeName": "ScopeName2", "ScopeDescription": "description" }] } } }
YAML
UserPoolResourceServer: Type: AWS::Cognito::UserPoolResourceServer Properties: UserPoolId: !Ref UserPool Identifier: "Identifier" Name: "Name" Scopes: - ScopeName: "ScopeName1" ScopeDescription: "description" - ScopeName: "ScopeName2" ScopeDescription: "description"