CfnApiPropsMixin
- class aws_cdk.mixins_preview.aws_appsync.mixins.CfnApiPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::AppSync::Apiresource creates an AWS AppSync API that you can use for an AWS AppSync API with your preferred configuration, such as an Event API that provides real-time message publishing and message subscriptions over WebSockets.- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-api.html
- CloudformationResource:
AWS::AppSync::Api
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_appsync import mixins as appsync_mixins cfn_api_props_mixin = appsync_mixins.CfnApiPropsMixin(appsync_mixins.CfnApiMixinProps( event_config=appsync_mixins.CfnApiPropsMixin.EventConfigProperty( auth_providers=[appsync_mixins.CfnApiPropsMixin.AuthProviderProperty( auth_type="authType", cognito_config=appsync_mixins.CfnApiPropsMixin.CognitoConfigProperty( app_id_client_regex="appIdClientRegex", aws_region="awsRegion", user_pool_id="userPoolId" ), lambda_authorizer_config=appsync_mixins.CfnApiPropsMixin.LambdaAuthorizerConfigProperty( authorizer_result_ttl_in_seconds=123, authorizer_uri="authorizerUri", identity_validation_expression="identityValidationExpression" ), open_id_connect_config=appsync_mixins.CfnApiPropsMixin.OpenIDConnectConfigProperty( auth_ttl=123, client_id="clientId", iat_ttl=123, issuer="issuer" ) )], connection_auth_modes=[appsync_mixins.CfnApiPropsMixin.AuthModeProperty( auth_type="authType" )], default_publish_auth_modes=[appsync_mixins.CfnApiPropsMixin.AuthModeProperty( auth_type="authType" )], default_subscribe_auth_modes=[appsync_mixins.CfnApiPropsMixin.AuthModeProperty( auth_type="authType" )], log_config=appsync_mixins.CfnApiPropsMixin.EventLogConfigProperty( cloud_watch_logs_role_arn="cloudWatchLogsRoleArn", log_level="logLevel" ) ), name="name", owner_contact="ownerContact", tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::AppSync::Api.- Parameters:
props (
Union[CfnApiMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['eventConfig', 'name', 'ownerContact', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AuthModeProperty
- class CfnApiPropsMixin.AuthModeProperty(*, auth_type=None)
Bases:
objectDescribes an authorization configuration.
Use
AuthModeto specify the publishing and subscription authorization configuration for an Event API.- Parameters:
auth_type (
Optional[str]) – The authorization type.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_appsync import mixins as appsync_mixins auth_mode_property = appsync_mixins.CfnApiPropsMixin.AuthModeProperty( auth_type="authType" )
Attributes
- auth_type
The authorization type.
AuthProviderProperty
- class CfnApiPropsMixin.AuthProviderProperty(*, auth_type=None, cognito_config=None, lambda_authorizer_config=None, open_id_connect_config=None)
Bases:
objectDescribes an authorization provider.
- Parameters:
auth_type (
Optional[str]) – The authorization type.cognito_config (
Union[IResolvable,CognitoConfigProperty,Dict[str,Any],None]) – Describes an Amazon Cognito user pool configuration.lambda_authorizer_config (
Union[IResolvable,LambdaAuthorizerConfigProperty,Dict[str,Any],None]) – ALambdaAuthorizerConfigspecifies how to authorize AWS AppSync API access when using theAWS_LAMBDAauthorizer mode. Be aware that an AWS AppSync API can have only one AWS Lambda authorizer configured at a time.open_id_connect_config (
Union[IResolvable,OpenIDConnectConfigProperty,Dict[str,Any],None]) – Describes an OpenID Connect (OIDC) configuration.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_appsync import mixins as appsync_mixins auth_provider_property = appsync_mixins.CfnApiPropsMixin.AuthProviderProperty( auth_type="authType", cognito_config=appsync_mixins.CfnApiPropsMixin.CognitoConfigProperty( app_id_client_regex="appIdClientRegex", aws_region="awsRegion", user_pool_id="userPoolId" ), lambda_authorizer_config=appsync_mixins.CfnApiPropsMixin.LambdaAuthorizerConfigProperty( authorizer_result_ttl_in_seconds=123, authorizer_uri="authorizerUri", identity_validation_expression="identityValidationExpression" ), open_id_connect_config=appsync_mixins.CfnApiPropsMixin.OpenIDConnectConfigProperty( auth_ttl=123, client_id="clientId", iat_ttl=123, issuer="issuer" ) )
Attributes
- auth_type
The authorization type.
- cognito_config
Describes an Amazon Cognito user pool configuration.
- lambda_authorizer_config
A
LambdaAuthorizerConfigspecifies how to authorize AWS AppSync API access when using theAWS_LAMBDAauthorizer mode.Be aware that an AWS AppSync API can have only one AWS Lambda authorizer configured at a time.
- open_id_connect_config
Describes an OpenID Connect (OIDC) configuration.
CognitoConfigProperty
- class CfnApiPropsMixin.CognitoConfigProperty(*, app_id_client_regex=None, aws_region=None, user_pool_id=None)
Bases:
objectDescribes an Amazon Cognito configuration.
- Parameters:
app_id_client_regex (
Optional[str]) – A regular expression for validating the incoming Amazon Cognito user pool app client ID. If this value isn’t set, no filtering is applied.aws_region (
Optional[str]) – The AWS Region in which the user pool was created.user_pool_id (
Optional[str]) – The user pool ID.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_appsync import mixins as appsync_mixins cognito_config_property = appsync_mixins.CfnApiPropsMixin.CognitoConfigProperty( app_id_client_regex="appIdClientRegex", aws_region="awsRegion", user_pool_id="userPoolId" )
Attributes
- app_id_client_regex
A regular expression for validating the incoming Amazon Cognito user pool app client ID.
If this value isn’t set, no filtering is applied.
- aws_region
The AWS Region in which the user pool was created.
DnsMapProperty
- class CfnApiPropsMixin.DnsMapProperty(*, http=None, realtime=None)
Bases:
objectA map of DNS names for the Api.
- Parameters:
http (
Optional[str]) – The domain name of the Api’s HTTP endpoint.realtime (
Optional[str]) – The domain name of the Api’s real-time endpoint.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-api-dnsmap.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_appsync import mixins as appsync_mixins dns_map_property = appsync_mixins.CfnApiPropsMixin.DnsMapProperty( http="http", realtime="realtime" )
Attributes
- http
The domain name of the Api’s HTTP endpoint.
- realtime
The domain name of the Api’s real-time endpoint.
EventConfigProperty
- class CfnApiPropsMixin.EventConfigProperty(*, auth_providers=None, connection_auth_modes=None, default_publish_auth_modes=None, default_subscribe_auth_modes=None, log_config=None)
Bases:
objectDescribes the authorization configuration for connections, message publishing, message subscriptions, and logging for an Event API.
- Parameters:
auth_providers (
Union[IResolvable,Sequence[Union[IResolvable,AuthProviderProperty,Dict[str,Any]]],None]) – A list of authorization providers.connection_auth_modes (
Union[IResolvable,Sequence[Union[IResolvable,AuthModeProperty,Dict[str,Any]]],None]) – A list of valid authorization modes for the Event API connections.default_publish_auth_modes (
Union[IResolvable,Sequence[Union[IResolvable,AuthModeProperty,Dict[str,Any]]],None]) – A list of valid authorization modes for the Event API publishing.default_subscribe_auth_modes (
Union[IResolvable,Sequence[Union[IResolvable,AuthModeProperty,Dict[str,Any]]],None]) – A list of valid authorization modes for the Event API subscriptions.log_config (
Union[IResolvable,EventLogConfigProperty,Dict[str,Any],None]) – The CloudWatch Logs configuration for the Event API.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_appsync import mixins as appsync_mixins event_config_property = appsync_mixins.CfnApiPropsMixin.EventConfigProperty( auth_providers=[appsync_mixins.CfnApiPropsMixin.AuthProviderProperty( auth_type="authType", cognito_config=appsync_mixins.CfnApiPropsMixin.CognitoConfigProperty( app_id_client_regex="appIdClientRegex", aws_region="awsRegion", user_pool_id="userPoolId" ), lambda_authorizer_config=appsync_mixins.CfnApiPropsMixin.LambdaAuthorizerConfigProperty( authorizer_result_ttl_in_seconds=123, authorizer_uri="authorizerUri", identity_validation_expression="identityValidationExpression" ), open_id_connect_config=appsync_mixins.CfnApiPropsMixin.OpenIDConnectConfigProperty( auth_ttl=123, client_id="clientId", iat_ttl=123, issuer="issuer" ) )], connection_auth_modes=[appsync_mixins.CfnApiPropsMixin.AuthModeProperty( auth_type="authType" )], default_publish_auth_modes=[appsync_mixins.CfnApiPropsMixin.AuthModeProperty( auth_type="authType" )], default_subscribe_auth_modes=[appsync_mixins.CfnApiPropsMixin.AuthModeProperty( auth_type="authType" )], log_config=appsync_mixins.CfnApiPropsMixin.EventLogConfigProperty( cloud_watch_logs_role_arn="cloudWatchLogsRoleArn", log_level="logLevel" ) )
Attributes
- auth_providers
A list of authorization providers.
- connection_auth_modes
A list of valid authorization modes for the Event API connections.
- default_publish_auth_modes
A list of valid authorization modes for the Event API publishing.
- default_subscribe_auth_modes
A list of valid authorization modes for the Event API subscriptions.
- log_config
The CloudWatch Logs configuration for the Event API.
EventLogConfigProperty
- class CfnApiPropsMixin.EventLogConfigProperty(*, cloud_watch_logs_role_arn=None, log_level=None)
Bases:
objectDescribes the CloudWatch Logs configuration for the Event API.
- Parameters:
cloud_watch_logs_role_arn (
Optional[str]) – The IAM service role that AWS AppSync assumes to publish CloudWatch Logs in your account.log_level (
Optional[str]) – The type of information to log for the Event API.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_appsync import mixins as appsync_mixins event_log_config_property = appsync_mixins.CfnApiPropsMixin.EventLogConfigProperty( cloud_watch_logs_role_arn="cloudWatchLogsRoleArn", log_level="logLevel" )
Attributes
- cloud_watch_logs_role_arn
The IAM service role that AWS AppSync assumes to publish CloudWatch Logs in your account.
- log_level
The type of information to log for the Event API.
OpenIDConnectConfigProperty
- class CfnApiPropsMixin.OpenIDConnectConfigProperty(*, auth_ttl=None, client_id=None, iat_ttl=None, issuer=None)
Bases:
objectDescribes an OpenID Connect (OIDC) configuration.
- Parameters:
auth_ttl (
Union[int,float,None]) – The number of milliseconds that a token is valid after being authenticated.client_id (
Optional[str]) – The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AWS AppSync can validate against multiple client identifiers at a time.iat_ttl (
Union[int,float,None]) – The number of milliseconds that a token is valid after it’s issued to a user.issuer (
Optional[str]) – The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value ofissin the ID token.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_appsync import mixins as appsync_mixins open_iDConnect_config_property = appsync_mixins.CfnApiPropsMixin.OpenIDConnectConfigProperty( auth_ttl=123, client_id="clientId", iat_ttl=123, issuer="issuer" )
Attributes
- auth_ttl
The number of milliseconds that a token is valid after being authenticated.
- client_id
The client identifier of the relying party at the OpenID identity provider.
This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AWS AppSync can validate against multiple client identifiers at a time.
- iat_ttl
The number of milliseconds that a token is valid after it’s issued to a user.
- issuer
The issuer for the OIDC configuration.
The issuer returned by discovery must exactly match the value of
issin the ID token.