{
  "typeName" : "AWS::MediaLive::SignalMap",
  "description" : "Definition of AWS::MediaLive::SignalMap Resource Type",
  "definitions" : {
    "FailedMediaResourceMap" : {
      "type" : "object",
      "description" : "A map representing an incomplete AWS media workflow as a graph.",
      "patternProperties" : {
        ".+" : {
          "$ref" : "#/definitions/MediaResource"
        }
      },
      "additionalProperties" : false
    },
    "MediaResource" : {
      "type" : "object",
      "description" : "An AWS resource used in media workflows.",
      "properties" : {
        "Destinations" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/MediaResourceNeighbor"
          }
        },
        "Name" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 0,
          "description" : "The logical name of an AWS media resource."
        },
        "Sources" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/MediaResourceNeighbor"
          }
        }
      },
      "additionalProperties" : false
    },
    "MediaResourceMap" : {
      "type" : "object",
      "description" : "A map representing an AWS media workflow as a graph.",
      "patternProperties" : {
        ".+" : {
          "$ref" : "#/definitions/MediaResource"
        }
      },
      "additionalProperties" : false
    },
    "MediaResourceNeighbor" : {
      "type" : "object",
      "description" : "A direct source or destination neighbor to an AWS media resource.",
      "properties" : {
        "Arn" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 1,
          "pattern" : "^arn.+$",
          "description" : "The ARN of a resource used in AWS media workflows."
        },
        "Name" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 0,
          "description" : "The logical name of an AWS media resource."
        }
      },
      "required" : [ "Arn" ],
      "additionalProperties" : false
    },
    "MonitorDeployment" : {
      "type" : "object",
      "description" : "Represents the latest monitor deployment of a signal map.",
      "properties" : {
        "DetailsUri" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 0,
          "description" : "URI associated with a signal map's monitor deployment."
        },
        "ErrorMessage" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 0,
          "description" : "Error message associated with a failed monitor deployment of a signal map."
        },
        "Status" : {
          "$ref" : "#/definitions/SignalMapMonitorDeploymentStatus"
        }
      },
      "required" : [ "Status" ],
      "additionalProperties" : false
    },
    "SignalMapMonitorDeploymentStatus" : {
      "type" : "string",
      "description" : "A signal map's monitor deployment status.",
      "enum" : [ "NOT_DEPLOYED", "DRY_RUN_DEPLOYMENT_COMPLETE", "DRY_RUN_DEPLOYMENT_FAILED", "DRY_RUN_DEPLOYMENT_IN_PROGRESS", "DEPLOYMENT_COMPLETE", "DEPLOYMENT_FAILED", "DEPLOYMENT_IN_PROGRESS", "DELETE_COMPLETE", "DELETE_FAILED", "DELETE_IN_PROGRESS" ]
    },
    "SignalMapStatus" : {
      "type" : "string",
      "description" : "A signal map's current status which is dependent on its lifecycle actions or associated jobs.",
      "enum" : [ "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "CREATE_FAILED", "UPDATE_IN_PROGRESS", "UPDATE_COMPLETE", "UPDATE_REVERTED", "UPDATE_FAILED", "READY", "NOT_READY" ]
    },
    "SuccessfulMonitorDeployment" : {
      "type" : "object",
      "description" : "Represents the latest successful monitor deployment of a signal map.",
      "properties" : {
        "DetailsUri" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 0,
          "description" : "URI associated with a signal map's monitor deployment."
        },
        "Status" : {
          "$ref" : "#/definitions/SignalMapMonitorDeploymentStatus"
        }
      },
      "required" : [ "DetailsUri", "Status" ],
      "additionalProperties" : false
    },
    "TagMap" : {
      "type" : "object",
      "description" : "Represents the tags associated with a resource.",
      "patternProperties" : {
        ".+" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    },
    "Unit" : {
      "type" : "object",
      "additionalProperties" : false
    }
  },
  "properties" : {
    "Arn" : {
      "type" : "string",
      "pattern" : "^arn:.+:medialive:.+:signal-map:.+$",
      "description" : "A signal map's ARN (Amazon Resource Name)"
    },
    "CloudWatchAlarmTemplateGroupIdentifiers" : {
      "type" : "array",
      "items" : {
        "type" : "string",
        "pattern" : "^[^\\s]+$"
      }
    },
    "CloudWatchAlarmTemplateGroupIds" : {
      "type" : "array",
      "items" : {
        "type" : "string",
        "maxLength" : 11,
        "minLength" : 7,
        "pattern" : "^(aws-)?[0-9]{7}$"
      }
    },
    "CreatedAt" : {
      "type" : "string",
      "format" : "date-time"
    },
    "Description" : {
      "type" : "string",
      "maxLength" : 1024,
      "minLength" : 0,
      "description" : "A resource's optional description."
    },
    "DiscoveryEntryPointArn" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 1,
      "description" : "A top-level supported AWS resource ARN to discovery a signal map from."
    },
    "ErrorMessage" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 0,
      "description" : "Error message associated with a failed creation or failed update attempt of a signal map."
    },
    "EventBridgeRuleTemplateGroupIdentifiers" : {
      "type" : "array",
      "items" : {
        "type" : "string",
        "pattern" : "^[^\\s]+$"
      }
    },
    "EventBridgeRuleTemplateGroupIds" : {
      "type" : "array",
      "items" : {
        "type" : "string",
        "maxLength" : 11,
        "minLength" : 7,
        "pattern" : "^(aws-)?[0-9]{7}$"
      }
    },
    "FailedMediaResourceMap" : {
      "$ref" : "#/definitions/FailedMediaResourceMap"
    },
    "ForceRediscovery" : {
      "type" : "boolean",
      "default" : false,
      "description" : "If true, will force a rediscovery of a signal map if an unchanged discoveryEntryPointArn is provided."
    },
    "Id" : {
      "type" : "string",
      "maxLength" : 11,
      "minLength" : 7,
      "pattern" : "^(aws-)?[0-9]{7}$",
      "description" : "A signal map's id."
    },
    "Identifier" : {
      "type" : "string"
    },
    "LastDiscoveredAt" : {
      "type" : "string",
      "format" : "date-time"
    },
    "LastSuccessfulMonitorDeployment" : {
      "$ref" : "#/definitions/SuccessfulMonitorDeployment"
    },
    "MediaResourceMap" : {
      "$ref" : "#/definitions/MediaResourceMap"
    },
    "ModifiedAt" : {
      "type" : "string",
      "format" : "date-time"
    },
    "MonitorChangesPendingDeployment" : {
      "type" : "boolean",
      "default" : false,
      "description" : "If true, there are pending monitor changes for this signal map that can be deployed."
    },
    "MonitorDeployment" : {
      "$ref" : "#/definitions/MonitorDeployment"
    },
    "Name" : {
      "type" : "string",
      "maxLength" : 255,
      "minLength" : 1,
      "pattern" : "^[^\\s]+$",
      "description" : "A resource's name. Names must be unique within the scope of a resource type in a specific region."
    },
    "Status" : {
      "$ref" : "#/definitions/SignalMapStatus"
    },
    "Tags" : {
      "$ref" : "#/definitions/TagMap"
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "medialive:CreateTags", "medialive:DeleteTags" ]
  },
  "required" : [ "DiscoveryEntryPointArn", "Name" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/CloudWatchAlarmTemplateGroupIds", "/properties/CreatedAt", "/properties/ErrorMessage", "/properties/EventBridgeRuleTemplateGroupIds", "/properties/FailedMediaResourceMap", "/properties/Id", "/properties/Identifier", "/properties/LastDiscoveredAt", "/properties/LastSuccessfulMonitorDeployment", "/properties/MediaResourceMap", "/properties/ModifiedAt", "/properties/MonitorChangesPendingDeployment", "/properties/MonitorDeployment", "/properties/Status" ],
  "writeOnlyProperties" : [ "/properties/CloudWatchAlarmTemplateGroupIdentifiers", "/properties/EventBridgeRuleTemplateGroupIdentifiers", "/properties/ForceRediscovery" ],
  "createOnlyProperties" : [ "/properties/Tags" ],
  "primaryIdentifier" : [ "/properties/Identifier" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "medialive:CreateSignalMap", "medialive:GetSignalMap", "medialive:CreateTags", "medialive:DescribeChannel", "medialive:DescribeInput", "medialive:DescribeInputDevice", "medialive:DescribeInputSecurityGroup", "medialive:DescribeMultiplex", "medialive:DescribeMultiplexProgram", "medialive:ListChannels", "medialive:ListInputDevices", "medialive:ListInputSecurityGroups", "medialive:ListInputs", "medialive:ListMultiplexPrograms", "medialive:ListMultiplexes", "medialive:ListOfferings", "medialive:ListReservations", "medialive:ListTagsForResource", "cloudfront:ListDistributions", "cloudfront:GetDistribution", "ec2:DescribeNetworkInterfaces", "mediaconnect:ListEntitlements", "mediaconnect:ListFlows", "mediaconnect:ListOfferings", "mediaconnect:ListReservations", "mediaconnect:DescribeFlow", "mediapackage:ListChannels", "mediapackage:ListOriginEndpoints", "mediapackage:DescribeChannel", "mediapackage:DescribeOriginEndpoint", "mediapackagev2:ListChannelGroups", "mediapackagev2:ListChannels", "mediapackagev2:ListOriginEndpoints", "mediapackagev2:GetChannelGroup", "mediapackagev2:GetChannel", "mediapackagev2:GetOriginEndpoint", "tag:GetResources" ]
    },
    "read" : {
      "permissions" : [ "medialive:GetSignalMap", "tag:GetResources" ]
    },
    "update" : {
      "permissions" : [ "medialive:StartUpdateSignalMap", "medialive:GetSignalMap", "medialive:CreateTags", "medialive:DeleteTags", "medialive:DescribeChannel", "medialive:DescribeInput", "medialive:DescribeInputDevice", "medialive:DescribeInputSecurityGroup", "medialive:DescribeMultiplex", "medialive:DescribeMultiplexProgram", "medialive:ListChannels", "medialive:ListInputDevices", "medialive:ListInputSecurityGroups", "medialive:ListInputs", "medialive:ListMultiplexPrograms", "medialive:ListMultiplexes", "medialive:ListOfferings", "medialive:ListReservations", "medialive:ListTagsForResource", "cloudfront:ListDistributions", "cloudfront:GetDistribution", "ec2:DescribeNetworkInterfaces", "mediaconnect:ListEntitlements", "mediaconnect:ListFlows", "mediaconnect:ListOfferings", "mediaconnect:ListReservations", "mediaconnect:DescribeFlow", "mediapackage:ListChannels", "mediapackage:ListOriginEndpoints", "mediapackage:DescribeChannel", "mediapackage:DescribeOriginEndpoint", "mediapackagev2:ListChannelGroups", "mediapackagev2:ListChannels", "mediapackagev2:ListOriginEndpoints", "mediapackagev2:GetChannelGroup", "mediapackagev2:GetChannel", "mediapackagev2:GetOriginEndpoint", "tag:GetResources" ]
    },
    "delete" : {
      "permissions" : [ "medialive:GetSignalMap", "medialive:DeleteSignalMap" ]
    },
    "list" : {
      "permissions" : [ "medialive:ListSignalMaps" ]
    }
  },
  "additionalProperties" : false
}