Class GraphqlApi.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.GraphqlApi.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GraphqlApi>
- Enclosing class:
GraphqlApi
@Stability(Stable)
public static final class GraphqlApi.Builder
extends Object
implements software.amazon.jsii.Builder<GraphqlApi>
A fluent builder for
GraphqlApi.-
Method Summary
Modifier and TypeMethodDescriptionauthorizationConfig(AuthorizationConfig authorizationConfig) Optional authorization configuration.build()static GraphqlApi.Builderdefinition(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.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
-
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:
buildin interfacesoftware.amazon.jsii.Builder<GraphqlApi>- Returns:
- a newly built instance of
GraphqlApi.
-