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 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

      @Stability(Stable) public GraphqlApi.Builder name(String 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

      @Stability(Stable) public GraphqlApi.Builder definition(Definition 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

      @Stability(Stable) public GraphqlApi.Builder domainName(DomainOptions 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

      @Stability(Stable) public GraphqlApi.Builder logConfig(LogConfig logConfig)
      Logging configuration for this api.

      Default: - None

      Parameters:
      logConfig - Logging configuration for this api. This parameter is required.
      Returns:
      this
    • ownerContact

      @Stability(Stable) public GraphqlApi.Builder ownerContact(String 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

      @Stability(Stable) public GraphqlApi.Builder queryDepthLimit(Number 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

      @Stability(Stable) public GraphqlApi.Builder resolverCountLimit(Number 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

      @Stability(Deprecated) @Deprecated public GraphqlApi.Builder schema(ISchema 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

      @Stability(Stable) public GraphqlApi.Builder visibility(Visibility 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

      @Stability(Stable) public GraphqlApi.Builder xrayEnabled(Boolean 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

      @Stability(Stable) public GraphqlApi build()
      Specified by:
      build in interface software.amazon.jsii.Builder<GraphqlApi>
      Returns:
      a newly built instance of GraphqlApi.