{
  "typeName" : "AWS::EMR::InstanceFleetConfig",
  "description" : "Resource Type definition for AWS::EMR::InstanceFleetConfig",
  "additionalProperties" : false,
  "properties" : {
    "InstanceFleetType" : {
      "type" : "string"
    },
    "TargetOnDemandCapacity" : {
      "type" : "integer"
    },
    "ClusterId" : {
      "type" : "string"
    },
    "TargetSpotCapacity" : {
      "type" : "integer"
    },
    "LaunchSpecifications" : {
      "$ref" : "#/definitions/InstanceFleetProvisioningSpecifications"
    },
    "ResizeSpecifications" : {
      "$ref" : "#/definitions/InstanceFleetResizingSpecifications"
    },
    "Id" : {
      "type" : "string"
    },
    "InstanceTypeConfigs" : {
      "type" : "array",
      "uniqueItems" : true,
      "items" : {
        "$ref" : "#/definitions/InstanceTypeConfig"
      }
    },
    "Name" : {
      "type" : "string"
    }
  },
  "definitions" : {
    "VolumeSpecification" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "SizeInGB" : {
          "type" : "integer"
        },
        "Throughput" : {
          "type" : "integer"
        },
        "VolumeType" : {
          "type" : "string"
        },
        "Iops" : {
          "type" : "integer"
        }
      },
      "required" : [ "SizeInGB", "VolumeType" ]
    },
    "EbsConfiguration" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "EbsBlockDeviceConfigs" : {
          "type" : "array",
          "uniqueItems" : true,
          "items" : {
            "$ref" : "#/definitions/EbsBlockDeviceConfig"
          }
        },
        "EbsOptimized" : {
          "type" : "boolean"
        }
      }
    },
    "Configuration" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ConfigurationProperties" : {
          "type" : "object",
          "patternProperties" : {
            "[a-zA-Z0-9]+" : {
              "type" : "string"
            }
          }
        },
        "Configurations" : {
          "type" : "array",
          "uniqueItems" : true,
          "items" : {
            "$ref" : "#/definitions/Configuration"
          }
        },
        "Classification" : {
          "type" : "string"
        }
      }
    },
    "OnDemandCapacityReservationOptions" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "UsageStrategy" : {
          "type" : "string"
        },
        "CapacityReservationResourceGroupArn" : {
          "type" : "string"
        },
        "CapacityReservationPreference" : {
          "type" : "string"
        }
      }
    },
    "InstanceFleetResizingSpecifications" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "OnDemandResizeSpecification" : {
          "$ref" : "#/definitions/OnDemandResizingSpecification"
        },
        "SpotResizeSpecification" : {
          "$ref" : "#/definitions/SpotResizingSpecification"
        }
      }
    },
    "InstanceFleetProvisioningSpecifications" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "SpotSpecification" : {
          "$ref" : "#/definitions/SpotProvisioningSpecification"
        },
        "OnDemandSpecification" : {
          "$ref" : "#/definitions/OnDemandProvisioningSpecification"
        }
      }
    },
    "OnDemandResizingSpecification" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "CapacityReservationOptions" : {
          "$ref" : "#/definitions/OnDemandCapacityReservationOptions"
        },
        "AllocationStrategy" : {
          "type" : "string"
        },
        "TimeoutDurationMinutes" : {
          "type" : "integer"
        }
      }
    },
    "OnDemandProvisioningSpecification" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "CapacityReservationOptions" : {
          "$ref" : "#/definitions/OnDemandCapacityReservationOptions"
        },
        "AllocationStrategy" : {
          "type" : "string"
        }
      },
      "required" : [ "AllocationStrategy" ]
    },
    "EbsBlockDeviceConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "VolumeSpecification" : {
          "$ref" : "#/definitions/VolumeSpecification"
        },
        "VolumesPerInstance" : {
          "type" : "integer"
        }
      },
      "required" : [ "VolumeSpecification" ]
    },
    "InstanceTypeConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "BidPrice" : {
          "type" : "string"
        },
        "WeightedCapacity" : {
          "type" : "integer"
        },
        "EbsConfiguration" : {
          "$ref" : "#/definitions/EbsConfiguration"
        },
        "Priority" : {
          "type" : "number"
        },
        "BidPriceAsPercentageOfOnDemandPrice" : {
          "type" : "number"
        },
        "CustomAmiId" : {
          "type" : "string"
        },
        "Configurations" : {
          "type" : "array",
          "uniqueItems" : true,
          "items" : {
            "$ref" : "#/definitions/Configuration"
          }
        },
        "InstanceType" : {
          "type" : "string"
        }
      },
      "required" : [ "InstanceType" ]
    },
    "SpotResizingSpecification" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "AllocationStrategy" : {
          "type" : "string"
        },
        "TimeoutDurationMinutes" : {
          "type" : "integer"
        }
      }
    },
    "SpotProvisioningSpecification" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "AllocationStrategy" : {
          "type" : "string"
        },
        "TimeoutDurationMinutes" : {
          "type" : "integer"
        },
        "TimeoutAction" : {
          "type" : "string"
        },
        "BlockDurationMinutes" : {
          "type" : "integer"
        }
      },
      "required" : [ "TimeoutDurationMinutes", "TimeoutAction" ]
    }
  },
  "required" : [ "InstanceFleetType", "ClusterId" ],
  "createOnlyProperties" : [ "/properties/Name", "/properties/LaunchSpecifications", "/properties/ClusterId", "/properties/InstanceFleetType" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "readOnlyProperties" : [ "/properties/Id" ]
}