Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HDInsight] Add ListBillingSpecs API to HDInsight's stable and preview version #6360

Merged
merged 4 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,140 @@
}
}
}
},
"BillingResponseListResult": {
Copy link

@NelsonDaniel NelsonDaniel Jun 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type: object #Resolved

"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": {
Copy link

@NelsonDaniel NelsonDaniel Jun 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type: object #Resolved

"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": {
Copy link

@NelsonDaniel NelsonDaniel Jun 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the description there is just two states. Would bool or enum fit better here? #Resolved

"description": "The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set.",
"type": "string"
},
"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"
Copy link

@NelsonDaniel NelsonDaniel Jun 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the description looks like you have a limited set of values. Would an x-ms-enum be a better fit? #Resolved

}
},
"vmSizes": {
"description": "The list of virtual machine sizes to include or exclude.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"BillingResources": {
Copy link

@NelsonDaniel NelsonDaniel Jun 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type: object #Resolved

"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": {
Copy link

@NelsonDaniel NelsonDaniel Jun 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type: object #Resolved

"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": {
"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": {
idear1203 marked this conversation as resolved.
Show resolved Hide resolved
"description": "The managed disk billing tier, Standard or Premium.",
"type": "string"
}
}
}
},
"parameters": {
Expand All @@ -353,7 +526,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