-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
|
@@ -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": { | ||
|
@@ -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": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. type: object #Resolved |
||
"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": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||
"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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be "modelAsString" : true There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want to reuse the exising OSType definition here. If we change "modelAsString" as true for this
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That definition should also be corrected There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We cannot do this because our SDK is GA now and it will be a breaking change. We will fix the issue in the next API version. Created a GitHub issue #6505 to track this. |
||
} | ||
} | ||
}, | ||
"vmSizes": { | ||
"description": "The list of virtual machine sizes to include or exclude.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"BillingResources": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. type: object #Resolved |
||
"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": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. type: object #Resolved |
||
"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": { | ||
idear1203 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"description": "The managed disk billing tier, Standard or Premium.", | ||
"type": "string", | ||
"enum": [ | ||
"Standard", | ||
"Premium" | ||
], | ||
"x-ms-enum": { | ||
"name": "Tier", | ||
"modelAsString": false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please change this to true. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be "modelAsString" : true There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes sure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We cannot do this because our SDK is GA now and it will be a breaking change. We will fix the issue in the next API version. Created a GitHub issue #6505 to track this. |
||
} | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
|
@@ -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": { | ||
|
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" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: object #Resolved