{
 "additionalProperties": false,
 "conditionalCreateOnlyProperties": [
  "/properties/LambdaAuthorizerConfig/AuthorizerResultTtlInSeconds",
  "/properties/LambdaAuthorizerConfig/AuthorizerUri",
  "/properties/LambdaAuthorizerConfig/IdentityValidationExpression",
  "/properties/UserPoolConfig/AppIdClientRegex",
  "/properties/UserPoolConfig/AwsRegion",
  "/properties/UserPoolConfig/DefaultAction",
  "/properties/UserPoolConfig/UserPoolId",
  "/properties/OpenIDConnectConfig/AuthTTL",
  "/properties/OpenIDConnectConfig/IatTTL",
  "/properties/OpenIDConnectConfig/Issuer",
  "/properties/OpenIDConnectConfig/ClientId"
 ],
 "definitions": {
  "AdditionalAuthenticationProvider": {
   "additionalProperties": false,
   "properties": {
    "AuthenticationType": {
     "enum": [
      "AMAZON_COGNITO_USER_POOLS",
      "API_KEY",
      "AWS_IAM",
      "AWS_LAMBDA",
      "OPENID_CONNECT"
     ],
     "type": "string"
    },
    "LambdaAuthorizerConfig": {
     "$ref": "#/definitions/LambdaAuthorizerConfig"
    },
    "OpenIDConnectConfig": {
     "$ref": "#/definitions/OpenIDConnectConfig"
    },
    "UserPoolConfig": {
     "$ref": "#/definitions/CognitoUserPoolConfig"
    }
   },
   "required": [
    "AuthenticationType"
   ],
   "type": "object"
  },
  "CognitoUserPoolConfig": {
   "additionalProperties": false,
   "properties": {
    "AppIdClientRegex": {
     "type": "string"
    },
    "AwsRegion": {
     "type": "string"
    },
    "UserPoolId": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "EnhancedMetricsConfig": {
   "additionalProperties": false,
   "properties": {
    "DataSourceLevelMetricsBehavior": {
     "enum": [
      "FULL_REQUEST_DATA_SOURCE_METRICS",
      "PER_DATA_SOURCE_METRICS"
     ],
     "type": "string"
    },
    "OperationLevelMetricsConfig": {
     "enum": [
      "DISABLED",
      "ENABLED"
     ],
     "type": "string"
    },
    "ResolverLevelMetricsBehavior": {
     "enum": [
      "FULL_REQUEST_RESOLVER_METRICS",
      "PER_RESOLVER_METRICS"
     ],
     "type": "string"
    }
   },
   "required": [
    "OperationLevelMetricsConfig",
    "ResolverLevelMetricsBehavior",
    "DataSourceLevelMetricsBehavior"
   ],
   "type": "object"
  },
  "LambdaAuthorizerConfig": {
   "additionalProperties": false,
   "properties": {
    "AuthorizerResultTtlInSeconds": {
     "maximum": 3600,
     "minimum": 0,
     "type": "integer"
    },
    "AuthorizerUri": {
     "type": "string"
    },
    "IdentityValidationExpression": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "LogConfig": {
   "additionalProperties": false,
   "properties": {
    "CloudWatchLogsRoleArn": {
     "format": "AWS::IAM::Role.Arn",
     "type": "string"
    },
    "ExcludeVerboseContent": {
     "type": "boolean"
    },
    "FieldLogLevel": {
     "enum": [
      "ALL",
      "DEBUG",
      "ERROR",
      "INFO",
      "NONE"
     ],
     "type": "string"
    }
   },
   "required": [
    "FieldLogLevel",
    "CloudWatchLogsRoleArn"
   ],
   "type": "object"
  },
  "OpenIDConnectConfig": {
   "additionalProperties": false,
   "properties": {
    "AuthTTL": {
     "type": "number"
    },
    "ClientId": {
     "type": "string"
    },
    "IatTTL": {
     "type": "number"
    },
    "Issuer": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "Value": {
     "type": "string"
    }
   },
   "required": [
    "Value",
    "Key"
   ],
   "type": "object"
  },
  "UserPoolConfig": {
   "additionalProperties": false,
   "properties": {
    "AppIdClientRegex": {
     "type": "string"
    },
    "AwsRegion": {
     "type": "string"
    },
    "DefaultAction": {
     "enum": [
      "ALLOW",
      "DENY"
     ],
     "type": "string"
    },
    "UserPoolId": {
     "type": "string"
    }
   },
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/ApiId"
 ],
 "properties": {
  "AdditionalAuthenticationProviders": {
   "items": {
    "$ref": "#/definitions/AdditionalAuthenticationProvider"
   },
   "type": "array",
   "uniqueItems": true
  },
  "ApiId": {
   "type": "string"
  },
  "ApiType": {
   "enum": [
    "GRAPHQL",
    "MERGED"
   ],
   "type": "string"
  },
  "Arn": {
   "pattern": "^arn:.*",
   "type": "string"
  },
  "AuthenticationType": {
   "enum": [
    "AMAZON_COGNITO_USER_POOLS",
    "API_KEY",
    "AWS_IAM",
    "AWS_LAMBDA",
    "OPENID_CONNECT"
   ],
   "type": "string"
  },
  "EnhancedMetricsConfig": {
   "$ref": "#/definitions/EnhancedMetricsConfig"
  },
  "EnvironmentVariables": {
   "additionalProperties": false,
   "patternProperties": {
    "^[A-Za-z]+\\w*$": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "GraphQLDns": {
   "type": "string"
  },
  "GraphQLEndpointArn": {
   "type": "string"
  },
  "GraphQLUrl": {
   "type": "string"
  },
  "IntrospectionConfig": {
   "enum": [
    "DISABLED",
    "ENABLED"
   ],
   "type": "string"
  },
  "LambdaAuthorizerConfig": {
   "$ref": "#/definitions/LambdaAuthorizerConfig"
  },
  "LogConfig": {
   "$ref": "#/definitions/LogConfig"
  },
  "MergedApiExecutionRoleArn": {
   "format": "AWS::IAM::Role.Arn",
   "type": "string"
  },
  "Name": {
   "type": "string"
  },
  "OpenIDConnectConfig": {
   "$ref": "#/definitions/OpenIDConnectConfig"
  },
  "OwnerContact": {
   "type": "string"
  },
  "QueryDepthLimit": {
   "maximum": 75,
   "minimum": 0,
   "type": "integer"
  },
  "RealtimeDns": {
   "type": "string"
  },
  "RealtimeUrl": {
   "type": "string"
  },
  "ResolverCountLimit": {
   "maximum": 10000,
   "minimum": 0,
   "type": "integer"
  },
  "Tags": {
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": true
  },
  "UserPoolConfig": {
   "$ref": "#/definitions/UserPoolConfig"
  },
  "Visibility": {
   "enum": [
    "GLOBAL",
    "PRIVATE"
   ],
   "type": "string"
  },
  "XrayEnabled": {
   "type": "boolean"
  }
 },
 "readOnlyProperties": [
  "/properties/ApiId",
  "/properties/Arn",
  "/properties/GraphQLEndpointArn",
  "/properties/GraphQLDns",
  "/properties/GraphQLUrl",
  "/properties/RealtimeDns",
  "/properties/RealtimeUrl"
 ],
 "required": [
  "Name",
  "AuthenticationType"
 ],
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::AppSync::GraphQLApi"
}
