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

[Cognitive Services] Add Microsoft.CognitiveServices/skus operation #2666

Merged
merged 4 commits into from
Apr 6, 2018
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
Expand Up @@ -459,7 +459,41 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus": {
"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/skus": {
"get": {
"tags": [
"Skus",
"AvailabilitySets"
Copy link
Member

Choose a reason for hiding this comment

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

not sure AvailabilitySets make sense here, if not please remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, that does not make sense, put CognitiveServicesAccounts there.

],
"operationId": "ResourceSkus_List",
"description": "Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription.",
"x-ms-examples": {
"Regenerate Keys": {
"$ref": "./examples/GetSkus.json"
}
},
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/subscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ResourceSkusResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus": {
"get": {
"tags": [
"CognitiveServicesAccounts"
Expand Down Expand Up @@ -1174,6 +1208,130 @@
"description": "Additional error message."
}
}
},
"ResourceSkuRestrictions": {
"properties": {
"type": {
"type": "string",
"readOnly": true,
"description": "The type of restrictions.",
"enum": [
"Location",
"Zone"
],
"x-ms-enum": {
"name": "ResourceSkuRestrictionsType",
"modelAsString": false
}
},
"values": {
"type": "array",
"readOnly": true,
"items": {
"type": "string"
},
"description": "The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted."
},
"restrictionInfo": {
"$ref": "#/definitions/ResourceSkuRestrictionInfo",
"readOnly": true,
"description": "The information about the restriction where the SKU cannot be used."
},
"reasonCode": {
"type": "string",
"readOnly": true,
"description": "The reason for restriction.",
"enum": [
"QuotaId",
"NotAvailableForSubscription"
],
"x-ms-enum": {
"name": "ResourceSkuRestrictionsReasonCode",
"modelAsString": false
Copy link
Member

Choose a reason for hiding this comment

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

It's recommended to use "modelAsString": true so that languages generate extendable enum.

}
}
},
"description": "Describes restrictions of a SKU."
},
"ResourceSku": {
"properties": {
"resourceType": {
"readOnly": true,
"type": "string",
"description": "The type of resource the SKU applies to."
},
"name": {
"readOnly": true,
"type": "string",
"description": "The name of SKU."
},
"tier": {
"readOnly": true,
"type": "string",
"description": "Specifies the tier of Cognitive Services account."
},
"kind": {
"readOnly": true,
"type": "string",
"description": "The Kind of resources that are supported in this SKU."
},
"locations": {
"type": "array",
"readOnly": true,
"items": {
"type": "string"
},
"description": "The set of locations that the SKU is available."
},
"restrictions": {
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/ResourceSkuRestrictions"
},
"description": "The restrictions because of which SKU cannot be used. This is empty if there are no restrictions."
}
},
"description": "Describes an available Cognitive Services SKU."
},
"ResourceSkuRestrictionInfo": {
"properties": {
"locations": {
"readOnly": true,
"type": "array",
"items": {
"type": "string"
},
"description": "Locations where the SKU is restricted"
Copy link
Member

Choose a reason for hiding this comment

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

just confirming - this is the list of location where the specific sku is not available, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so...but actually I took this from Compute/Skus.

},
"zones": {
"readOnly": true,
"type": "array",
"items": {
"type": "string"
},
"description": "List of availability zones where the SKU is restricted."
}
}
},
"ResourceSkusResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/ResourceSku"
},
"description": "The list of skus available for the subscription."
},
"nextLink": {
"type": "string",
"description": "The uri to fetch the next page of Skus."
}
},
"required": [
"value"
],
"description": "The Get Skus operation response."
}
},
"parameters": {
Expand Down
Loading