aws-cdk-lib 2.164.1__py3-none-any.whl → 2.165.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aws-cdk-lib might be problematic. Click here for more details.
- aws_cdk/__init__.py +20 -0
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.164.1.jsii.tgz → aws-cdk-lib@2.165.0.jsii.tgz} +0 -0
- aws_cdk/aws_appsync/__init__.py +24 -18
- aws_cdk/aws_autoscaling/__init__.py +145 -8
- aws_cdk/aws_backup/__init__.py +598 -0
- aws_cdk/aws_bedrock/__init__.py +8 -8
- aws_cdk/aws_codebuild/__init__.py +88 -33
- aws_cdk/aws_cognito/__init__.py +657 -95
- aws_cdk/aws_ec2/__init__.py +122 -32
- aws_cdk/aws_eks/__init__.py +10 -12
- aws_cdk/aws_elasticache/__init__.py +47 -6
- aws_cdk/aws_imagebuilder/__init__.py +183 -0
- aws_cdk/aws_iot/__init__.py +37 -43
- aws_cdk/aws_iotwireless/__init__.py +2 -2
- aws_cdk/aws_memorydb/__init__.py +41 -0
- aws_cdk/aws_qbusiness/__init__.py +21 -14
- aws_cdk/aws_rds/__init__.py +122 -32
- aws_cdk/aws_redshift/__init__.py +23 -23
- aws_cdk/aws_refactorspaces/__init__.py +56 -61
- aws_cdk/aws_resiliencehub/__init__.py +4 -4
- aws_cdk/aws_route53/__init__.py +3 -1
- aws_cdk/aws_sagemaker/__init__.py +69 -0
- aws_cdk/aws_sqs/__init__.py +9 -12
- {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.165.0.dist-info}/METADATA +6 -6
- {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.165.0.dist-info}/RECORD +30 -30
- {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.165.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.165.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.165.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.164.1.dist-info → aws_cdk_lib-2.165.0.dist-info}/top_level.txt +0 -0
aws_cdk/aws_cognito/__init__.py
CHANGED
|
@@ -1011,6 +1011,33 @@ cognito.UserPoolIdentityProviderGoogle(self, "google",
|
|
|
1011
1011
|
)
|
|
1012
1012
|
)
|
|
1013
1013
|
```
|
|
1014
|
+
|
|
1015
|
+
### User Pool Group
|
|
1016
|
+
|
|
1017
|
+
Support for groups in Amazon Cognito user pools enables you to create and manage groups and add users to groups.
|
|
1018
|
+
Use groups to create collections of users to manage their permissions or to represent different types of users.
|
|
1019
|
+
|
|
1020
|
+
You can assign an AWS Identity and Access Management (IAM) role to a group to define the permissions for members of a group.
|
|
1021
|
+
|
|
1022
|
+
For more information, see [Adding groups to a user pool](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-user-groups.html).
|
|
1023
|
+
|
|
1024
|
+
```python
|
|
1025
|
+
# user_pool: cognito.UserPool
|
|
1026
|
+
# role: iam.Role
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
cognito.UserPoolGroup(self, "UserPoolGroup",
|
|
1030
|
+
user_pool=user_pool,
|
|
1031
|
+
group_name="my-group-name",
|
|
1032
|
+
precedence=1,
|
|
1033
|
+
role=role
|
|
1034
|
+
)
|
|
1035
|
+
|
|
1036
|
+
# You can also add a group by using addGroup method.
|
|
1037
|
+
user_pool.add_group("AnotherUserPoolGroup",
|
|
1038
|
+
group_name="another-group-name"
|
|
1039
|
+
)
|
|
1040
|
+
```
|
|
1014
1041
|
'''
|
|
1015
1042
|
from pkgutil import extend_path
|
|
1016
1043
|
__path__ = extend_path(__path__, __name__)
|
|
@@ -8854,14 +8881,14 @@ class CfnUserPoolIdentityProvider(
|
|
|
8854
8881
|
# provider_details: Any
|
|
8855
8882
|
|
|
8856
8883
|
cfn_user_pool_identity_provider = cognito.CfnUserPoolIdentityProvider(self, "MyCfnUserPoolIdentityProvider",
|
|
8884
|
+
provider_details=provider_details,
|
|
8857
8885
|
provider_name="providerName",
|
|
8858
8886
|
provider_type="providerType",
|
|
8859
8887
|
user_pool_id="userPoolId",
|
|
8860
8888
|
|
|
8861
8889
|
# the properties below are optional
|
|
8862
8890
|
attribute_mapping=attribute_mapping,
|
|
8863
|
-
idp_identifiers=["idpIdentifiers"]
|
|
8864
|
-
provider_details=provider_details
|
|
8891
|
+
idp_identifiers=["idpIdentifiers"]
|
|
8865
8892
|
)
|
|
8866
8893
|
'''
|
|
8867
8894
|
|
|
@@ -8870,34 +8897,34 @@ class CfnUserPoolIdentityProvider(
|
|
|
8870
8897
|
scope: _constructs_77d1e7e8.Construct,
|
|
8871
8898
|
id: builtins.str,
|
|
8872
8899
|
*,
|
|
8900
|
+
provider_details: typing.Any,
|
|
8873
8901
|
provider_name: builtins.str,
|
|
8874
8902
|
provider_type: builtins.str,
|
|
8875
8903
|
user_pool_id: builtins.str,
|
|
8876
8904
|
attribute_mapping: typing.Any = None,
|
|
8877
8905
|
idp_identifiers: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
8878
|
-
provider_details: typing.Any = None,
|
|
8879
8906
|
) -> None:
|
|
8880
8907
|
'''
|
|
8881
8908
|
:param scope: Scope in which this resource is defined.
|
|
8882
8909
|
:param id: Construct identifier for this resource (unique in its scope).
|
|
8910
|
+
:param provider_details: 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 ``authorize_scopes`` values must match the values listed here. - **OpenID Connect (OIDC)** - Amazon Cognito accepts the following elements when it can't discover endpoint URLs from ``oidc_issuer`` : ``attributes_url`` , ``authorize_url`` , ``jwks_uri`` , ``token_url`` . Create or update request: ``"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" }`` Describe response: ``"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" }`` - **SAML** - Create or update request with Metadata URL: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }`` Create or update request with Metadata file: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm": "rsa-sha256" }`` The value of ``MetadataFile`` must be the plaintext metadata document with all quote (") characters escaped by backslashes. Describe response: ``"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" }`` - **LoginWithAmazon** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"`` Describe response: ``"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" }`` - **Google** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }`` Describe response: ``"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" }`` - **SignInWithApple** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE", "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }`` Describe response: ``"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" }`` - **Facebook** - Create or update request: ``"ProviderDetails": { "api_version": "v17.0", "authorize_scopes": "public_profile, email", "client_id": "1example23456789", "client_secret": "provider-app-client-secret" }`` Describe response: ``"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" }``
|
|
8883
8911
|
:param provider_name: The IdP name.
|
|
8884
8912
|
:param provider_type: The IdP type.
|
|
8885
8913
|
:param user_pool_id: The user pool ID.
|
|
8886
8914
|
:param attribute_mapping: A mapping of IdP attributes to standard and custom user pool attributes.
|
|
8887
8915
|
:param idp_identifiers: A list of IdP identifiers.
|
|
8888
|
-
:param provider_details: 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 ``authorize_scopes`` values must match the values listed here. - **OpenID Connect (OIDC)** - Amazon Cognito accepts the following elements when it can't discover endpoint URLs from ``oidc_issuer`` : ``attributes_url`` , ``authorize_url`` , ``jwks_uri`` , ``token_url`` . Create or update request: ``"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" }`` Describe response: ``"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" }`` - **SAML** - Create or update request with Metadata URL: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }`` Create or update request with Metadata file: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm": "rsa-sha256" }`` The value of ``MetadataFile`` must be the plaintext metadata document with all quote (") characters escaped by backslashes. Describe response: ``"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" }`` - **LoginWithAmazon** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"`` Describe response: ``"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" }`` - **Google** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }`` Describe response: ``"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" }`` - **SignInWithApple** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE", "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }`` Describe response: ``"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" }`` - **Facebook** - Create or update request: ``"ProviderDetails": { "api_version": "v17.0", "authorize_scopes": "public_profile, email", "client_id": "1example23456789", "client_secret": "provider-app-client-secret" }`` Describe response: ``"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" }``
|
|
8889
8916
|
'''
|
|
8890
8917
|
if __debug__:
|
|
8891
8918
|
type_hints = typing.get_type_hints(_typecheckingstub__759e90505ceb64aa7002be11d4da4a87090102263927799f662a83f606483634)
|
|
8892
8919
|
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
8893
8920
|
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
8894
8921
|
props = CfnUserPoolIdentityProviderProps(
|
|
8922
|
+
provider_details=provider_details,
|
|
8895
8923
|
provider_name=provider_name,
|
|
8896
8924
|
provider_type=provider_type,
|
|
8897
8925
|
user_pool_id=user_pool_id,
|
|
8898
8926
|
attribute_mapping=attribute_mapping,
|
|
8899
8927
|
idp_identifiers=idp_identifiers,
|
|
8900
|
-
provider_details=provider_details,
|
|
8901
8928
|
)
|
|
8902
8929
|
|
|
8903
8930
|
jsii.create(self.__class__, self, [scope, id, props])
|
|
@@ -8935,8 +8962,7 @@ class CfnUserPoolIdentityProvider(
|
|
|
8935
8962
|
@builtins.property
|
|
8936
8963
|
@jsii.member(jsii_name="attrId")
|
|
8937
8964
|
def attr_id(self) -> builtins.str:
|
|
8938
|
-
'''
|
|
8939
|
-
|
|
8965
|
+
'''
|
|
8940
8966
|
:cloudformationAttribute: Id
|
|
8941
8967
|
'''
|
|
8942
8968
|
return typing.cast(builtins.str, jsii.get(self, "attrId"))
|
|
@@ -8946,6 +8972,19 @@ class CfnUserPoolIdentityProvider(
|
|
|
8946
8972
|
def _cfn_properties(self) -> typing.Mapping[builtins.str, typing.Any]:
|
|
8947
8973
|
return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "cfnProperties"))
|
|
8948
8974
|
|
|
8975
|
+
@builtins.property
|
|
8976
|
+
@jsii.member(jsii_name="providerDetails")
|
|
8977
|
+
def provider_details(self) -> typing.Any:
|
|
8978
|
+
'''The scopes, URLs, and identifiers for your external identity provider.'''
|
|
8979
|
+
return typing.cast(typing.Any, jsii.get(self, "providerDetails"))
|
|
8980
|
+
|
|
8981
|
+
@provider_details.setter
|
|
8982
|
+
def provider_details(self, value: typing.Any) -> None:
|
|
8983
|
+
if __debug__:
|
|
8984
|
+
type_hints = typing.get_type_hints(_typecheckingstub__dd9b80463fd736be9b8b32bf8d2368b0c44578e3b056d45e068ca1e5fdfdb299)
|
|
8985
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
8986
|
+
jsii.set(self, "providerDetails", value) # pyright: ignore[reportArgumentType]
|
|
8987
|
+
|
|
8949
8988
|
@builtins.property
|
|
8950
8989
|
@jsii.member(jsii_name="providerName")
|
|
8951
8990
|
def provider_name(self) -> builtins.str:
|
|
@@ -9014,51 +9053,38 @@ class CfnUserPoolIdentityProvider(
|
|
|
9014
9053
|
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
9015
9054
|
jsii.set(self, "idpIdentifiers", value) # pyright: ignore[reportArgumentType]
|
|
9016
9055
|
|
|
9017
|
-
@builtins.property
|
|
9018
|
-
@jsii.member(jsii_name="providerDetails")
|
|
9019
|
-
def provider_details(self) -> typing.Any:
|
|
9020
|
-
'''The scopes, URLs, and identifiers for your external identity provider.'''
|
|
9021
|
-
return typing.cast(typing.Any, jsii.get(self, "providerDetails"))
|
|
9022
|
-
|
|
9023
|
-
@provider_details.setter
|
|
9024
|
-
def provider_details(self, value: typing.Any) -> None:
|
|
9025
|
-
if __debug__:
|
|
9026
|
-
type_hints = typing.get_type_hints(_typecheckingstub__dd9b80463fd736be9b8b32bf8d2368b0c44578e3b056d45e068ca1e5fdfdb299)
|
|
9027
|
-
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
9028
|
-
jsii.set(self, "providerDetails", value) # pyright: ignore[reportArgumentType]
|
|
9029
|
-
|
|
9030
9056
|
|
|
9031
9057
|
@jsii.data_type(
|
|
9032
9058
|
jsii_type="aws-cdk-lib.aws_cognito.CfnUserPoolIdentityProviderProps",
|
|
9033
9059
|
jsii_struct_bases=[],
|
|
9034
9060
|
name_mapping={
|
|
9061
|
+
"provider_details": "providerDetails",
|
|
9035
9062
|
"provider_name": "providerName",
|
|
9036
9063
|
"provider_type": "providerType",
|
|
9037
9064
|
"user_pool_id": "userPoolId",
|
|
9038
9065
|
"attribute_mapping": "attributeMapping",
|
|
9039
9066
|
"idp_identifiers": "idpIdentifiers",
|
|
9040
|
-
"provider_details": "providerDetails",
|
|
9041
9067
|
},
|
|
9042
9068
|
)
|
|
9043
9069
|
class CfnUserPoolIdentityProviderProps:
|
|
9044
9070
|
def __init__(
|
|
9045
9071
|
self,
|
|
9046
9072
|
*,
|
|
9073
|
+
provider_details: typing.Any,
|
|
9047
9074
|
provider_name: builtins.str,
|
|
9048
9075
|
provider_type: builtins.str,
|
|
9049
9076
|
user_pool_id: builtins.str,
|
|
9050
9077
|
attribute_mapping: typing.Any = None,
|
|
9051
9078
|
idp_identifiers: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
9052
|
-
provider_details: typing.Any = None,
|
|
9053
9079
|
) -> None:
|
|
9054
9080
|
'''Properties for defining a ``CfnUserPoolIdentityProvider``.
|
|
9055
9081
|
|
|
9082
|
+
:param provider_details: 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 ``authorize_scopes`` values must match the values listed here. - **OpenID Connect (OIDC)** - Amazon Cognito accepts the following elements when it can't discover endpoint URLs from ``oidc_issuer`` : ``attributes_url`` , ``authorize_url`` , ``jwks_uri`` , ``token_url`` . Create or update request: ``"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" }`` Describe response: ``"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" }`` - **SAML** - Create or update request with Metadata URL: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }`` Create or update request with Metadata file: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm": "rsa-sha256" }`` The value of ``MetadataFile`` must be the plaintext metadata document with all quote (") characters escaped by backslashes. Describe response: ``"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" }`` - **LoginWithAmazon** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"`` Describe response: ``"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" }`` - **Google** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }`` Describe response: ``"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" }`` - **SignInWithApple** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE", "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }`` Describe response: ``"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" }`` - **Facebook** - Create or update request: ``"ProviderDetails": { "api_version": "v17.0", "authorize_scopes": "public_profile, email", "client_id": "1example23456789", "client_secret": "provider-app-client-secret" }`` Describe response: ``"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" }``
|
|
9056
9083
|
:param provider_name: The IdP name.
|
|
9057
9084
|
:param provider_type: The IdP type.
|
|
9058
9085
|
:param user_pool_id: The user pool ID.
|
|
9059
9086
|
:param attribute_mapping: A mapping of IdP attributes to standard and custom user pool attributes.
|
|
9060
9087
|
:param idp_identifiers: A list of IdP identifiers.
|
|
9061
|
-
:param provider_details: 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 ``authorize_scopes`` values must match the values listed here. - **OpenID Connect (OIDC)** - Amazon Cognito accepts the following elements when it can't discover endpoint URLs from ``oidc_issuer`` : ``attributes_url`` , ``authorize_url`` , ``jwks_uri`` , ``token_url`` . Create or update request: ``"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" }`` Describe response: ``"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" }`` - **SAML** - Create or update request with Metadata URL: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }`` Create or update request with Metadata file: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm": "rsa-sha256" }`` The value of ``MetadataFile`` must be the plaintext metadata document with all quote (") characters escaped by backslashes. Describe response: ``"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" }`` - **LoginWithAmazon** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"`` Describe response: ``"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" }`` - **Google** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }`` Describe response: ``"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" }`` - **SignInWithApple** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE", "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }`` Describe response: ``"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" }`` - **Facebook** - Create or update request: ``"ProviderDetails": { "api_version": "v17.0", "authorize_scopes": "public_profile, email", "client_id": "1example23456789", "client_secret": "provider-app-client-secret" }`` Describe response: ``"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" }``
|
|
9062
9088
|
|
|
9063
9089
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolidentityprovider.html
|
|
9064
9090
|
:exampleMetadata: fixture=_generated
|
|
@@ -9073,25 +9099,26 @@ class CfnUserPoolIdentityProviderProps:
|
|
|
9073
9099
|
# provider_details: Any
|
|
9074
9100
|
|
|
9075
9101
|
cfn_user_pool_identity_provider_props = cognito.CfnUserPoolIdentityProviderProps(
|
|
9102
|
+
provider_details=provider_details,
|
|
9076
9103
|
provider_name="providerName",
|
|
9077
9104
|
provider_type="providerType",
|
|
9078
9105
|
user_pool_id="userPoolId",
|
|
9079
9106
|
|
|
9080
9107
|
# the properties below are optional
|
|
9081
9108
|
attribute_mapping=attribute_mapping,
|
|
9082
|
-
idp_identifiers=["idpIdentifiers"]
|
|
9083
|
-
provider_details=provider_details
|
|
9109
|
+
idp_identifiers=["idpIdentifiers"]
|
|
9084
9110
|
)
|
|
9085
9111
|
'''
|
|
9086
9112
|
if __debug__:
|
|
9087
9113
|
type_hints = typing.get_type_hints(_typecheckingstub__41106943fcdd509be0174e1e1c8a8c320bd77587c77e22cfc1c1b7378dfb42ec)
|
|
9114
|
+
check_type(argname="argument provider_details", value=provider_details, expected_type=type_hints["provider_details"])
|
|
9088
9115
|
check_type(argname="argument provider_name", value=provider_name, expected_type=type_hints["provider_name"])
|
|
9089
9116
|
check_type(argname="argument provider_type", value=provider_type, expected_type=type_hints["provider_type"])
|
|
9090
9117
|
check_type(argname="argument user_pool_id", value=user_pool_id, expected_type=type_hints["user_pool_id"])
|
|
9091
9118
|
check_type(argname="argument attribute_mapping", value=attribute_mapping, expected_type=type_hints["attribute_mapping"])
|
|
9092
9119
|
check_type(argname="argument idp_identifiers", value=idp_identifiers, expected_type=type_hints["idp_identifiers"])
|
|
9093
|
-
check_type(argname="argument provider_details", value=provider_details, expected_type=type_hints["provider_details"])
|
|
9094
9120
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
9121
|
+
"provider_details": provider_details,
|
|
9095
9122
|
"provider_name": provider_name,
|
|
9096
9123
|
"provider_type": provider_type,
|
|
9097
9124
|
"user_pool_id": user_pool_id,
|
|
@@ -9100,8 +9127,51 @@ class CfnUserPoolIdentityProviderProps:
|
|
|
9100
9127
|
self._values["attribute_mapping"] = attribute_mapping
|
|
9101
9128
|
if idp_identifiers is not None:
|
|
9102
9129
|
self._values["idp_identifiers"] = idp_identifiers
|
|
9103
|
-
|
|
9104
|
-
|
|
9130
|
+
|
|
9131
|
+
@builtins.property
|
|
9132
|
+
def provider_details(self) -> typing.Any:
|
|
9133
|
+
'''The scopes, URLs, and identifiers for your external identity provider.
|
|
9134
|
+
|
|
9135
|
+
The following
|
|
9136
|
+
examples describe the provider detail keys for each IdP type. These values and their
|
|
9137
|
+
schema are subject to change. Social IdP ``authorize_scopes`` values must match
|
|
9138
|
+
the values listed here.
|
|
9139
|
+
|
|
9140
|
+
- **OpenID Connect (OIDC)** - Amazon Cognito accepts the following elements when it can't discover endpoint URLs from ``oidc_issuer`` : ``attributes_url`` , ``authorize_url`` , ``jwks_uri`` , ``token_url`` .
|
|
9141
|
+
|
|
9142
|
+
Create or update request: ``"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" }``
|
|
9143
|
+
|
|
9144
|
+
Describe response: ``"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" }``
|
|
9145
|
+
|
|
9146
|
+
- **SAML** - Create or update request with Metadata URL: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }``
|
|
9147
|
+
|
|
9148
|
+
Create or update request with Metadata file: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm": "rsa-sha256" }``
|
|
9149
|
+
|
|
9150
|
+
The value of ``MetadataFile`` must be the plaintext metadata document with all quote (") characters escaped by backslashes.
|
|
9151
|
+
|
|
9152
|
+
Describe response: ``"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" }``
|
|
9153
|
+
|
|
9154
|
+
- **LoginWithAmazon** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"``
|
|
9155
|
+
|
|
9156
|
+
Describe response: ``"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" }``
|
|
9157
|
+
|
|
9158
|
+
- **Google** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }``
|
|
9159
|
+
|
|
9160
|
+
Describe response: ``"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" }``
|
|
9161
|
+
|
|
9162
|
+
- **SignInWithApple** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE", "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }``
|
|
9163
|
+
|
|
9164
|
+
Describe response: ``"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" }``
|
|
9165
|
+
|
|
9166
|
+
- **Facebook** - Create or update request: ``"ProviderDetails": { "api_version": "v17.0", "authorize_scopes": "public_profile, email", "client_id": "1example23456789", "client_secret": "provider-app-client-secret" }``
|
|
9167
|
+
|
|
9168
|
+
Describe response: ``"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" }``
|
|
9169
|
+
|
|
9170
|
+
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolidentityprovider.html#cfn-cognito-userpoolidentityprovider-providerdetails
|
|
9171
|
+
'''
|
|
9172
|
+
result = self._values.get("provider_details")
|
|
9173
|
+
assert result is not None, "Required property 'provider_details' is missing"
|
|
9174
|
+
return typing.cast(typing.Any, result)
|
|
9105
9175
|
|
|
9106
9176
|
@builtins.property
|
|
9107
9177
|
def provider_name(self) -> builtins.str:
|
|
@@ -9151,50 +9221,6 @@ class CfnUserPoolIdentityProviderProps:
|
|
|
9151
9221
|
result = self._values.get("idp_identifiers")
|
|
9152
9222
|
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
9153
9223
|
|
|
9154
|
-
@builtins.property
|
|
9155
|
-
def provider_details(self) -> typing.Any:
|
|
9156
|
-
'''The scopes, URLs, and identifiers for your external identity provider.
|
|
9157
|
-
|
|
9158
|
-
The following
|
|
9159
|
-
examples describe the provider detail keys for each IdP type. These values and their
|
|
9160
|
-
schema are subject to change. Social IdP ``authorize_scopes`` values must match
|
|
9161
|
-
the values listed here.
|
|
9162
|
-
|
|
9163
|
-
- **OpenID Connect (OIDC)** - Amazon Cognito accepts the following elements when it can't discover endpoint URLs from ``oidc_issuer`` : ``attributes_url`` , ``authorize_url`` , ``jwks_uri`` , ``token_url`` .
|
|
9164
|
-
|
|
9165
|
-
Create or update request: ``"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" }``
|
|
9166
|
-
|
|
9167
|
-
Describe response: ``"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" }``
|
|
9168
|
-
|
|
9169
|
-
- **SAML** - Create or update request with Metadata URL: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }``
|
|
9170
|
-
|
|
9171
|
-
Create or update request with Metadata file: ``"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm": "rsa-sha256" }``
|
|
9172
|
-
|
|
9173
|
-
The value of ``MetadataFile`` must be the plaintext metadata document with all quote (") characters escaped by backslashes.
|
|
9174
|
-
|
|
9175
|
-
Describe response: ``"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" }``
|
|
9176
|
-
|
|
9177
|
-
- **LoginWithAmazon** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"``
|
|
9178
|
-
|
|
9179
|
-
Describe response: ``"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" }``
|
|
9180
|
-
|
|
9181
|
-
- **Google** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }``
|
|
9182
|
-
|
|
9183
|
-
Describe response: ``"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" }``
|
|
9184
|
-
|
|
9185
|
-
- **SignInWithApple** - Create or update request: ``"ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE", "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }``
|
|
9186
|
-
|
|
9187
|
-
Describe response: ``"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" }``
|
|
9188
|
-
|
|
9189
|
-
- **Facebook** - Create or update request: ``"ProviderDetails": { "api_version": "v17.0", "authorize_scopes": "public_profile, email", "client_id": "1example23456789", "client_secret": "provider-app-client-secret" }``
|
|
9190
|
-
|
|
9191
|
-
Describe response: ``"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" }``
|
|
9192
|
-
|
|
9193
|
-
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolidentityprovider.html#cfn-cognito-userpoolidentityprovider-providerdetails
|
|
9194
|
-
'''
|
|
9195
|
-
result = self._values.get("provider_details")
|
|
9196
|
-
return typing.cast(typing.Any, result)
|
|
9197
|
-
|
|
9198
9224
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
9199
9225
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
9200
9226
|
|
|
@@ -13131,6 +13157,28 @@ class IUserPool(_IResource_c80c4260, typing_extensions.Protocol):
|
|
|
13131
13157
|
'''
|
|
13132
13158
|
...
|
|
13133
13159
|
|
|
13160
|
+
@jsii.member(jsii_name="addGroup")
|
|
13161
|
+
def add_group(
|
|
13162
|
+
self,
|
|
13163
|
+
id: builtins.str,
|
|
13164
|
+
*,
|
|
13165
|
+
description: typing.Optional[builtins.str] = None,
|
|
13166
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
13167
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
13168
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
13169
|
+
) -> "UserPoolGroup":
|
|
13170
|
+
'''Add a new group to this user pool.
|
|
13171
|
+
|
|
13172
|
+
:param id: -
|
|
13173
|
+
:param description: A string containing the description of the group. Default: - no description
|
|
13174
|
+
:param group_name: The name of the group. Must be unique. Default: - auto generate a name
|
|
13175
|
+
:param precedence: A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens. Default: - null
|
|
13176
|
+
:param role: The role for the group. Default: - no description
|
|
13177
|
+
|
|
13178
|
+
:see: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-user-groups.html
|
|
13179
|
+
'''
|
|
13180
|
+
...
|
|
13181
|
+
|
|
13134
13182
|
@jsii.member(jsii_name="addResourceServer")
|
|
13135
13183
|
def add_resource_server(
|
|
13136
13184
|
self,
|
|
@@ -13303,6 +13351,38 @@ class _IUserPoolProxy(
|
|
|
13303
13351
|
|
|
13304
13352
|
return typing.cast("UserPoolDomain", jsii.invoke(self, "addDomain", [id, options]))
|
|
13305
13353
|
|
|
13354
|
+
@jsii.member(jsii_name="addGroup")
|
|
13355
|
+
def add_group(
|
|
13356
|
+
self,
|
|
13357
|
+
id: builtins.str,
|
|
13358
|
+
*,
|
|
13359
|
+
description: typing.Optional[builtins.str] = None,
|
|
13360
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
13361
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
13362
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
13363
|
+
) -> "UserPoolGroup":
|
|
13364
|
+
'''Add a new group to this user pool.
|
|
13365
|
+
|
|
13366
|
+
:param id: -
|
|
13367
|
+
:param description: A string containing the description of the group. Default: - no description
|
|
13368
|
+
:param group_name: The name of the group. Must be unique. Default: - auto generate a name
|
|
13369
|
+
:param precedence: A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens. Default: - null
|
|
13370
|
+
:param role: The role for the group. Default: - no description
|
|
13371
|
+
|
|
13372
|
+
:see: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-user-groups.html
|
|
13373
|
+
'''
|
|
13374
|
+
if __debug__:
|
|
13375
|
+
type_hints = typing.get_type_hints(_typecheckingstub__e70d406698753c50dbab4e4d1f9837fc55e7c713f52b3937d20745b5ab2a221e)
|
|
13376
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
13377
|
+
options = UserPoolGroupOptions(
|
|
13378
|
+
description=description,
|
|
13379
|
+
group_name=group_name,
|
|
13380
|
+
precedence=precedence,
|
|
13381
|
+
role=role,
|
|
13382
|
+
)
|
|
13383
|
+
|
|
13384
|
+
return typing.cast("UserPoolGroup", jsii.invoke(self, "addGroup", [id, options]))
|
|
13385
|
+
|
|
13306
13386
|
@jsii.member(jsii_name="addResourceServer")
|
|
13307
13387
|
def add_resource_server(
|
|
13308
13388
|
self,
|
|
@@ -13460,6 +13540,40 @@ class _IUserPoolDomainProxy(
|
|
|
13460
13540
|
typing.cast(typing.Any, IUserPoolDomain).__jsii_proxy_class__ = lambda : _IUserPoolDomainProxy
|
|
13461
13541
|
|
|
13462
13542
|
|
|
13543
|
+
@jsii.interface(jsii_type="aws-cdk-lib.aws_cognito.IUserPoolGroup")
|
|
13544
|
+
class IUserPoolGroup(_IResource_c80c4260, typing_extensions.Protocol):
|
|
13545
|
+
'''Represents a user pool group.'''
|
|
13546
|
+
|
|
13547
|
+
@builtins.property
|
|
13548
|
+
@jsii.member(jsii_name="groupName")
|
|
13549
|
+
def group_name(self) -> builtins.str:
|
|
13550
|
+
'''The user group name.
|
|
13551
|
+
|
|
13552
|
+
:attribute: true
|
|
13553
|
+
'''
|
|
13554
|
+
...
|
|
13555
|
+
|
|
13556
|
+
|
|
13557
|
+
class _IUserPoolGroupProxy(
|
|
13558
|
+
jsii.proxy_for(_IResource_c80c4260), # type: ignore[misc]
|
|
13559
|
+
):
|
|
13560
|
+
'''Represents a user pool group.'''
|
|
13561
|
+
|
|
13562
|
+
__jsii_type__: typing.ClassVar[str] = "aws-cdk-lib.aws_cognito.IUserPoolGroup"
|
|
13563
|
+
|
|
13564
|
+
@builtins.property
|
|
13565
|
+
@jsii.member(jsii_name="groupName")
|
|
13566
|
+
def group_name(self) -> builtins.str:
|
|
13567
|
+
'''The user group name.
|
|
13568
|
+
|
|
13569
|
+
:attribute: true
|
|
13570
|
+
'''
|
|
13571
|
+
return typing.cast(builtins.str, jsii.get(self, "groupName"))
|
|
13572
|
+
|
|
13573
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
13574
|
+
typing.cast(typing.Any, IUserPoolGroup).__jsii_proxy_class__ = lambda : _IUserPoolGroupProxy
|
|
13575
|
+
|
|
13576
|
+
|
|
13463
13577
|
@jsii.interface(jsii_type="aws-cdk-lib.aws_cognito.IUserPoolIdentityProvider")
|
|
13464
13578
|
class IUserPoolIdentityProvider(_IResource_c80c4260, typing_extensions.Protocol):
|
|
13465
13579
|
'''Represents a UserPoolIdentityProvider.'''
|
|
@@ -16497,6 +16611,36 @@ class UserPool(
|
|
|
16497
16611
|
|
|
16498
16612
|
return typing.cast("UserPoolDomain", jsii.invoke(self, "addDomain", [id, options]))
|
|
16499
16613
|
|
|
16614
|
+
@jsii.member(jsii_name="addGroup")
|
|
16615
|
+
def add_group(
|
|
16616
|
+
self,
|
|
16617
|
+
id: builtins.str,
|
|
16618
|
+
*,
|
|
16619
|
+
description: typing.Optional[builtins.str] = None,
|
|
16620
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
16621
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
16622
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
16623
|
+
) -> "UserPoolGroup":
|
|
16624
|
+
'''Add a new group to this user pool.
|
|
16625
|
+
|
|
16626
|
+
:param id: -
|
|
16627
|
+
:param description: A string containing the description of the group. Default: - no description
|
|
16628
|
+
:param group_name: The name of the group. Must be unique. Default: - auto generate a name
|
|
16629
|
+
:param precedence: A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens. Default: - null
|
|
16630
|
+
:param role: The role for the group. Default: - no description
|
|
16631
|
+
'''
|
|
16632
|
+
if __debug__:
|
|
16633
|
+
type_hints = typing.get_type_hints(_typecheckingstub__182df28f489c4d9ab970aca99503d45cd2196b431c6ce7b04bb1e343694049fa)
|
|
16634
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
16635
|
+
options = UserPoolGroupOptions(
|
|
16636
|
+
description=description,
|
|
16637
|
+
group_name=group_name,
|
|
16638
|
+
precedence=precedence,
|
|
16639
|
+
role=role,
|
|
16640
|
+
)
|
|
16641
|
+
|
|
16642
|
+
return typing.cast("UserPoolGroup", jsii.invoke(self, "addGroup", [id, options]))
|
|
16643
|
+
|
|
16500
16644
|
@jsii.member(jsii_name="addResourceServer")
|
|
16501
16645
|
def add_resource_server(
|
|
16502
16646
|
self,
|
|
@@ -18041,32 +18185,382 @@ class UserPoolEmailConfig:
|
|
|
18041
18185
|
)
|
|
18042
18186
|
|
|
18043
18187
|
|
|
18044
|
-
|
|
18188
|
+
@jsii.implements(IUserPoolGroup)
|
|
18189
|
+
class UserPoolGroup(
|
|
18190
|
+
_Resource_45bc6135,
|
|
18045
18191
|
metaclass=jsii.JSIIMeta,
|
|
18046
|
-
jsii_type="aws-cdk-lib.aws_cognito.
|
|
18192
|
+
jsii_type="aws-cdk-lib.aws_cognito.UserPoolGroup",
|
|
18047
18193
|
):
|
|
18048
|
-
'''
|
|
18194
|
+
'''Define a user pool group.
|
|
18049
18195
|
|
|
18050
|
-
|
|
18051
|
-
|
|
18052
|
-
|
|
18053
|
-
|
|
18196
|
+
:exampleMetadata: infused
|
|
18197
|
+
|
|
18198
|
+
Example::
|
|
18199
|
+
|
|
18200
|
+
# user_pool: cognito.UserPool
|
|
18201
|
+
# role: iam.Role
|
|
18202
|
+
|
|
18203
|
+
|
|
18204
|
+
cognito.UserPoolGroup(self, "UserPoolGroup",
|
|
18205
|
+
user_pool=user_pool,
|
|
18206
|
+
group_name="my-group-name",
|
|
18207
|
+
precedence=1,
|
|
18208
|
+
role=role
|
|
18209
|
+
)
|
|
18210
|
+
|
|
18211
|
+
# You can also add a group by using addGroup method.
|
|
18212
|
+
user_pool.add_group("AnotherUserPoolGroup",
|
|
18213
|
+
group_name="another-group-name"
|
|
18214
|
+
)
|
|
18215
|
+
'''
|
|
18216
|
+
|
|
18217
|
+
def __init__(
|
|
18218
|
+
self,
|
|
18054
18219
|
scope: _constructs_77d1e7e8.Construct,
|
|
18055
18220
|
id: builtins.str,
|
|
18056
|
-
|
|
18057
|
-
|
|
18058
|
-
|
|
18059
|
-
|
|
18221
|
+
*,
|
|
18222
|
+
user_pool: IUserPool,
|
|
18223
|
+
description: typing.Optional[builtins.str] = None,
|
|
18224
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
18225
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
18226
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
18227
|
+
) -> None:
|
|
18228
|
+
'''
|
|
18060
18229
|
:param scope: -
|
|
18061
18230
|
:param id: -
|
|
18062
|
-
:param
|
|
18231
|
+
:param user_pool: The user pool to which this group is associated.
|
|
18232
|
+
:param description: A string containing the description of the group. Default: - no description
|
|
18233
|
+
:param group_name: The name of the group. Must be unique. Default: - auto generate a name
|
|
18234
|
+
:param precedence: A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens. Default: - null
|
|
18235
|
+
:param role: The role for the group. Default: - no description
|
|
18063
18236
|
'''
|
|
18064
18237
|
if __debug__:
|
|
18065
|
-
type_hints = typing.get_type_hints(
|
|
18238
|
+
type_hints = typing.get_type_hints(_typecheckingstub__775ac13db76309a928c26a49c092fd74e83d97ad55358f5e3e7abc39c87da53a)
|
|
18066
18239
|
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
18067
18240
|
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
18068
|
-
|
|
18069
|
-
|
|
18241
|
+
props = UserPoolGroupProps(
|
|
18242
|
+
user_pool=user_pool,
|
|
18243
|
+
description=description,
|
|
18244
|
+
group_name=group_name,
|
|
18245
|
+
precedence=precedence,
|
|
18246
|
+
role=role,
|
|
18247
|
+
)
|
|
18248
|
+
|
|
18249
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
18250
|
+
|
|
18251
|
+
@jsii.member(jsii_name="fromGroupName")
|
|
18252
|
+
@builtins.classmethod
|
|
18253
|
+
def from_group_name(
|
|
18254
|
+
cls,
|
|
18255
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
18256
|
+
id: builtins.str,
|
|
18257
|
+
group_name: builtins.str,
|
|
18258
|
+
) -> IUserPoolGroup:
|
|
18259
|
+
'''Import a UserPoolGroup given its group name.
|
|
18260
|
+
|
|
18261
|
+
:param scope: -
|
|
18262
|
+
:param id: -
|
|
18263
|
+
:param group_name: -
|
|
18264
|
+
'''
|
|
18265
|
+
if __debug__:
|
|
18266
|
+
type_hints = typing.get_type_hints(_typecheckingstub__9d44902ed5a2acfdafc23199f3078ecfdbefe799f2ec29a5b0d850ee7b6d36ec)
|
|
18267
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
18268
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
18269
|
+
check_type(argname="argument group_name", value=group_name, expected_type=type_hints["group_name"])
|
|
18270
|
+
return typing.cast(IUserPoolGroup, jsii.sinvoke(cls, "fromGroupName", [scope, id, group_name]))
|
|
18271
|
+
|
|
18272
|
+
@builtins.property
|
|
18273
|
+
@jsii.member(jsii_name="groupName")
|
|
18274
|
+
def group_name(self) -> builtins.str:
|
|
18275
|
+
'''The user group name.'''
|
|
18276
|
+
return typing.cast(builtins.str, jsii.get(self, "groupName"))
|
|
18277
|
+
|
|
18278
|
+
|
|
18279
|
+
@jsii.data_type(
|
|
18280
|
+
jsii_type="aws-cdk-lib.aws_cognito.UserPoolGroupOptions",
|
|
18281
|
+
jsii_struct_bases=[],
|
|
18282
|
+
name_mapping={
|
|
18283
|
+
"description": "description",
|
|
18284
|
+
"group_name": "groupName",
|
|
18285
|
+
"precedence": "precedence",
|
|
18286
|
+
"role": "role",
|
|
18287
|
+
},
|
|
18288
|
+
)
|
|
18289
|
+
class UserPoolGroupOptions:
|
|
18290
|
+
def __init__(
|
|
18291
|
+
self,
|
|
18292
|
+
*,
|
|
18293
|
+
description: typing.Optional[builtins.str] = None,
|
|
18294
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
18295
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
18296
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
18297
|
+
) -> None:
|
|
18298
|
+
'''Options to create a UserPoolGroup.
|
|
18299
|
+
|
|
18300
|
+
:param description: A string containing the description of the group. Default: - no description
|
|
18301
|
+
:param group_name: The name of the group. Must be unique. Default: - auto generate a name
|
|
18302
|
+
:param precedence: A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens. Default: - null
|
|
18303
|
+
:param role: The role for the group. Default: - no description
|
|
18304
|
+
|
|
18305
|
+
:exampleMetadata: infused
|
|
18306
|
+
|
|
18307
|
+
Example::
|
|
18308
|
+
|
|
18309
|
+
# user_pool: cognito.UserPool
|
|
18310
|
+
# role: iam.Role
|
|
18311
|
+
|
|
18312
|
+
|
|
18313
|
+
cognito.UserPoolGroup(self, "UserPoolGroup",
|
|
18314
|
+
user_pool=user_pool,
|
|
18315
|
+
group_name="my-group-name",
|
|
18316
|
+
precedence=1,
|
|
18317
|
+
role=role
|
|
18318
|
+
)
|
|
18319
|
+
|
|
18320
|
+
# You can also add a group by using addGroup method.
|
|
18321
|
+
user_pool.add_group("AnotherUserPoolGroup",
|
|
18322
|
+
group_name="another-group-name"
|
|
18323
|
+
)
|
|
18324
|
+
'''
|
|
18325
|
+
if __debug__:
|
|
18326
|
+
type_hints = typing.get_type_hints(_typecheckingstub__a76259212a5e57f1375d5eb2940f0d6cde7a130c86d1a85fc682cc6597a4934b)
|
|
18327
|
+
check_type(argname="argument description", value=description, expected_type=type_hints["description"])
|
|
18328
|
+
check_type(argname="argument group_name", value=group_name, expected_type=type_hints["group_name"])
|
|
18329
|
+
check_type(argname="argument precedence", value=precedence, expected_type=type_hints["precedence"])
|
|
18330
|
+
check_type(argname="argument role", value=role, expected_type=type_hints["role"])
|
|
18331
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
18332
|
+
if description is not None:
|
|
18333
|
+
self._values["description"] = description
|
|
18334
|
+
if group_name is not None:
|
|
18335
|
+
self._values["group_name"] = group_name
|
|
18336
|
+
if precedence is not None:
|
|
18337
|
+
self._values["precedence"] = precedence
|
|
18338
|
+
if role is not None:
|
|
18339
|
+
self._values["role"] = role
|
|
18340
|
+
|
|
18341
|
+
@builtins.property
|
|
18342
|
+
def description(self) -> typing.Optional[builtins.str]:
|
|
18343
|
+
'''A string containing the description of the group.
|
|
18344
|
+
|
|
18345
|
+
:default: - no description
|
|
18346
|
+
'''
|
|
18347
|
+
result = self._values.get("description")
|
|
18348
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
18349
|
+
|
|
18350
|
+
@builtins.property
|
|
18351
|
+
def group_name(self) -> typing.Optional[builtins.str]:
|
|
18352
|
+
'''The name of the group.
|
|
18353
|
+
|
|
18354
|
+
Must be unique.
|
|
18355
|
+
|
|
18356
|
+
:default: - auto generate a name
|
|
18357
|
+
'''
|
|
18358
|
+
result = self._values.get("group_name")
|
|
18359
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
18360
|
+
|
|
18361
|
+
@builtins.property
|
|
18362
|
+
def precedence(self) -> typing.Optional[jsii.Number]:
|
|
18363
|
+
'''A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool.
|
|
18364
|
+
|
|
18365
|
+
Zero is the highest precedence value.
|
|
18366
|
+
|
|
18367
|
+
Groups with lower Precedence values take precedence over groups with higher or null Precedence values.
|
|
18368
|
+
If a user belongs to two or more groups, it is the group with the lowest precedence value
|
|
18369
|
+
whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims.
|
|
18370
|
+
|
|
18371
|
+
Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other.
|
|
18372
|
+
If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role
|
|
18373
|
+
claim in tokens for users in each group.
|
|
18374
|
+
If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens.
|
|
18375
|
+
|
|
18376
|
+
:default: - null
|
|
18377
|
+
'''
|
|
18378
|
+
result = self._values.get("precedence")
|
|
18379
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
18380
|
+
|
|
18381
|
+
@builtins.property
|
|
18382
|
+
def role(self) -> typing.Optional[_IRole_235f5d8e]:
|
|
18383
|
+
'''The role for the group.
|
|
18384
|
+
|
|
18385
|
+
:default: - no description
|
|
18386
|
+
'''
|
|
18387
|
+
result = self._values.get("role")
|
|
18388
|
+
return typing.cast(typing.Optional[_IRole_235f5d8e], result)
|
|
18389
|
+
|
|
18390
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
18391
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
18392
|
+
|
|
18393
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
18394
|
+
return not (rhs == self)
|
|
18395
|
+
|
|
18396
|
+
def __repr__(self) -> str:
|
|
18397
|
+
return "UserPoolGroupOptions(%s)" % ", ".join(
|
|
18398
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
18399
|
+
)
|
|
18400
|
+
|
|
18401
|
+
|
|
18402
|
+
@jsii.data_type(
|
|
18403
|
+
jsii_type="aws-cdk-lib.aws_cognito.UserPoolGroupProps",
|
|
18404
|
+
jsii_struct_bases=[UserPoolGroupOptions],
|
|
18405
|
+
name_mapping={
|
|
18406
|
+
"description": "description",
|
|
18407
|
+
"group_name": "groupName",
|
|
18408
|
+
"precedence": "precedence",
|
|
18409
|
+
"role": "role",
|
|
18410
|
+
"user_pool": "userPool",
|
|
18411
|
+
},
|
|
18412
|
+
)
|
|
18413
|
+
class UserPoolGroupProps(UserPoolGroupOptions):
|
|
18414
|
+
def __init__(
|
|
18415
|
+
self,
|
|
18416
|
+
*,
|
|
18417
|
+
description: typing.Optional[builtins.str] = None,
|
|
18418
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
18419
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
18420
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
18421
|
+
user_pool: IUserPool,
|
|
18422
|
+
) -> None:
|
|
18423
|
+
'''Props for UserPoolGroup construct.
|
|
18424
|
+
|
|
18425
|
+
:param description: A string containing the description of the group. Default: - no description
|
|
18426
|
+
:param group_name: The name of the group. Must be unique. Default: - auto generate a name
|
|
18427
|
+
:param precedence: A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens. Default: - null
|
|
18428
|
+
:param role: The role for the group. Default: - no description
|
|
18429
|
+
:param user_pool: The user pool to which this group is associated.
|
|
18430
|
+
|
|
18431
|
+
:exampleMetadata: infused
|
|
18432
|
+
|
|
18433
|
+
Example::
|
|
18434
|
+
|
|
18435
|
+
# user_pool: cognito.UserPool
|
|
18436
|
+
# role: iam.Role
|
|
18437
|
+
|
|
18438
|
+
|
|
18439
|
+
cognito.UserPoolGroup(self, "UserPoolGroup",
|
|
18440
|
+
user_pool=user_pool,
|
|
18441
|
+
group_name="my-group-name",
|
|
18442
|
+
precedence=1,
|
|
18443
|
+
role=role
|
|
18444
|
+
)
|
|
18445
|
+
|
|
18446
|
+
# You can also add a group by using addGroup method.
|
|
18447
|
+
user_pool.add_group("AnotherUserPoolGroup",
|
|
18448
|
+
group_name="another-group-name"
|
|
18449
|
+
)
|
|
18450
|
+
'''
|
|
18451
|
+
if __debug__:
|
|
18452
|
+
type_hints = typing.get_type_hints(_typecheckingstub__6f5beec5c4d6b11b4325b68ae8691c3f5f2eb75f4aa5ef1c6e333e5df0fe7e36)
|
|
18453
|
+
check_type(argname="argument description", value=description, expected_type=type_hints["description"])
|
|
18454
|
+
check_type(argname="argument group_name", value=group_name, expected_type=type_hints["group_name"])
|
|
18455
|
+
check_type(argname="argument precedence", value=precedence, expected_type=type_hints["precedence"])
|
|
18456
|
+
check_type(argname="argument role", value=role, expected_type=type_hints["role"])
|
|
18457
|
+
check_type(argname="argument user_pool", value=user_pool, expected_type=type_hints["user_pool"])
|
|
18458
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
18459
|
+
"user_pool": user_pool,
|
|
18460
|
+
}
|
|
18461
|
+
if description is not None:
|
|
18462
|
+
self._values["description"] = description
|
|
18463
|
+
if group_name is not None:
|
|
18464
|
+
self._values["group_name"] = group_name
|
|
18465
|
+
if precedence is not None:
|
|
18466
|
+
self._values["precedence"] = precedence
|
|
18467
|
+
if role is not None:
|
|
18468
|
+
self._values["role"] = role
|
|
18469
|
+
|
|
18470
|
+
@builtins.property
|
|
18471
|
+
def description(self) -> typing.Optional[builtins.str]:
|
|
18472
|
+
'''A string containing the description of the group.
|
|
18473
|
+
|
|
18474
|
+
:default: - no description
|
|
18475
|
+
'''
|
|
18476
|
+
result = self._values.get("description")
|
|
18477
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
18478
|
+
|
|
18479
|
+
@builtins.property
|
|
18480
|
+
def group_name(self) -> typing.Optional[builtins.str]:
|
|
18481
|
+
'''The name of the group.
|
|
18482
|
+
|
|
18483
|
+
Must be unique.
|
|
18484
|
+
|
|
18485
|
+
:default: - auto generate a name
|
|
18486
|
+
'''
|
|
18487
|
+
result = self._values.get("group_name")
|
|
18488
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
18489
|
+
|
|
18490
|
+
@builtins.property
|
|
18491
|
+
def precedence(self) -> typing.Optional[jsii.Number]:
|
|
18492
|
+
'''A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool.
|
|
18493
|
+
|
|
18494
|
+
Zero is the highest precedence value.
|
|
18495
|
+
|
|
18496
|
+
Groups with lower Precedence values take precedence over groups with higher or null Precedence values.
|
|
18497
|
+
If a user belongs to two or more groups, it is the group with the lowest precedence value
|
|
18498
|
+
whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims.
|
|
18499
|
+
|
|
18500
|
+
Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other.
|
|
18501
|
+
If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role
|
|
18502
|
+
claim in tokens for users in each group.
|
|
18503
|
+
If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens.
|
|
18504
|
+
|
|
18505
|
+
:default: - null
|
|
18506
|
+
'''
|
|
18507
|
+
result = self._values.get("precedence")
|
|
18508
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
18509
|
+
|
|
18510
|
+
@builtins.property
|
|
18511
|
+
def role(self) -> typing.Optional[_IRole_235f5d8e]:
|
|
18512
|
+
'''The role for the group.
|
|
18513
|
+
|
|
18514
|
+
:default: - no description
|
|
18515
|
+
'''
|
|
18516
|
+
result = self._values.get("role")
|
|
18517
|
+
return typing.cast(typing.Optional[_IRole_235f5d8e], result)
|
|
18518
|
+
|
|
18519
|
+
@builtins.property
|
|
18520
|
+
def user_pool(self) -> IUserPool:
|
|
18521
|
+
'''The user pool to which this group is associated.'''
|
|
18522
|
+
result = self._values.get("user_pool")
|
|
18523
|
+
assert result is not None, "Required property 'user_pool' is missing"
|
|
18524
|
+
return typing.cast(IUserPool, result)
|
|
18525
|
+
|
|
18526
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
18527
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
18528
|
+
|
|
18529
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
18530
|
+
return not (rhs == self)
|
|
18531
|
+
|
|
18532
|
+
def __repr__(self) -> str:
|
|
18533
|
+
return "UserPoolGroupProps(%s)" % ", ".join(
|
|
18534
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
18535
|
+
)
|
|
18536
|
+
|
|
18537
|
+
|
|
18538
|
+
class UserPoolIdentityProvider(
|
|
18539
|
+
metaclass=jsii.JSIIMeta,
|
|
18540
|
+
jsii_type="aws-cdk-lib.aws_cognito.UserPoolIdentityProvider",
|
|
18541
|
+
):
|
|
18542
|
+
'''User pool third-party identity providers.'''
|
|
18543
|
+
|
|
18544
|
+
@jsii.member(jsii_name="fromProviderName")
|
|
18545
|
+
@builtins.classmethod
|
|
18546
|
+
def from_provider_name(
|
|
18547
|
+
cls,
|
|
18548
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
18549
|
+
id: builtins.str,
|
|
18550
|
+
provider_name: builtins.str,
|
|
18551
|
+
) -> IUserPoolIdentityProvider:
|
|
18552
|
+
'''Import an existing UserPoolIdentityProvider.
|
|
18553
|
+
|
|
18554
|
+
:param scope: -
|
|
18555
|
+
:param id: -
|
|
18556
|
+
:param provider_name: -
|
|
18557
|
+
'''
|
|
18558
|
+
if __debug__:
|
|
18559
|
+
type_hints = typing.get_type_hints(_typecheckingstub__9db3563a94587e916fce47561a9ad603b26f36fbcb7b72d5e133ddf1e77b76d6)
|
|
18560
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
18561
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
18562
|
+
check_type(argname="argument provider_name", value=provider_name, expected_type=type_hints["provider_name"])
|
|
18563
|
+
return typing.cast(IUserPoolIdentityProvider, jsii.sinvoke(cls, "fromProviderName", [scope, id, provider_name]))
|
|
18070
18564
|
|
|
18071
18565
|
|
|
18072
18566
|
@jsii.implements(IUserPoolIdentityProvider)
|
|
@@ -21540,6 +22034,7 @@ __all__ = [
|
|
|
21540
22034
|
"IUserPool",
|
|
21541
22035
|
"IUserPoolClient",
|
|
21542
22036
|
"IUserPoolDomain",
|
|
22037
|
+
"IUserPoolGroup",
|
|
21543
22038
|
"IUserPoolIdentityProvider",
|
|
21544
22039
|
"IUserPoolResourceServer",
|
|
21545
22040
|
"KeepOriginalAttrs",
|
|
@@ -21578,6 +22073,9 @@ __all__ = [
|
|
|
21578
22073
|
"UserPoolDomainProps",
|
|
21579
22074
|
"UserPoolEmail",
|
|
21580
22075
|
"UserPoolEmailConfig",
|
|
22076
|
+
"UserPoolGroup",
|
|
22077
|
+
"UserPoolGroupOptions",
|
|
22078
|
+
"UserPoolGroupProps",
|
|
21581
22079
|
"UserPoolIdentityProvider",
|
|
21582
22080
|
"UserPoolIdentityProviderAmazon",
|
|
21583
22081
|
"UserPoolIdentityProviderAmazonProps",
|
|
@@ -22760,12 +23258,12 @@ def _typecheckingstub__759e90505ceb64aa7002be11d4da4a87090102263927799f662a83f60
|
|
|
22760
23258
|
scope: _constructs_77d1e7e8.Construct,
|
|
22761
23259
|
id: builtins.str,
|
|
22762
23260
|
*,
|
|
23261
|
+
provider_details: typing.Any,
|
|
22763
23262
|
provider_name: builtins.str,
|
|
22764
23263
|
provider_type: builtins.str,
|
|
22765
23264
|
user_pool_id: builtins.str,
|
|
22766
23265
|
attribute_mapping: typing.Any = None,
|
|
22767
23266
|
idp_identifiers: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
22768
|
-
provider_details: typing.Any = None,
|
|
22769
23267
|
) -> None:
|
|
22770
23268
|
"""Type checking stubs"""
|
|
22771
23269
|
pass
|
|
@@ -22782,6 +23280,12 @@ def _typecheckingstub__7ff11acc316d5d73192edfeab5a5d7fb2aa7891c069fce7ccaa876300
|
|
|
22782
23280
|
"""Type checking stubs"""
|
|
22783
23281
|
pass
|
|
22784
23282
|
|
|
23283
|
+
def _typecheckingstub__dd9b80463fd736be9b8b32bf8d2368b0c44578e3b056d45e068ca1e5fdfdb299(
|
|
23284
|
+
value: typing.Any,
|
|
23285
|
+
) -> None:
|
|
23286
|
+
"""Type checking stubs"""
|
|
23287
|
+
pass
|
|
23288
|
+
|
|
22785
23289
|
def _typecheckingstub__03fef1ca3436f487bdb2ac4c72e914ca702f01a40d12470aaa64c77a0f7e15a2(
|
|
22786
23290
|
value: builtins.str,
|
|
22787
23291
|
) -> None:
|
|
@@ -22812,20 +23316,14 @@ def _typecheckingstub__7662247fd2cd01f6776c3a84fedff308a45861e95cabe426cb256482a
|
|
|
22812
23316
|
"""Type checking stubs"""
|
|
22813
23317
|
pass
|
|
22814
23318
|
|
|
22815
|
-
def _typecheckingstub__dd9b80463fd736be9b8b32bf8d2368b0c44578e3b056d45e068ca1e5fdfdb299(
|
|
22816
|
-
value: typing.Any,
|
|
22817
|
-
) -> None:
|
|
22818
|
-
"""Type checking stubs"""
|
|
22819
|
-
pass
|
|
22820
|
-
|
|
22821
23319
|
def _typecheckingstub__41106943fcdd509be0174e1e1c8a8c320bd77587c77e22cfc1c1b7378dfb42ec(
|
|
22822
23320
|
*,
|
|
23321
|
+
provider_details: typing.Any,
|
|
22823
23322
|
provider_name: builtins.str,
|
|
22824
23323
|
provider_type: builtins.str,
|
|
22825
23324
|
user_pool_id: builtins.str,
|
|
22826
23325
|
attribute_mapping: typing.Any = None,
|
|
22827
23326
|
idp_identifiers: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
22828
|
-
provider_details: typing.Any = None,
|
|
22829
23327
|
) -> None:
|
|
22830
23328
|
"""Type checking stubs"""
|
|
22831
23329
|
pass
|
|
@@ -23346,6 +23844,17 @@ def _typecheckingstub__792921e0d9eecd6253eadd31c7fba82fdce9c0ba38f25dcba7dcd063e
|
|
|
23346
23844
|
"""Type checking stubs"""
|
|
23347
23845
|
pass
|
|
23348
23846
|
|
|
23847
|
+
def _typecheckingstub__e70d406698753c50dbab4e4d1f9837fc55e7c713f52b3937d20745b5ab2a221e(
|
|
23848
|
+
id: builtins.str,
|
|
23849
|
+
*,
|
|
23850
|
+
description: typing.Optional[builtins.str] = None,
|
|
23851
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
23852
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
23853
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
23854
|
+
) -> None:
|
|
23855
|
+
"""Type checking stubs"""
|
|
23856
|
+
pass
|
|
23857
|
+
|
|
23349
23858
|
def _typecheckingstub__6e7f4643c9bff39b5095e7aa370612aed9ce88bfde927b1cbbd7b3a21df157a2(
|
|
23350
23859
|
id: builtins.str,
|
|
23351
23860
|
*,
|
|
@@ -23654,6 +24163,17 @@ def _typecheckingstub__f9659a33214c6a8f47e5cc02aec61f89c8bd48113d0c9b3e32a81fef2
|
|
|
23654
24163
|
"""Type checking stubs"""
|
|
23655
24164
|
pass
|
|
23656
24165
|
|
|
24166
|
+
def _typecheckingstub__182df28f489c4d9ab970aca99503d45cd2196b431c6ce7b04bb1e343694049fa(
|
|
24167
|
+
id: builtins.str,
|
|
24168
|
+
*,
|
|
24169
|
+
description: typing.Optional[builtins.str] = None,
|
|
24170
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
24171
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
24172
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
24173
|
+
) -> None:
|
|
24174
|
+
"""Type checking stubs"""
|
|
24175
|
+
pass
|
|
24176
|
+
|
|
23657
24177
|
def _typecheckingstub__15a655e8061891a027a61815d064f6a0d9d429f80e33f0c0c98213485f2beedd(
|
|
23658
24178
|
id: builtins.str,
|
|
23659
24179
|
*,
|
|
@@ -23829,6 +24349,48 @@ def _typecheckingstub__e3ce90cb9624f22600c6b33192c8ad7ad7f3946d65d49e2cf22b46b1d
|
|
|
23829
24349
|
"""Type checking stubs"""
|
|
23830
24350
|
pass
|
|
23831
24351
|
|
|
24352
|
+
def _typecheckingstub__775ac13db76309a928c26a49c092fd74e83d97ad55358f5e3e7abc39c87da53a(
|
|
24353
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
24354
|
+
id: builtins.str,
|
|
24355
|
+
*,
|
|
24356
|
+
user_pool: IUserPool,
|
|
24357
|
+
description: typing.Optional[builtins.str] = None,
|
|
24358
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
24359
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
24360
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
24361
|
+
) -> None:
|
|
24362
|
+
"""Type checking stubs"""
|
|
24363
|
+
pass
|
|
24364
|
+
|
|
24365
|
+
def _typecheckingstub__9d44902ed5a2acfdafc23199f3078ecfdbefe799f2ec29a5b0d850ee7b6d36ec(
|
|
24366
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
24367
|
+
id: builtins.str,
|
|
24368
|
+
group_name: builtins.str,
|
|
24369
|
+
) -> None:
|
|
24370
|
+
"""Type checking stubs"""
|
|
24371
|
+
pass
|
|
24372
|
+
|
|
24373
|
+
def _typecheckingstub__a76259212a5e57f1375d5eb2940f0d6cde7a130c86d1a85fc682cc6597a4934b(
|
|
24374
|
+
*,
|
|
24375
|
+
description: typing.Optional[builtins.str] = None,
|
|
24376
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
24377
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
24378
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
24379
|
+
) -> None:
|
|
24380
|
+
"""Type checking stubs"""
|
|
24381
|
+
pass
|
|
24382
|
+
|
|
24383
|
+
def _typecheckingstub__6f5beec5c4d6b11b4325b68ae8691c3f5f2eb75f4aa5ef1c6e333e5df0fe7e36(
|
|
24384
|
+
*,
|
|
24385
|
+
description: typing.Optional[builtins.str] = None,
|
|
24386
|
+
group_name: typing.Optional[builtins.str] = None,
|
|
24387
|
+
precedence: typing.Optional[jsii.Number] = None,
|
|
24388
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
24389
|
+
user_pool: IUserPool,
|
|
24390
|
+
) -> None:
|
|
24391
|
+
"""Type checking stubs"""
|
|
24392
|
+
pass
|
|
24393
|
+
|
|
23832
24394
|
def _typecheckingstub__9db3563a94587e916fce47561a9ad603b26f36fbcb7b72d5e133ddf1e77b76d6(
|
|
23833
24395
|
scope: _constructs_77d1e7e8.Construct,
|
|
23834
24396
|
id: builtins.str,
|