Skip to content

Commit

Permalink
[HDInsight] Add ListBillingSpecs API to HDInsight's stable and previe…
Browse files Browse the repository at this point in the history
…w version (#6360)

* Add ListBillingSpecs API to stable and preview version

* Add enum for tier, osType and filtermode

* Update HDI_Locations_ListBillingSpecs.json

Fix model validation errors

* Update HDI_Locations_ListBillingSpecs.json

Fix model validation errors
  • Loading branch information
aim-for-better authored and NelsonDaniel committed Jun 28, 2019
1 parent bb12977 commit db00be4
Show file tree
Hide file tree
Showing 4 changed files with 533 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"parameters": {
"location": "East US 2",
"api-version": "2015-03-01-preview",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"vmSizes": [
"A5",
"A6",
"A7"
],
"vmSizeFilters": [
{
"filterMode": "Exclude",
"regions": null,
"clusterFlavors": null,
"nodeTypes": null,
"clusterVersions": null,
"osType": null,
"vmSizes": null
}
],
"billingResources": [
{
"region": "East US 2",
"billingMeters": [],
"diskBillingMeters": []
},
{
"region": "default",
"billingMeters": [
{
"meterParameter": "default",
"meter": "11111111-1111-1111-1111-111111111111",
"unit": "CoreHours"
},
{
"meterParameter": "Kafka",
"meter": "11111111-1111-1111-1111-111111111111",
"unit": "CoreHours"
}
],
"diskBillingMeters": [
{
"diskRpMeter": "11111111-1111-1111-1111-111111111111",
"sku": "All",
"tier": "Standard"
},
{
"diskRpMeter": "11111111-1111-1111-1111-111111111111",
"sku": "All",
"tier": "Standard"
}
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,45 @@
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/billingSpecs": {
"get": {
"tags": [
"Regions"
],
"operationId": "Locations_ListBillingSpecs",
"description": "Lists the billingSpecs for the specified subscription and location.",
"x-ms-examples": {
"Get the subscription billingSpecs for the specified location": {
"$ref": "./examples/HDI_Locations_ListBillingSpecs.json"
}
},
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/LocationParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./operations.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "OK response definition.",
"schema": {
"$ref": "#/definitions/BillingResponseListResult"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -338,6 +377,169 @@
}
}
}
},
"BillingResponseListResult": {
"type": "object",
"description": "The response for the operation to get regional billingSpecs for a subscription.",
"properties": {
"vmSizes": {
"description": "The virtual machine sizes to include or exclude.",
"type": "array",
"items": {
"type": "string"
}
},
"vmSizeFilters": {
"description": "The virtual machine filtering mode. Effectively this can enabling or disabling the virtual machine sizes in a particular set.",
"type": "array",
"items": {
"$ref": "#/definitions/VmSizeCompatibilityFilterV2"
}
},
"billingResources": {
"description": "The billing and managed disk billing resources for a region.",
"type": "array",
"items": {
"$ref": "#/definitions/BillingResources"
}
}
}
},
"VmSizeCompatibilityFilterV2": {
"type": "object",
"description": "This class represent a single filter object that defines a multidimensional set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and ClusterVersions. The constraint should be defined based on the following: FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect of exclusion/inclusion) and the ordering of the Filters. Later filters override previous settings if conflicted.",
"properties": {
"filterMode": {
"description": "The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set.",
"type": "string",
"enum": [
"Exclude",
"Include"
],
"x-ms-enum": {
"name": "FilterMode",
"modelAsString": true
}
},
"regions": {
"description": "The list of regions under the effect of the filter.",
"type": "array",
"items": {
"type": "string"
}
},
"clusterFlavors": {
"description": "The list of cluster flavors under the effect of the filter.",
"type": "array",
"items": {
"type": "string"
}
},
"nodeTypes": {
"description": "The list of node types affected by the filter.",
"type": "array",
"items": {
"type": "string"
}
},
"clusterVersions": {
"description": "The list of cluster versions affected in Major.Minor format.",
"type": "array",
"items": {
"type": "string"
}
},
"osType": {
"description": "The OSType affected, Windows or Linux.",
"type": "array",
"items": {
"type": "string",
"enum": [
"Windows",
"Linux"
],
"x-ms-enum": {
"name": "OSType",
"modelAsString": false
}
}
},
"vmSizes": {
"description": "The list of virtual machine sizes to include or exclude.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"BillingResources": {
"type": "object",
"description": "The billing resources.",
"properties": {
"region": {
"description": "The region or location.",
"type": "string"
},
"billingMeters": {
"description": "The billing meter information.",
"type": "array",
"items": {
"$ref": "#/definitions/BillingMeters"
}
},
"diskBillingMeters": {
"description": "The managed disk billing information.",
"type": "array",
"items": {
"$ref": "#/definitions/DiskBillingMeters"
}
}
}
},
"BillingMeters": {
"type": "object",
"description": "The billing meters.",
"properties": {
"meterParameter": {
"description": "The virtual machine sizes.",
"type": "string"
},
"meter": {
"description": "The HDInsight meter guid.",
"type": "string"
},
"unit": {
"description": "The unit of meter, VMHours or CoreHours.",
"type": "string"
}
}
},
"DiskBillingMeters": {
"type": "object",
"description": "The disk billing meters.",
"properties": {
"diskRpMeter": {
"description": "The managed disk meter guid.",
"type": "string"
},
"sku": {
"description": "The managed disk billing sku, P30 or S30.",
"type": "string"
},
"tier": {
"description": "The managed disk billing tier, Standard or Premium.",
"type": "string",
"enum": [
"Standard",
"Premium"
],
"x-ms-enum": {
"name": "Tier",
"modelAsString": false
}
}
}
}
},
"parameters": {
Expand All @@ -353,7 +555,7 @@
"in": "path",
"required": true,
"type": "string",
"description": "The location.",
"description": "The Azure location (region) for which to make the request.",
"x-ms-parameter-location": "method"
},
"ApiVersionParameter": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"parameters": {
"location": "East US 2",
"api-version": "2018-06-01-preview",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"vmSizes": [
"A5",
"A6",
"A7"
],
"vmSizeFilters": [
{
"filterMode": "Exclude",
"regions": null,
"clusterFlavors": null,
"nodeTypes": null,
"clusterVersions": null,
"osType": null,
"vmSizes": null
}
],
"billingResources": [
{
"region": "East US 2",
"billingMeters": [],
"diskBillingMeters": []
},
{
"region": "default",
"billingMeters": [
{
"meterParameter": "default",
"meter": "11111111-1111-1111-1111-111111111111",
"unit": "CoreHours"
},
{
"meterParameter": "Kafka",
"meter": "11111111-1111-1111-1111-111111111111",
"unit": "CoreHours"
}
],
"diskBillingMeters": [
{
"diskRpMeter": "11111111-1111-1111-1111-111111111111",
"sku": "All",
"tier": "Standard"
},
{
"diskRpMeter": "11111111-1111-1111-1111-111111111111",
"sku": "All",
"tier": "Standard"
}
]
}
]
}
}
}
}
Loading

0 comments on commit db00be4

Please sign in to comment.