{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-eventbridge/json-schema/amazon-eventbridge-create-connection-request-schema.json",
  "title": "CreateConnectionRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-eventbridge-connection-api-openapi.yml#/components/schemas/CreateConnectionRequest",
  "type": "object",
  "properties": {
    "Name": {
      "type": "string",
      "description": "The name for the connection to create."
    },
    "Description": {
      "type": "string",
      "description": "A description for the connection to create."
    },
    "AuthorizationType": {
      "type": "string",
      "enum": [
        "BASIC",
        "OAUTH_CLIENT_CREDENTIALS",
        "API_KEY"
      ],
      "description": "The type of authorization to use for the connection. OAUTH tokens are refreshed when a 401 or 407 response is returned."
    },
    "AuthParameters": {
      "$ref": "#/$defs/CreateConnectionAuthRequestParameters"
    },
    "InvocationConnectivityParameters": {
      "$ref": "#/$defs/ConnectivityResourceParameters"
    },
    "KmsKeyIdentifier": {
      "type": "string",
      "description": "The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this connection. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN. If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection. For more information, see Identify and view keys in the Key Management Service Developer Guide."
    }
  },
  "required": [
    "Name",
    "AuthorizationType",
    "AuthParameters"
  ],
  "$defs": {
    "ConnectionBodyParameter": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key for the parameter."
        },
        "Value": {
          "type": "string",
          "description": "The value associated with the key."
        },
        "IsValueSecret": {
          "type": "boolean",
          "description": "Specifies whether the value is secret."
        }
      }
    },
    "ConnectionHeaderParameter": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key for the parameter."
        },
        "Value": {
          "type": "string",
          "description": "The value associated with the key."
        },
        "IsValueSecret": {
          "type": "boolean",
          "description": "Specifies whether the value is a secret."
        }
      }
    },
    "ConnectionHttpParameters": {
      "type": "object",
      "properties": {
        "HeaderParameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ConnectionHeaderParameter"
          },
          "description": "Any additional header parameters for the connection."
        },
        "QueryStringParameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ConnectionQueryStringParameter"
          },
          "description": "Any additional query string parameters for the connection."
        },
        "BodyParameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ConnectionBodyParameter"
          },
          "description": "Any additional body string parameters for the connection."
        }
      }
    },
    "ConnectionQueryStringParameter": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key for a query string parameter."
        },
        "Value": {
          "type": "string",
          "description": "The value associated with the key for the query string parameter."
        },
        "IsValueSecret": {
          "type": "boolean",
          "description": "Specifies whether the value is secret."
        }
      }
    },
    "ConnectivityResourceConfigurationArn": {
      "type": "object",
      "properties": {
        "ResourceConfigurationArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon VPC Lattice resource configuration for the resource endpoint."
        }
      },
      "required": [
        "ResourceConfigurationArn"
      ]
    },
    "ConnectivityResourceParameters": {
      "type": "object",
      "properties": {
        "ResourceParameters": {
          "$ref": "#/$defs/ConnectivityResourceConfigurationArn"
        }
      },
      "required": [
        "ResourceParameters"
      ]
    },
    "CreateConnectionApiKeyAuthRequestParameters": {
      "type": "object",
      "properties": {
        "ApiKeyName": {
          "type": "string",
          "description": "The name of the API key to use for authorization."
        },
        "ApiKeyValue": {
          "type": "string",
          "description": "The value for the API key to use for authorization."
        }
      },
      "required": [
        "ApiKeyName",
        "ApiKeyValue"
      ]
    },
    "CreateConnectionAuthRequestParameters": {
      "type": "object",
      "properties": {
        "BasicAuthParameters": {
          "$ref": "#/$defs/CreateConnectionBasicAuthRequestParameters"
        },
        "OAuthParameters": {
          "$ref": "#/$defs/CreateConnectionOAuthRequestParameters"
        },
        "ApiKeyAuthParameters": {
          "$ref": "#/$defs/CreateConnectionApiKeyAuthRequestParameters"
        },
        "InvocationHttpParameters": {
          "$ref": "#/$defs/ConnectionHttpParameters"
        },
        "ConnectivityParameters": {
          "$ref": "#/$defs/ConnectivityResourceParameters"
        }
      }
    },
    "CreateConnectionBasicAuthRequestParameters": {
      "type": "object",
      "properties": {
        "Username": {
          "type": "string",
          "description": "The user name to use for Basic authorization."
        },
        "Password": {
          "type": "string",
          "description": "The password associated with the user name to use for Basic authorization."
        }
      },
      "required": [
        "Username",
        "Password"
      ]
    },
    "CreateConnectionOAuthClientRequestParameters": {
      "type": "object",
      "properties": {
        "ClientID": {
          "type": "string",
          "description": "The client ID to use for OAuth authorization for the connection."
        },
        "ClientSecret": {
          "type": "string",
          "description": "The client secret associated with the client ID to use for OAuth authorization for the connection."
        }
      },
      "required": [
        "ClientID",
        "ClientSecret"
      ]
    },
    "CreateConnectionOAuthRequestParameters": {
      "type": "object",
      "properties": {
        "ClientParameters": {
          "$ref": "#/$defs/CreateConnectionOAuthClientRequestParameters"
        },
        "AuthorizationEndpoint": {
          "type": "string",
          "description": "The URL to the authorization endpoint when OAuth is specified as the authorization type."
        },
        "HttpMethod": {
          "type": "string",
          "enum": [
            "GET",
            "POST",
            "PUT"
          ],
          "description": "The method to use for the authorization request."
        },
        "OAuthHttpParameters": {
          "$ref": "#/$defs/ConnectionHttpParameters"
        }
      },
      "required": [
        "ClientParameters",
        "AuthorizationEndpoint",
        "HttpMethod"
      ]
    }
  }
}