{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-license-manager/json-schema/amazon-license-manager-create-grant-request-schema.json",
  "title": "CreateGrantRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-license-manager-grant-api-openapi.yml#/components/schemas/CreateGrantRequest",
  "type": "object",
  "properties": {
    "ClientToken": {
      "type": "string",
      "description": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the request."
    },
    "GrantName": {
      "type": "string",
      "description": "Grant name."
    },
    "LicenseArn": {
      "type": "string",
      "description": "Amazon Resource Name (ARN) of the license."
    },
    "Principals": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The grant principals. You can specify one of the following as an Amazon Resource Name (ARN): An Amazon Web Services account, which includes only the account specified. An organizational unit (OU), which includes all accounts in the OU. An organization, which will include all accounts across your organization."
    },
    "HomeRegion": {
      "type": "string",
      "description": "Home Region of the grant."
    },
    "AllowedOperations": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "CreateGrant",
          "CheckoutLicense",
          "CheckoutBorrowLicense",
          "CheckInLicense",
          "ExtendConsumptionLicense",
          "ListPurchasedLicenses",
          "CreateToken",
          "ListReceivedLicenses"
        ]
      },
      "description": "Allowed operations for the grant."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "Tags to add to the grant. For more information about tagging support in License Manager, see the TagResource operation."
    },
    "GrantType": {
      "type": "string",
      "enum": [
        "BuyerGrant",
        "DelegateGrant"
      ],
      "description": "The type of grant to create. For more information about each type, see the preceding description of this operation. Valid values: BuyerGrant - The default grant type if you don't specify a value. Conveys the entitlement to use the license. DelegateGrant - Gives the grantee read-only visibility into the licenses and grants that you have distributed to buyers, with no entitlement to use them."
    },
    "Options": {
      "$ref": "#/$defs/Options"
    }
  },
  "required": [
    "ClientToken",
    "GrantName",
    "LicenseArn",
    "Principals",
    "HomeRegion",
    "AllowedOperations"
  ],
  "$defs": {
    "Options": {
      "type": "object",
      "properties": {
        "ActivationOverrideBehavior": {
          "type": "string",
          "enum": [
            "DISTRIBUTED_GRANTS_ONLY",
            "ALL_GRANTS_PERMITTED_BY_ISSUER"
          ],
          "description": "An activation option for your grant that determines the behavior of activating a grant. Activation options can only be used with granted licenses sourced from the Amazon Web Services Marketplace. Additionally, the operation must activate the grant. For the CreateGrantVersion operation, specify ACTIVE for the Status parameter. For the CreateGrant operation, specify ACTIVE for the DesiredStatus option. As a license administrator, you can optionally specify an ActivationOverrideBehavior when activating a grant. As a grantor, you can optionally specify an ActivationOverrideBehavior when you activa"
        },
        "DesiredStatus": {
          "type": "string",
          "enum": [
            "PENDING_WORKFLOW",
            "PENDING_ACCEPT",
            "REJECTED",
            "ACTIVE",
            "FAILED_WORKFLOW",
            "DELETED",
            "PENDING_DELETE",
            "DISABLED",
            "WORKFLOW_COMPLETED"
          ],
          "description": "The status of the grant after License Manager creates it. The only supported value is ACTIVE. Specify ACTIVE to create and activate the grant in one request. You can specify this option only for the CreateGrant operation, and only when the grant principal is an organization or an organizational unit (OU). To change the status of an existing grant, use the Status parameter of the CreateGrantVersion operation."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The tag key."
        },
        "Value": {
          "type": "string",
          "description": "The tag value."
        }
      }
    }
  }
}