{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-datazone/json-schema/amazon-datazone-list-subscription-grants-output-schema.json",
  "title": "ListSubscriptionGrantsOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-datazone-subscription-grants-api-openapi.yml#/components/schemas/ListSubscriptionGrantsOutput",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SubscriptionGrantSummary"
      },
      "description": "The results of the ListSubscriptionGrants action."
    },
    "nextToken": {
      "type": "string",
      "description": "When the number of subscription grants is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of subscription grants, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListSubscriptionGrants to list the next set of subscription grants."
    }
  },
  "required": [
    "items"
  ],
  "$defs": {
    "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"
      ]
    },
    "FailureCause": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "The description of the error message."
        }
      }
    },
    "GrantedEntity": {
      "type": "object",
      "properties": {
        "listing": {
          "$ref": "#/$defs/ListingRevision"
        }
      },
      "description": "Exactly one member is set."
    },
    "ListingRevision": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "An identifier of a revision of an asset published in a Amazon DataZone catalog."
        },
        "revision": {
          "type": "string",
          "description": "The details of a revision of an asset published in a Amazon DataZone catalog."
        }
      },
      "required": [
        "id",
        "revision"
      ]
    },
    "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."
    },
    "SubscribedAsset": {
      "type": "object",
      "properties": {
        "assetId": {
          "type": "string",
          "description": "The identifier of the asset for which the subscription grant is created."
        },
        "assetRevision": {
          "type": "string",
          "description": "The revision of the asset for which the subscription grant is created."
        },
        "status": {
          "type": "string",
          "enum": [
            "GRANT_PENDING",
            "REVOKE_PENDING",
            "GRANT_IN_PROGRESS",
            "REVOKE_IN_PROGRESS",
            "GRANTED",
            "REVOKED",
            "GRANT_FAILED",
            "REVOKE_FAILED"
          ],
          "description": "The status of the asset for which the subscription grant is created."
        },
        "targetName": {
          "type": "string",
          "description": "The target name of the asset for which the subscription grant is created."
        },
        "failureCause": {
          "$ref": "#/$defs/FailureCause"
        },
        "grantedTimestamp": {
          "type": "string",
          "description": "The timestamp of when the subscription grant to the asset is created."
        },
        "failureTimestamp": {
          "type": "string",
          "description": "The failure timestamp included in the details of the asset for which the subscription grant is created."
        },
        "assetScope": {
          "$ref": "#/$defs/AssetScope"
        },
        "permissions": {
          "$ref": "#/$defs/Permissions"
        }
      },
      "required": [
        "assetId",
        "assetRevision",
        "status"
      ]
    },
    "SubscriptionGrantSummary": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the subscription grant."
        },
        "createdBy": {
          "type": "string",
          "description": "The datazone user who created the subscription grant."
        },
        "updatedBy": {
          "type": "string",
          "description": "The Amazon DataZone user who updated the subscription grant."
        },
        "domainId": {
          "type": "string",
          "description": "The identifier of the Amazon DataZone domain in which a subscription grant exists."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of when a subscription grant was created."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of when the subscription grant was updated."
        },
        "environmentId": {
          "type": "string",
          "description": "The environment ID of the subscription grant."
        },
        "subscriptionTargetId": {
          "type": "string",
          "description": "The identifier of the target of the subscription grant."
        },
        "grantedEntity": {
          "$ref": "#/$defs/GrantedEntity"
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "IN_PROGRESS",
            "GRANT_FAILED",
            "REVOKE_FAILED",
            "GRANT_AND_REVOKE_FAILED",
            "COMPLETED",
            "INACCESSIBLE"
          ],
          "description": "The status of the subscription grant."
        },
        "assets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubscribedAsset"
          },
          "description": "The assets included in the subscription grant."
        },
        "subscriptionId": {
          "type": "string",
          "description": "The ID of the subscription."
        }
      },
      "required": [
        "id",
        "createdBy",
        "domainId",
        "createdAt",
        "updatedAt",
        "subscriptionTargetId",
        "grantedEntity",
        "status"
      ]
    }
  }
}