{
  "typeName" : "AWS::DataZone::SubscriptionTarget",
  "description" : "Subscription targets enables one to access the data to which you have subscribed in your projects.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-datazone",
  "definitions" : {
    "SubscriptionTargetForm" : {
      "type" : "object",
      "description" : "The details of the subscription target configuration.",
      "properties" : {
        "FormName" : {
          "type" : "string",
          "description" : "The form name included in the subscription target configuration.",
          "maxLength" : 128,
          "minLength" : 1,
          "pattern" : "^(?![0-9_])\\w+$|^_\\w*[a-zA-Z0-9]\\w*$"
        },
        "Content" : {
          "type" : "string",
          "description" : "The content of the subscription target configuration."
        }
      },
      "required" : [ "Content", "FormName" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "ApplicableAssetTypes" : {
      "type" : "array",
      "description" : "The asset types that can be included in the subscription target.",
      "insertionOrder" : false,
      "items" : {
        "type" : "string",
        "maxLength" : 256,
        "minLength" : 1,
        "pattern" : "^[^\\.]*"
      }
    },
    "AuthorizedPrincipals" : {
      "type" : "array",
      "description" : "The authorized principals of the subscription target.",
      "insertionOrder" : false,
      "items" : {
        "type" : "string",
        "pattern" : "^[a-zA-Z0-9:/_-]*$"
      },
      "maxItems" : 10,
      "minItems" : 1
    },
    "CreatedAt" : {
      "type" : "string",
      "description" : "The timestamp of when the subscription target was created.",
      "format" : "date-time"
    },
    "CreatedBy" : {
      "type" : "string",
      "description" : "The Amazon DataZone user who created the subscription target."
    },
    "DomainId" : {
      "type" : "string",
      "description" : "The ID of the Amazon DataZone domain in which subscription target is created.",
      "pattern" : "^dzd[-_][a-zA-Z0-9_-]{1,36}$"
    },
    "DomainIdentifier" : {
      "type" : "string",
      "description" : "The ID of the Amazon DataZone domain in which subscription target would be created.",
      "pattern" : "^dzd[-_][a-zA-Z0-9_-]{1,36}$"
    },
    "EnvironmentId" : {
      "type" : "string",
      "description" : "The ID of the environment in which subscription target is created.",
      "pattern" : "^[a-zA-Z0-9_-]{1,36}$"
    },
    "EnvironmentIdentifier" : {
      "type" : "string",
      "description" : "The ID of the environment in which subscription target would be created.",
      "pattern" : "^[a-zA-Z0-9_-]{1,36}$"
    },
    "Id" : {
      "type" : "string",
      "description" : "The ID of the subscription target.",
      "pattern" : "^[a-zA-Z0-9_-]{1,36}$"
    },
    "ManageAccessRole" : {
      "type" : "string",
      "description" : "The manage access role that is used to create the subscription target."
    },
    "Name" : {
      "type" : "string",
      "description" : "The name of the subscription target.",
      "maxLength" : 256,
      "minLength" : 1
    },
    "ProjectId" : {
      "type" : "string",
      "description" : "The identifier of the project specified in the subscription target.",
      "pattern" : "^[a-zA-Z0-9_-]{1,36}$"
    },
    "Provider" : {
      "type" : "string",
      "description" : "The provider of the subscription target."
    },
    "SubscriptionTargetConfig" : {
      "type" : "array",
      "description" : "The configuration of the subscription target.",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/SubscriptionTargetForm"
      }
    },
    "Type" : {
      "type" : "string",
      "description" : "The type of the subscription target."
    },
    "UpdatedAt" : {
      "type" : "string",
      "description" : "The timestamp of when the subscription target was updated.",
      "format" : "date-time"
    },
    "UpdatedBy" : {
      "type" : "string",
      "description" : "The Amazon DataZone user who updated the subscription target."
    }
  },
  "required" : [ "ApplicableAssetTypes", "AuthorizedPrincipals", "DomainIdentifier", "EnvironmentIdentifier", "Name", "SubscriptionTargetConfig", "Type" ],
  "readOnlyProperties" : [ "/properties/CreatedAt", "/properties/CreatedBy", "/properties/DomainId", "/properties/EnvironmentId", "/properties/Id", "/properties/ProjectId", "/properties/UpdatedAt", "/properties/UpdatedBy" ],
  "createOnlyProperties" : [ "/properties/Type", "/properties/DomainIdentifier", "/properties/EnvironmentIdentifier" ],
  "writeOnlyProperties" : [ "/properties/DomainIdentifier", "/properties/EnvironmentIdentifier" ],
  "primaryIdentifier" : [ "/properties/DomainId", "/properties/EnvironmentId", "/properties/Id" ],
  "tagging" : {
    "taggable" : false,
    "tagOnCreate" : false,
    "tagUpdatable" : false,
    "cloudFormationSystemTags" : false
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "datazone:CreateSubscriptionTarget", "datazone:GetSubscriptionTarget", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "datazone:GetSubscriptionTarget" ]
    },
    "update" : {
      "permissions" : [ "datazone:UpdateSubscriptionTarget", "datazone:GetSubscriptionTarget", "iam:PassRole" ]
    },
    "delete" : {
      "permissions" : [ "datazone:DeleteSubscriptionTarget" ]
    },
    "list" : {
      "handlerSchema" : {
        "properties" : {
          "DomainIdentifier" : {
            "$ref" : "resource-schema.json#/properties/DomainIdentifier"
          },
          "EnvironmentIdentifier" : {
            "$ref" : "resource-schema.json#/properties/EnvironmentIdentifier"
          }
        },
        "required" : [ "DomainIdentifier" ]
      },
      "permissions" : [ "datazone:ListSubscriptionTargets" ]
    }
  },
  "additionalProperties" : false
}