{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-datazone/json-schema/amazon-datazone-create-subscription-request-output-schema.json",
  "title": "CreateSubscriptionRequestOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-datazone-subscription-requests-api-openapi.yml#/components/schemas/CreateSubscriptionRequestOutput",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the subscription request."
    },
    "createdBy": {
      "type": "string",
      "description": "The Amazon DataZone user who created the subscription request."
    },
    "updatedBy": {
      "type": "string",
      "description": "The Amazon DataZone user who updated the subscription request."
    },
    "domainId": {
      "type": "string",
      "description": "The ID of the Amazon DataZone domain in whcih the subscription request is created."
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "ACCEPTED",
        "REJECTED"
      ],
      "description": "The status of the subscription request."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "A timestamp of when the subscription request is created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp of when the subscription request was updated."
    },
    "requestReason": {
      "type": "string",
      "description": "The reason for the subscription request."
    },
    "subscribedPrincipals": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SubscribedPrincipal"
      },
      "description": "The subscribed principals of the subscription request."
    },
    "subscribedListings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SubscribedListing"
      },
      "description": "The published asset for which the subscription grant is to be created."
    },
    "reviewerId": {
      "type": "string",
      "description": "The ID of the reviewer of the subscription request."
    },
    "decisionComment": {
      "type": "string",
      "description": "The decision comment of the subscription request."
    },
    "existingSubscriptionId": {
      "type": "string",
      "description": "The ID of the existing subscription."
    },
    "metadataForms": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FormOutput"
      },
      "description": "The metadata form included in the subscription request."
    }
  },
  "required": [
    "id",
    "createdBy",
    "domainId",
    "status",
    "createdAt",
    "updatedAt",
    "requestReason",
    "subscribedPrincipals",
    "subscribedListings"
  ],
  "$defs": {
    "AssetInDataProductListingItem": {
      "type": "object",
      "properties": {
        "entityId": {
          "type": "string",
          "description": "The entity ID of the listing of the asset in a data product."
        },
        "entityRevision": {
          "type": "string",
          "description": "The entity revision of the listing of the asset in a data product."
        },
        "entityType": {
          "type": "string",
          "description": "The entity type of the listing of the asset in a data product."
        }
      }
    },
    "AssetScope": {
      "type": "object",
      "properties": {
        "assetId": {
          "type": "string",
          "description": "The asset ID of the asset scope."
        },
        "filterIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The filter IDs of the asset scope."
        },
        "status": {
          "type": "string",
          "description": "The status of the asset scope."
        },
        "scopeName": {
          "type": "string",
          "description": "The name of the materialized asset scope."
        },
        "errorMessage": {
          "type": "string",
          "description": "The error message of the asset scope."
        }
      },
      "required": [
        "assetId",
        "filterIds",
        "status"
      ]
    },
    "DetailedGlossaryTerm": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of a glossary term attached to the inventory asset."
        },
        "shortDescription": {
          "type": "string",
          "description": "The shoft description of a glossary term attached to the inventory asset."
        }
      }
    },
    "FormOutput": {
      "type": "object",
      "properties": {
        "formName": {
          "type": "string",
          "description": "The name of the metadata form."
        },
        "typeName": {
          "type": "string",
          "description": "The name of the metadata form type."
        },
        "typeRevision": {
          "type": "string",
          "description": "The revision of the metadata form type."
        },
        "content": {
          "type": "string",
          "description": "The content of the metadata form."
        }
      },
      "required": [
        "formName"
      ]
    },
    "IamUserProfileDetails": {
      "type": "object",
      "properties": {
        "arn": {
          "type": "string",
          "description": "The ARN of the IAM user."
        },
        "principalId": {
          "type": "string",
          "description": "The principal ID as part of the IAM user profile details."
        },
        "sessionName": {
          "type": "string",
          "description": "The session name for IAM role sessions."
        },
        "groupProfileId": {
          "type": "string",
          "description": "The identifier of the group profile associated with the IAM user profile. This links the user to a specific group profile within the Amazon DataZone domain."
        }
      }
    },
    "Permissions": {
      "type": "object",
      "properties": {
        "s3": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "READ",
              "WRITE"
            ]
          },
          "description": "The S3 details of the asset permissions."
        }
      },
      "description": "Exactly one member is set."
    },
    "SsoUserProfileDetails": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "The username as part of the SSO user profile detail."
        },
        "firstName": {
          "type": "string",
          "description": "The first name as part of the SSO user profile detail."
        },
        "lastName": {
          "type": "string",
          "description": "The last name as part of the SSO user profile detail."
        }
      }
    },
    "SubscribedAssetListing": {
      "type": "object",
      "properties": {
        "entityId": {
          "type": "string",
          "description": "The identifier of the published asset for which the subscription grant is created."
        },
        "entityRevision": {
          "type": "string",
          "description": "The revision of the published asset for which the subscription grant is created."
        },
        "entityType": {
          "type": "string",
          "description": "The type of the published asset for which the subscription grant is created."
        },
        "forms": {
          "type": "string",
          "description": "The forms attached to the published asset for which the subscription grant is created."
        },
        "glossaryTerms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DetailedGlossaryTerm"
          },
          "description": "The glossary terms attached to the published asset for which the subscription grant is created."
        },
        "assetScope": {
          "$ref": "#/$defs/AssetScope"
        },
        "permissions": {
          "$ref": "#/$defs/Permissions"
        }
      }
    },
    "SubscribedGroup": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the subscribed group."
        },
        "name": {
          "type": "string",
          "description": "The name of the subscribed group."
        }
      }
    },
    "SubscribedIamPrincipal": {
      "type": "object",
      "properties": {
        "principalArn": {
          "type": "string",
          "description": "The ARN of the subscribed IAM principal."
        }
      }
    },
    "SubscribedListing": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the published asset for which the subscription grant is created."
        },
        "revision": {
          "type": "string",
          "description": "The revision of the published asset for which the subscription grant is created."
        },
        "name": {
          "type": "string",
          "description": "The name of the published asset for which the subscription grant is created."
        },
        "description": {
          "type": "string",
          "description": "The description of the published asset for which the subscription grant is created."
        },
        "item": {
          "$ref": "#/$defs/SubscribedListingItem"
        },
        "ownerProjectId": {
          "type": "string",
          "description": "The identifier of the project of the published asset for which the subscription grant is created."
        },
        "ownerProjectName": {
          "type": "string",
          "description": "The name of the project that owns the published asset for which the subscription grant is created."
        }
      },
      "required": [
        "id",
        "name",
        "description",
        "item",
        "ownerProjectId"
      ]
    },
    "SubscribedListingItem": {
      "type": "object",
      "properties": {
        "assetListing": {
          "$ref": "#/$defs/SubscribedAssetListing"
        },
        "productListing": {
          "$ref": "#/$defs/SubscribedProductListing"
        }
      },
      "description": "Exactly one member is set."
    },
    "SubscribedPrincipal": {
      "type": "object",
      "properties": {
        "project": {
          "$ref": "#/$defs/SubscribedProject"
        },
        "user": {
          "$ref": "#/$defs/SubscribedUser"
        },
        "group": {
          "$ref": "#/$defs/SubscribedGroup"
        },
        "iam": {
          "$ref": "#/$defs/SubscribedIamPrincipal"
        }
      },
      "description": "Exactly one member is set."
    },
    "SubscribedProductListing": {
      "type": "object",
      "properties": {
        "entityId": {
          "type": "string",
          "description": "The ID of the data product listing."
        },
        "entityRevision": {
          "type": "string",
          "description": "The revision of the data product listing."
        },
        "glossaryTerms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DetailedGlossaryTerm"
          },
          "description": "The glossary terms of the data product listing."
        },
        "name": {
          "type": "string",
          "description": "The name of the data product listing."
        },
        "description": {
          "type": "string",
          "description": "The description of the data product listing."
        },
        "assetListings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssetInDataProductListingItem"
          },
          "description": "The data assets of the data product listing."
        }
      }
    },
    "SubscribedProject": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the project that has the subscription grant."
        },
        "name": {
          "type": "string",
          "description": "The name of the project that has the subscription grant."
        }
      }
    },
    "SubscribedUser": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the subscribed user."
        },
        "details": {
          "$ref": "#/$defs/UserProfileDetails"
        }
      }
    },
    "UserProfileDetails": {
      "type": "object",
      "properties": {
        "iam": {
          "$ref": "#/$defs/IamUserProfileDetails"
        },
        "sso": {
          "$ref": "#/$defs/SsoUserProfileDetails"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}