{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-eventbridge/json-schema/amazon-eventbridge-put-permission-request-schema.json",
  "title": "PutPermissionRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-eventbridge-operations-api-openapi.yml#/components/schemas/PutPermissionRequest",
  "type": "object",
  "properties": {
    "EventBusName": {
      "type": "string",
      "description": "The name of the event bus associated with the rule. If you omit this, the default event bus is used."
    },
    "Action": {
      "type": "string",
      "description": "The action that you are enabling the other account to perform."
    },
    "Principal": {
      "type": "string",
      "description": "The 12-digit Amazon Web Services account ID that you are permitting to put events to your default event bus. Specify \"*\" to permit any account to put events to your default event bus. If you specify \"*\" without specifying Condition, avoid creating rules that may match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an account field with a specific account ID from which to receive events. Rules with an account field do not match any events sent from other accounts."
    },
    "StatementId": {
      "type": "string",
      "description": "An identifier string for the external account that you are granting permissions to. If you later want to revoke the permission for this external account, specify this StatementId when you run RemovePermission. Each StatementId must be unique."
    },
    "Condition": {
      "$ref": "#/$defs/Condition"
    },
    "Policy": {
      "type": "string",
      "description": "A JSON string that describes the permission policy statement. You can include a Policy parameter in the request instead of using the StatementId, Action, Principal, or Condition parameters."
    }
  },
  "$defs": {
    "Condition": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "description": "Specifies the type of condition. Currently the only supported value is StringEquals."
        },
        "Key": {
          "type": "string",
          "description": "Specifies the key for the condition. Currently the only supported key is aws:PrincipalOrgID."
        },
        "Value": {
          "type": "string",
          "description": "Specifies the value for the key. Currently, this must be the ID of the organization."
        }
      },
      "required": [
        "Type",
        "Key",
        "Value"
      ]
    }
  }
}