AuthorizationMode

class aws_cdk.aws_appsync.AuthorizationMode(*, authorization_type, api_key_config=None, open_id_connect_config=None, user_pool_config=None)

Bases: object

__init__(*, authorization_type, api_key_config=None, open_id_connect_config=None, user_pool_config=None)

Interface to specify default or additional authorization(s).

Parameters
  • authorization_type (AuthorizationType) – One of possible four values AppSync supports. Default: - AuthorizationType.API_KEY

  • api_key_config (Optional[ApiKeyConfig]) – If authorizationType is AuthorizationType.API_KEY, this option can be configured. Default: - name: ‘DefaultAPIKey’ | description: ‘Default API Key created by CDK’

  • open_id_connect_config (Optional[OpenIdConnectConfig]) – If authorizationType is AuthorizationType.OIDC, this option is required. Default: - none

  • user_pool_config (Optional[UserPoolConfig]) – If authorizationType is AuthorizationType.USER_POOL, this option is required. Default: - none

stability :stability: experimental

Return type

None

Attributes

api_key_config

If authorizationType is AuthorizationType.API_KEY, this option can be configured.

default :default: - name: ‘DefaultAPIKey’ | description: ‘Default API Key created by CDK’

stability :stability: experimental

Return type

Optional[ApiKeyConfig]

authorization_type

One of possible four values AppSync supports.

default :default: - AuthorizationType.API_KEY

see :see: https://docs.aws.amazon.com/appsync/latest/devguide/security.html stability :stability: experimental

Return type

AuthorizationType

open_id_connect_config

If authorizationType is AuthorizationType.OIDC, this option is required.

default :default: - none

stability :stability: experimental

Return type

Optional[OpenIdConnectConfig]

user_pool_config

If authorizationType is AuthorizationType.USER_POOL, this option is required.

default :default: - none

stability :stability: experimental

Return type

Optional[UserPoolConfig]