Class GraphqlApiProps.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.GraphqlApiProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GraphqlApiProps>
- Enclosing interface:
GraphqlApiProps
@Stability(Stable)
public static final class GraphqlApiProps.Builder
extends Object
implements software.amazon.jsii.Builder<GraphqlApiProps>
A builder for
GraphqlApiProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthorizationConfig(AuthorizationConfig authorizationConfig) Sets the value ofGraphqlApiProps.getAuthorizationConfig()build()Builds the configured instance.definition(Definition definition) Sets the value ofGraphqlApiProps.getDefinition()domainName(DomainOptions domainName) Sets the value ofGraphqlApiProps.getDomainName()environmentVariables(Map<String, String> environmentVariables) Sets the value ofGraphqlApiProps.getEnvironmentVariables()introspectionConfig(IntrospectionConfig introspectionConfig) Sets the value ofGraphqlApiProps.getIntrospectionConfig()Sets the value ofGraphqlApiProps.getLogConfig()Sets the value ofGraphqlApiProps.getName()ownerContact(String ownerContact) Sets the value ofGraphqlApiProps.getOwnerContact()queryDepthLimit(Number queryDepthLimit) Sets the value ofGraphqlApiProps.getQueryDepthLimit()resolverCountLimit(Number resolverCountLimit) Sets the value ofGraphqlApiProps.getResolverCountLimit()Deprecated.use Definition.schema insteadvisibility(Visibility visibility) Sets the value ofGraphqlApiProps.getVisibility()xrayEnabled(Boolean xrayEnabled) Sets the value ofGraphqlApiProps.getXrayEnabled()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the value ofGraphqlApiProps.getName()- Parameters:
name- the name of the GraphQL API. This parameter is required.- Returns:
this
-
authorizationConfig
@Stability(Stable) public GraphqlApiProps.Builder authorizationConfig(AuthorizationConfig authorizationConfig) Sets the value ofGraphqlApiProps.getAuthorizationConfig()- Parameters:
authorizationConfig- Optional authorization configuration.- Returns:
this
-
definition
Sets the value ofGraphqlApiProps.getDefinition()- Parameters:
definition- Definition (schema file or source APIs) for this GraphQL Api.- Returns:
this
-
domainName
Sets the value ofGraphqlApiProps.getDomainName()- Parameters:
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- Returns:
this
-
environmentVariables
@Stability(Stable) public GraphqlApiProps.Builder environmentVariables(Map<String, String> environmentVariables) Sets the value ofGraphqlApiProps.getEnvironmentVariables()- Parameters:
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.
- Returns:
this
-
introspectionConfig
@Stability(Stable) public GraphqlApiProps.Builder introspectionConfig(IntrospectionConfig introspectionConfig) Sets the value ofGraphqlApiProps.getIntrospectionConfig()- Parameters:
introspectionConfig- A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection.- Returns:
this
-
logConfig
Sets the value ofGraphqlApiProps.getLogConfig()- Parameters:
logConfig- Logging configuration for this api.- Returns:
this
-
ownerContact
Sets the value ofGraphqlApiProps.getOwnerContact()- Parameters:
ownerContact- The owner contact information for an API resource. This field accepts any string input with a length of 0 - 256 characters.- Returns:
this
-
queryDepthLimit
Sets the value ofGraphqlApiProps.getQueryDepthLimit()- Parameters:
queryDepthLimit- A number indicating the maximum depth resolvers should be accepted when handling queries. Value must be withing range of 0 to 75- Returns:
this
-
resolverCountLimit
Sets the value ofGraphqlApiProps.getResolverCountLimit()- Parameters:
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- Returns:
this
-
schema
Deprecated.use Definition.schema insteadSets the value ofGraphqlApiProps.getSchema()- Parameters:
schema- GraphQL schema definition. Specify how you want to define your schema. SchemaFile.fromAsset(filePath: string) allows schema definition through schema.graphql file- Returns:
this
-
visibility
Sets the value ofGraphqlApiProps.getVisibility()- Parameters:
visibility- A value indicating whether the API is accessible from anywhere (GLOBAL) or can only be access from a VPC (PRIVATE).- Returns:
this
-
xrayEnabled
Sets the value ofGraphqlApiProps.getXrayEnabled()- Parameters:
xrayEnabled- A flag indicating whether or not X-Ray tracing is enabled for the GraphQL API.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<GraphqlApiProps>- Returns:
- a new instance of
GraphqlApiProps - Throws:
NullPointerException- if any required attribute was not provided
-