{
  "typeName" : "AWS::SSM::MaintenanceWindowTarget",
  "description" : "Resource type definition for AWS::SSM::MaintenanceWindowTarget",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ssm/tree/master/aws-ssm-maintenancewindowtask",
  "additionalProperties" : false,
  "properties" : {
    "OwnerInformation" : {
      "type" : "string",
      "description" : "A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running tasks for these targets in this maintenance window."
    },
    "Description" : {
      "type" : "string",
      "description" : "A description for the target."
    },
    "WindowId" : {
      "type" : "string",
      "description" : "The ID of the maintenance window to register the target with."
    },
    "ResourceType" : {
      "type" : "string",
      "description" : "The type of target that is being registered with the maintenance window."
    },
    "Targets" : {
      "type" : "array",
      "description" : "The targets to register with the maintenance window.",
      "uniqueItems" : false,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Targets"
      }
    },
    "Name" : {
      "type" : "string",
      "description" : "The name for the maintenance window target."
    },
    "WindowTargetId" : {
      "description" : "The ID of the target.",
      "type" : "string"
    }
  },
  "definitions" : {
    "Targets" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Values" : {
          "type" : "array",
          "description" : "User-defined criteria that maps to Key.",
          "uniqueItems" : false,
          "insertionOrder" : false,
          "items" : {
            "type" : "string"
          }
        },
        "Key" : {
          "type" : "string",
          "description" : "User-defined criteria for sending commands that target managed nodes that meet the criteria."
        }
      },
      "required" : [ "Values", "Key" ]
    }
  },
  "required" : [ "WindowId", "ResourceType", "Targets" ],
  "createOnlyProperties" : [ "/properties/WindowId" ],
  "primaryIdentifier" : [ "/properties/WindowId", "/properties/WindowTargetId" ],
  "readOnlyProperties" : [ "/properties/WindowTargetId" ],
  "tagging" : {
    "taggable" : false
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "ssm:DescribeMaintenanceWindowTargets", "ssm:RegisterTargetWithMaintenanceWindow" ]
    },
    "read" : {
      "permissions" : [ "ssm:DescribeMaintenanceWindowTargets" ]
    },
    "update" : {
      "permissions" : [ "ssm:UpdateMaintenanceWindowTarget" ]
    },
    "delete" : {
      "permissions" : [ "ssm:DescribeMaintenanceWindowTargets", "ssm:DeregisterTargetFromMaintenanceWindow" ]
    },
    "list" : {
      "permissions" : [ "ssm:DescribeMaintenanceWindowTargets" ],
      "handlerSchema" : {
        "properties" : {
          "WindowId" : {
            "$ref" : "resource-schema.json#/properties/WindowId"
          }
        },
        "required" : [ "WindowId" ]
      }
    }
  }
}