{
  "typeName" : "AWS::Batch::SchedulingPolicy",
  "description" : "Resource Type definition for AWS::Batch::SchedulingPolicy",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-batch.git",
  "definitions" : {
    "ResourceArn" : {
      "description" : "ARN of the Scheduling Policy.",
      "type" : "string"
    },
    "QuotaSharePolicy" : {
      "description" : "Quota Share Policy for the Job Queue.",
      "type" : "object",
      "properties" : {
        "IdleResourceAssignmentStrategy" : {
          "type" : "string",
          "enum" : [ "FIFO" ]
        }
      },
      "additionalProperties" : false
    },
    "FairsharePolicy" : {
      "description" : "Fair Share Policy for the Job Queue.",
      "type" : "object",
      "properties" : {
        "ShareDecaySeconds" : {
          "type" : "number",
          "minimum" : 0,
          "maximum" : 604800
        },
        "ComputeReservation" : {
          "type" : "number",
          "minimum" : 0,
          "maximum" : 99
        },
        "ShareDistribution" : {
          "description" : "List of Share Attributes",
          "type" : "array",
          "insertionOrder" : false,
          "items" : {
            "$ref" : "#/definitions/ShareAttributes"
          }
        }
      },
      "required" : [ ],
      "additionalProperties" : false
    },
    "ShareAttributes" : {
      "type" : "object",
      "properties" : {
        "ShareIdentifier" : {
          "type" : "string"
        },
        "WeightFactor" : {
          "type" : "number",
          "minimum" : 0,
          "maximum" : 1000
        }
      },
      "required" : [ ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "Name" : {
      "description" : "Name of Scheduling Policy.",
      "type" : "string",
      "pattern" : ""
    },
    "Arn" : {
      "$ref" : "#/definitions/ResourceArn"
    },
    "FairsharePolicy" : {
      "$ref" : "#/definitions/FairsharePolicy"
    },
    "QuotaSharePolicy" : {
      "$ref" : "#/definitions/QuotaSharePolicy"
    },
    "Tags" : {
      "type" : "object",
      "description" : "A key-value pair to associate with a resource.",
      "patternProperties" : {
        ".*" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    }
  },
  "additionalProperties" : false,
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "Batch:TagResource", "Batch:UntagResource" ]
  },
  "primaryIdentifier" : [ "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/Name" ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "Batch:CreateSchedulingPolicy", "Batch:TagResource" ]
    },
    "read" : {
      "permissions" : [ "Batch:DescribeSchedulingPolicies" ]
    },
    "update" : {
      "permissions" : [ "Batch:UpdateSchedulingPolicy", "Batch:TagResource", "Batch:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "Batch:DescribeSchedulingPolicies", "Batch:DeleteSchedulingPolicy" ]
    },
    "list" : {
      "permissions" : [ "Batch:ListSchedulingPolicies", "Batch:DescribeSchedulingPolicies" ]
    }
  }
}