Class GraphqlApi.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GraphqlApi>
- Enclosing class:
GraphqlApi
GraphqlApi
.-
Method Summary
Modifier and TypeMethodDescriptionauthorizationConfig
(AuthorizationConfig authorizationConfig) Optional authorization configuration.build()
static GraphqlApi.Builder
definition
(Definition definition) Definition (schema file or source APIs) for this GraphQL Api.domainName
(DomainOptions domainName) The domain name configuration for the GraphQL API.environmentVariables
(Map<String, String> environmentVariables) A map containing the list of resources with their properties and environment variables.introspectionConfig
(IntrospectionConfig introspectionConfig) A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection.Logging configuration for this api.the name of the GraphQL API.ownerContact
(String ownerContact) The owner contact information for an API resource.queryDepthLimit
(Number queryDepthLimit) A number indicating the maximum depth resolvers should be accepted when handling queries.resolverCountLimit
(Number resolverCountLimit) A number indicating the maximum number of resolvers that should be accepted when handling queries.Deprecated.use Definition.schema insteadvisibility
(Visibility visibility) A value indicating whether the API is accessible from anywhere (GLOBAL) or can only be access from a VPC (PRIVATE).xrayEnabled
(Boolean xrayEnabled) A flag indicating whether or not X-Ray tracing is enabled for the GraphQL API.
-
Method Details
-
create
@Stability(Stable) public static GraphqlApi.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
GraphqlApi.Builder
.
-
name
the name of the GraphQL API.- Parameters:
name
- the name of the GraphQL API. This parameter is required.- Returns:
this
-
authorizationConfig
@Stability(Stable) public GraphqlApi.Builder authorizationConfig(AuthorizationConfig authorizationConfig) Optional authorization configuration.Default: - API Key authorization
- Parameters:
authorizationConfig
- Optional authorization configuration. This parameter is required.- Returns:
this
-
definition
Definition (schema file or source APIs) for this GraphQL Api.- Parameters:
definition
- Definition (schema file or source APIs) for this GraphQL Api. This parameter is required.- Returns:
this
-
domainName
The domain name configuration for the GraphQL API.The Route 53 hosted zone and CName DNS record must be configured in addition to this setting to enable custom domain URL
Default: - no domain name
- Parameters:
domainName
- The domain name configuration for the GraphQL API. This parameter is required.- Returns:
this
-
environmentVariables
@Stability(Stable) public GraphqlApi.Builder environmentVariables(Map<String, String> environmentVariables) A map containing the list of resources with their properties and environment variables.There are a few rules you must follow when creating keys and values:
- Keys must begin with a letter.
- Keys must be between 2 and 64 characters long.
- Keys can only contain letters, numbers, and the underscore character (_).
- Values can be up to 512 characters long.
- You can configure up to 50 key-value pairs in a GraphQL API.
Default: - No environment variables.
- Parameters:
environmentVariables
- A map containing the list of resources with their properties and environment variables. This parameter is required.- Returns:
this
-
introspectionConfig
@Stability(Stable) public GraphqlApi.Builder introspectionConfig(IntrospectionConfig introspectionConfig) A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection.Default: IntrospectionConfig.ENABLED
- Parameters:
introspectionConfig
- A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection. This parameter is required.- Returns:
this
-
logConfig
Logging configuration for this api.Default: - None
- Parameters:
logConfig
- Logging configuration for this api. This parameter is required.- Returns:
this
-
ownerContact
The owner contact information for an API resource.This field accepts any string input with a length of 0 - 256 characters.
Default: - No owner contact.
- Parameters:
ownerContact
- The owner contact information for an API resource. This parameter is required.- Returns:
this
-
queryDepthLimit
A number indicating the maximum depth resolvers should be accepted when handling queries.Value must be withing range of 0 to 75
Default: - The default value is 0 (or unspecified) which indicates no maximum depth.
- Parameters:
queryDepthLimit
- A number indicating the maximum depth resolvers should be accepted when handling queries. This parameter is required.- Returns:
this
-
resolverCountLimit
A number indicating the maximum number of resolvers that should be accepted when handling queries.Value must be withing range of 0 to 10000
Default: - The default value is 0 (or unspecified), which will set the limit to 10000
- Parameters:
resolverCountLimit
- A number indicating the maximum number of resolvers that should be accepted when handling queries. This parameter is required.- Returns:
this
-
schema
Deprecated.use Definition.schema instead(deprecated) GraphQL schema definition. Specify how you want to define your schema.SchemaFile.fromAsset(filePath: string) allows schema definition through schema.graphql file
Default: - schema will be generated code-first (i.e. addType, addObjectType, etc.)
- Parameters:
schema
- GraphQL schema definition. Specify how you want to define your schema. This parameter is required.- Returns:
this
-
visibility
A value indicating whether the API is accessible from anywhere (GLOBAL) or can only be access from a VPC (PRIVATE).Default: - GLOBAL
- Parameters:
visibility
- A value indicating whether the API is accessible from anywhere (GLOBAL) or can only be access from a VPC (PRIVATE). This parameter is required.- Returns:
this
-
xrayEnabled
A flag indicating whether or not X-Ray tracing is enabled for the GraphQL API.Default: - false
- Parameters:
xrayEnabled
- A flag indicating whether or not X-Ray tracing is enabled for the GraphQL API. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GraphqlApi>
- Returns:
- a newly built instance of
GraphqlApi
.
-