CfnGraphQLApiProps Struct
Properties for defining a CfnGraphQLApi.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const cfnGraphQLApiProps: appsync.CfnGraphQLApiProps = {
authenticationType: 'authenticationType',
name: 'name',
// the properties below are optional
additionalAuthenticationProviders: [{
authenticationType: 'authenticationType',
// the properties below are optional
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: 123,
authorizerUri: 'authorizerUri',
identityValidationExpression: 'identityValidationExpression',
},
openIdConnectConfig: {
authTtl: 123,
clientId: 'clientId',
iatTtl: 123,
issuer: 'issuer',
},
userPoolConfig: {
appIdClientRegex: 'appIdClientRegex',
awsRegion: 'awsRegion',
userPoolId: 'userPoolId',
},
}],
apiType: 'apiType',
enhancedMetricsConfig: {
dataSourceLevelMetricsBehavior: 'dataSourceLevelMetricsBehavior',
operationLevelMetricsConfig: 'operationLevelMetricsConfig',
resolverLevelMetricsBehavior: 'resolverLevelMetricsBehavior',
},
environmentVariables: {
environmentVariablesKey: 'environmentVariables',
},
introspectionConfig: 'introspectionConfig',
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: 123,
authorizerUri: 'authorizerUri',
identityValidationExpression: 'identityValidationExpression',
},
logConfig: {
cloudWatchLogsRoleArn: 'cloudWatchLogsRoleArn',
fieldLogLevel: 'fieldLogLevel',
// the properties below are optional
excludeVerboseContent: false,
},
mergedApiExecutionRoleArn: 'mergedApiExecutionRoleArn',
openIdConnectConfig: {
authTtl: 123,
clientId: 'clientId',
iatTtl: 123,
issuer: 'issuer',
},
ownerContact: 'ownerContact',
queryDepthLimit: 123,
resolverCountLimit: 123,
tags: [{
key: 'key',
value: 'value',
}],
userPoolConfig: {
appIdClientRegex: 'appIdClientRegex',
awsRegion: 'awsRegion',
defaultAction: 'defaultAction',
userPoolId: 'userPoolId',
},
visibility: 'visibility',
xrayEnabled: false,
};
Properties
additionalAuthenticationProvidersoptionalIResolvable | IResolvable | CfnGraphQLApi.AdditionalAuthenticationProviderProperty[]additional_authentication_providersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AdditionalAuthenticationProviderProperty]]]additionalAuthenticationProvidersoptionalIResolvableAdditionalAuthenticationProvidersoptionalIResolvableAdditionalAuthenticationProvidersoptionalinterface{}#apiTypeoptionalstringapi_typeoptionalstrapiTypeoptionalStringApiTypeoptionalstringApiTypeoptional*string#WARNING : If the ApiType has not been defined, explicitly setting it to GRAPHQL in a template/stack update will result in an API replacement and new DNS values.
The following values are valid:
GRAPHQL | MERGED
authenticationTypestringauthentication_typestrauthenticationTypeStringAuthenticationTypestringAuthenticationType*stringrequired#For allowed values (such as API_KEY , AWS_IAM , AMAZON_COGNITO_USER_POOLS , OPENID_CONNECT , or AWS_LAMBDA ), see Security in the AWS AppSync Developer Guide .
enhancedMetricsConfigoptionalIResolvable | CfnGraphQLApi.EnhancedMetricsConfigPropertyenhanced_metrics_configoptionaltyping.Union[IResolvable, EnhancedMetricsConfigProperty]enhancedMetricsConfigoptionalIResolvableEnhancedMetricsConfigoptionalIResolvableEnhancedMetricsConfigoptionalinterface{}#notes
Enhanced metrics emit granular data on API usage and performance such as AppSync request and error counts, latency, and cache hits/misses. All enhanced metric data is sent to your CloudWatch account, and you can configure the types of data that will be sent.
Enhanced metrics can be configured at the resolver, data source, and operation levels. For more information, see Monitoring and logging in the AWS AppSync User Guide .
environmentVariablesoptionalIResolvable | { [key: string]: string }environment_variablesoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]environmentVariablesoptionalIResolvableEnvironmentVariablesoptionalIResolvableEnvironmentVariablesoptionalinterface{}#For more information, see Environmental variables .
Pattern : ^[A-Za-z]+\\w*$\\
Minimum : 2
Maximum : 64
introspectionConfigoptionalstringintrospection_configoptionalstrintrospectionConfigoptionalStringIntrospectionConfigoptionalstringIntrospectionConfigoptional*string#notes
If no value is provided, the introspection configuration will be set to ENABLED by default. This field will produce an error if the operation attempts to use the introspection feature while this field is disabled.
For more information about introspection, see GraphQL introspection .
lambdaAuthorizerConfigoptionalIResolvable | CfnGraphQLApi.LambdaAuthorizerConfigPropertylambda_authorizer_configoptionaltyping.Union[IResolvable, LambdaAuthorizerConfigProperty]lambdaAuthorizerConfigoptionalIResolvableLambdaAuthorizerConfigoptionalIResolvableLambdaAuthorizerConfigoptionalinterface{}#Be aware that an AWS AppSync API may have only one Lambda authorizer configured at a time.
logConfigoptionalIResolvable | CfnGraphQLApi.LogConfigPropertylog_configoptionaltyping.Union[IResolvable, LogConfigProperty]logConfigoptionalIResolvableLogConfigoptionalIResolvableLogConfigoptionalinterface{}#mergedApiExecutionRoleArnoptionalstringmerged_api_execution_role_arnoptionalstrmergedApiExecutionRoleArnoptionalStringMergedApiExecutionRoleArnoptionalstringMergedApiExecutionRoleArnoptional*string#The AppSync service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to prompt the AUTO_MERGE to update the merged API endpoint with the source API changes automatically.
openIdConnectConfigoptionalIResolvable | CfnGraphQLApi.OpenIDConnectConfigPropertyopen_id_connect_configoptionaltyping.Union[IResolvable, OpenIDConnectConfigProperty]openIdConnectConfigoptionalIResolvableOpenIdConnectConfigoptionalIResolvableOpenIdConnectConfigoptionalinterface{}#ownerContactoptionalstringowner_contactoptionalstrownerContactoptionalStringOwnerContactoptionalstringOwnerContactoptional*string#This field accepts any string input with a length of 0 - 256 characters.
queryDepthLimitoptionalnumberquery_depth_limitoptionalint | floatqueryDepthLimitoptionalNumberQueryDepthLimitoptionaldoubleQueryDepthLimitoptional*float64#notes
Depth refers to the amount of nested levels allowed in the body of query. The default value is 0 (or unspecified), which indicates there's no depth limit. If you set a limit, it can be between 1 and 75 nested levels. This field will produce a limit error if the operation falls out of bounds. Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error, the error will be thrown upwards to the first nullable field available.
resolverCountLimitoptionalnumberresolver_count_limitoptionalint | floatresolverCountLimitoptionalNumberResolverCountLimitoptionaldoubleResolverCountLimitoptional*float64#The default value is 0 (or unspecified), which will set the limit to 10000 . When specified, the limit value can be between 1 and 10000 . This field will produce a limit error if the operation falls out of bounds.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#userPoolConfigoptionalIResolvable | CfnGraphQLApi.UserPoolConfigPropertyuser_pool_configoptionaltyping.Union[IResolvable, UserPoolConfigProperty]userPoolConfigoptionalIResolvableUserPoolConfigoptionalIResolvableUserPoolConfigoptionalinterface{}#visibilityoptionalstringvisibilityoptionalstrvisibilityoptionalStringVisibilityoptionalstringVisibilityoptional*string#By default, the scope is set to Global if no value is provided.
WARNING : If Visibility has not been defined, explicitly setting it to GLOBAL in a template/stack update will result in an API replacement and new DNS values.
xrayEnabledoptionalboolean | IResolvablexray_enabledoptionaltyping.Union[bool, IResolvable]xrayEnabledoptionalBooleanXrayEnabledoptionalboolXrayEnabledoptionalinterface{}#