{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-glue/json-schema/aws-glue-create-connection-request-schema.json",
  "title": "CreateConnectionRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-glue-aws-glue-x-amz-target-awsglue-createconnection-api-api-openapi.yml#/components/schemas/CreateConnectionRequest",
  "type": "object",
  "properties": {
    "CatalogId": {
      "type": "string",
      "description": "The ID of the Data Catalog in which to create the connection. If none is provided, the Amazon Web Services account ID is used by default."
    },
    "ConnectionInput": {
      "$ref": "#/$defs/ConnectionInput"
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags you assign to the connection."
    }
  },
  "required": [
    "ConnectionInput"
  ],
  "$defs": {
    "AuthenticationConfigurationInput": {
      "type": "object",
      "properties": {
        "AuthenticationType": {
          "type": "string",
          "enum": [
            "BASIC",
            "OAUTH2",
            "CUSTOM",
            "IAM"
          ],
          "description": "A structure containing the authentication configuration in the CreateConnection request."
        },
        "OAuth2Properties": {
          "$ref": "#/$defs/OAuth2PropertiesInput"
        },
        "SecretArn": {
          "type": "string",
          "description": "The secret manager ARN to store credentials in the CreateConnection request."
        },
        "KmsKeyArn": {
          "type": "string",
          "description": "The ARN of the KMS key used to encrypt the connection. Only taken an as input in the request and stored in the Secret Manager."
        },
        "BasicAuthenticationCredentials": {
          "$ref": "#/$defs/BasicAuthenticationCredentials"
        },
        "CustomAuthenticationCredentials": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The credentials used when the authentication type is custom authentication."
        }
      }
    },
    "AuthorizationCodeProperties": {
      "type": "object",
      "properties": {
        "AuthorizationCode": {
          "type": "string",
          "description": "An authorization code to be used in the third leg of the AUTHORIZATION_CODE grant workflow. This is a single-use code which becomes invalid once exchanged for an access token, thus it is acceptable to have this value as a request parameter."
        },
        "RedirectUri": {
          "type": "string",
          "description": "The redirect URI where the user gets redirected to by authorization server when issuing an authorization code. The URI is subsequently used when the authorization code is exchanged for an access token."
        }
      }
    },
    "BasicAuthenticationCredentials": {
      "type": "object",
      "properties": {
        "Username": {
          "type": "string",
          "description": "The username to connect to the data source."
        },
        "Password": {
          "type": "string",
          "description": "The password to connect to the data source."
        }
      }
    },
    "ConnectionInput": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the connection."
        },
        "Description": {
          "type": "string",
          "description": "The description of the connection."
        },
        "ConnectionType": {
          "type": "string",
          "enum": [
            "JDBC",
            "SFTP",
            "MONGODB",
            "KAFKA",
            "NETWORK",
            "MARKETPLACE",
            "CUSTOM",
            "SALESFORCE",
            "VIEW_VALIDATION_REDSHIFT",
            "VIEW_VALIDATION_ATHENA",
            "GOOGLEADS",
            "GOOGLESHEETS",
            "GOOGLEANALYTICS4",
            "SERVICENOW",
            "MARKETO",
            "SAPODATA",
            "ZENDESK",
            "JIRACLOUD",
            "NETSUITEERP",
            "HUBSPOT",
            "FACEBOOKADS",
            "INSTAGRAMADS",
            "ZOHOCRM",
            "SALESFORCEPARDOT",
            "SALESFORCEMARKETINGCLOUD",
            "ADOBEANALYTICS",
            "SLACK",
            "LINKEDIN",
            "MIXPANEL",
            "ASANA",
            "STRIPE",
            "SMARTSHEET",
            "DATADOG",
            "WOOCOMMERCE",
            "INTERCOM",
            "SNAPCHATADS",
            "PAYPAL",
            "QUICKBOOKS",
            "FACEBOOKPAGEINSIGHTS",
            "FRESHDESK",
            "TWILIO",
            "DOCUSIGNMONITOR",
            "FRESHSALES",
            "ZOOM",
            "GOOGLESEARCHCONSOLE",
            "SALESFORCECOMMERCECLOUD",
            "SAPCONCUR",
            "DYNATRACE",
            "MICROSOFTDYNAMIC365FINANCEANDOPS",
            "MICROSOFTTEAMS",
            "BLACKBAUDRAISEREDGENXT",
            "MAILCHIMP",
            "GITLAB",
            "PENDO",
            "PRODUCTBOARD",
            "CIRCLECI",
            "PIPEDIVE",
            "SENDGRID",
            "AZURECOSMOS",
            "AZURESQL",
            "BIGQUERY",
            "BLACKBAUD",
            "CLOUDERAHIVE",
            "CLOUDERAIMPALA",
            "CLOUDWATCH",
            "CLOUDWATCHMETRICS",
            "CMDB",
            "DATALAKEGEN2",
            "DB2",
            "DB2AS400",
            "DOCUMENTDB",
            "DOMO",
            "DYNAMODB",
            "GOOGLECLOUDSTORAGE",
            "HBASE",
            "KUSTOMER",
            "MICROSOFTDYNAMICS365CRM",
            "MONDAY",
            "MYSQL",
            "OKTA",
            "OPENSEARCH",
            "ORACLE",
            "PIPEDRIVE",
            "POSTGRESQL",
            "SAPHANA",
            "SQLSERVER",
            "SYNAPSE",
            "TERADATA",
            "TERADATANOS",
            "TIMESTREAM",
            "TPCDS",
            "VERTICA"
          ],
          "description": "The type of the connection. Currently, these types are supported: JDBC - Designates a connection to a database through Java Database Connectivity (JDBC). JDBC Connections use the following ConnectionParameters. Required: All of (HOST, PORT, JDBC_ENGINE) or JDBC_CONNECTION_URL. Required: All of (USERNAME, PASSWORD) or SECRET_ID. Optional: JDBC_ENFORCE_SSL, CUSTOM_JDBC_CERT, CUSTOM_JDBC_CERT_STRING, SKIP_CUSTOM_JDBC_CERT_VALIDATION. These parameters are used to configure SSL with JDBC. KAFKA - Designates a connection to an Apache Kafka streaming platform. KAFKA Connections use the following Conn"
        },
        "MatchCriteria": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of criteria that can be used in selecting this connection."
        },
        "ConnectionProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "These key-value pairs define parameters for the connection."
        },
        "SparkProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Connection properties specific to the Spark compute environment."
        },
        "AthenaProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Connection properties specific to the Athena compute environment."
        },
        "PythonProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Connection properties specific to the Python compute environment."
        },
        "PhysicalConnectionRequirements": {
          "$ref": "#/$defs/PhysicalConnectionRequirements"
        },
        "AuthenticationConfiguration": {
          "$ref": "#/$defs/AuthenticationConfigurationInput"
        },
        "ValidateCredentials": {
          "type": "boolean",
          "description": "A flag to validate the credentials during create connection. Default is true."
        },
        "ValidateForComputeEnvironments": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "SPARK",
              "ATHENA",
              "PYTHON"
            ]
          },
          "description": "The compute environments that the specified connection properties are validated against."
        }
      },
      "required": [
        "Name",
        "ConnectionType",
        "ConnectionProperties"
      ]
    },
    "OAuth2ClientApplication": {
      "type": "object",
      "properties": {
        "UserManagedClientApplicationClientId": {
          "type": "string",
          "description": "The client application clientID if the ClientAppType is USER_MANAGED."
        },
        "AWSManagedClientApplicationReference": {
          "type": "string",
          "description": "The reference to the SaaS-side client app that is Amazon Web Services managed."
        }
      }
    },
    "OAuth2Credentials": {
      "type": "object",
      "properties": {
        "UserManagedClientApplicationClientSecret": {
          "type": "string",
          "description": "The client application client secret if the client application is user managed."
        },
        "AccessToken": {
          "type": "string",
          "description": "The access token used when the authentication type is OAuth2."
        },
        "RefreshToken": {
          "type": "string",
          "description": "The refresh token used when the authentication type is OAuth2."
        },
        "JwtToken": {
          "type": "string",
          "description": "The JSON Web Token (JWT) used when the authentication type is OAuth2."
        }
      }
    },
    "OAuth2PropertiesInput": {
      "type": "object",
      "properties": {
        "OAuth2GrantType": {
          "type": "string",
          "enum": [
            "AUTHORIZATION_CODE",
            "CLIENT_CREDENTIALS",
            "JWT_BEARER",
            "REFRESH_TOKEN"
          ],
          "description": "The OAuth2 grant type in the CreateConnection request. For example, AUTHORIZATION_CODE, JWT_BEARER, REFRESH_TOKEN, or CLIENT_CREDENTIALS."
        },
        "OAuth2ClientApplication": {
          "$ref": "#/$defs/OAuth2ClientApplication"
        },
        "TokenUrl": {
          "type": "string",
          "description": "The URL of the provider's authentication server, to exchange an authorization code for an access token."
        },
        "TokenUrlParametersMap": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A map of parameters that are added to the token GET request."
        },
        "AuthorizationCodeProperties": {
          "$ref": "#/$defs/AuthorizationCodeProperties"
        },
        "OAuth2Credentials": {
          "$ref": "#/$defs/OAuth2Credentials"
        }
      }
    },
    "PhysicalConnectionRequirements": {
      "type": "object",
      "properties": {
        "SubnetId": {
          "type": "string",
          "description": "The subnet ID used by the connection."
        },
        "SecurityGroupIdList": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The security group ID list used by the connection."
        },
        "AvailabilityZone": {
          "type": "string",
          "description": "The connection's Availability Zone."
        }
      }
    }
  }
}