Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
adc29e9
Update advisor.json
mudit794 May 1, 2019
681f743
Add examples for metadata api
mudit794 May 1, 2019
7df0571
Update GetRecommendationMetadataEntity.json
mudit794 May 1, 2019
1010d9d
Update ListRecommendationMetadata.json
mudit794 May 1, 2019
ee38171
Update GetRecommendationMetadataEntity.json
mudit794 May 1, 2019
ccf0a4d
Update ListRecommendationMetadata.json
mudit794 May 1, 2019
0a738be
Update advisor.json
mudit794 May 2, 2019
0573e35
Update ListRecommendationMetadata.json
mudit794 May 2, 2019
a6193d8
Update GetRecommendationMetadataEntity.json
mudit794 May 2, 2019
7e7bfe1
Add files via upload
mudit794 May 2, 2019
c46724e
Update ListConfigurations_ResourceGroup.json
mudit794 May 2, 2019
25ed91b
Update ListConfigurations_Subscription.json
mudit794 May 2, 2019
a2ef9d7
Update advisor.json
mudit794 May 2, 2019
493af20
Update advisor.json
mudit794 May 2, 2019
b49fbd9
Delete ListConfigurations_ResourceGroup.json
mudit794 May 2, 2019
b27f368
Delete ListConfigurations_Subscription.json
mudit794 May 2, 2019
5b2ae58
Update advisor.json
mudit794 May 2, 2019
4837f63
Update ListRecommendationMetadata.json
mudit794 May 2, 2019
88f4079
Update ListRecommendationMetadata.json
mudit794 May 2, 2019
53e25c3
Update advisor.json
mudit794 May 2, 2019
448cb28
Update readme.md
mudit794 May 3, 2019
625d146
Update readme.md
mudit794 May 3, 2019
72b7f20
Update advisor.json
mudit794 May 5, 2019
3755450
Update advisor.json
mudit794 May 6, 2019
0ef4296
Update GetRecommendationMetadataEntity.json
mudit794 May 6, 2019
964ebb8
Update advisor.json
mudit794 May 7, 2019
ca580cf
Update GetRecommendationMetadataEntity.json
mudit794 May 7, 2019
c598adf
Create feedback.md
mudit794 May 7, 2019
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 @@ -16,6 +16,76 @@
"application/json"
],
"paths": {
"/providers/Microsoft.Advisor/metadata/{name}": {
"get": {
"tags": [
"Metadata"
],
"summary": "Gets the metadata entity.",
"operationId": "RecommendationMetadata_Get",
"parameters": [
{
"name": "name",
"in": "path",
"description": "Name of metadata entity.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. Successfully retrieved metadata entities",
"schema": {
"$ref": "#/definitions/MetadataEntity"
}
},
"404": {
"description": "Client sent unknown metadata name",
"schema": {
"$ref": "#/definitions/ARMErrorResponseBody"
}
}
},
"x-ms-examples": {
"GetMetadata": {
"$ref": "./examples/GetRecommendationMetadataEntity.json"
}
}
}
},
"/providers/Microsoft.Advisor/metadata": {
"get": {
"tags": [
"Metadata"
],
"summary": "Gets the list of metadata entities.",
"operationId": "RecommendationMetadata_List",
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. Successfully retrieved metadata entities",
"schema": {
"$ref": "#/definitions/MetadataEntityListResult"
}
}
},
"x-ms-examples": {
"GetMetadata": {
"$ref": "./examples/ListRecommendationMetadata.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations": {
"get": {
"tags": [
Expand Down Expand Up @@ -582,6 +652,84 @@
}
},
"definitions": {
"MetadataEntityListResult": {
"description": "The list of metadata entities",
"type": "object",
"properties": {
"value": {
"description": "The list of metadata entities.",
"type": "array",
"items": {
"$ref": "#/definitions/MetadataEntity"
}
},
"nextLink": {
"description": "The link used to get the next page of metadata.",
"type": "string"
}
}
},
"MetadataEntity": {
"description": "The metadata entity contract.",
"type": "object",
"properties": {
"id": {
"description": "The resource Id of the metadata entity.",
"type": "string"
},
"type": {
"description": "The type of the metadata entity.",
"type": "string"
},
"name": {
"description": "The name of the metadata entity.",
"type": "string"
},
"properties": {
"$ref": "#/definitions/MetadataEntityProperties",
"description": "The metadata entity properties.",
"x-ms-client-flatten": true
}
}
},
"MetadataEntityProperties": {
"description": "The metadata entity properties",
"type": "object",
"properties": {
"displayName": {
"description": "The display name.",
"type": "string"
},
"dependsOn": {
"description": "The list of keys on which this entity depends on.",
"type": "array",
"items": {
"type": "string"
}
},
"supportedValues": {
"description": "The list of supported values.",
"type": "array",
"items": {
"$ref": "#/definitions/MetadataSupportedValueDetail"
}
}
}
},
"MetadataSupportedValueDetail": {
"description": "The metadata supported value detail.",
"type": "object",
"properties": {
"id": {
"description": "The id.",
"type": "string"
},
"displayName": {
"description": "The display name.",
"type": "string"
}
}
},
"ConfigurationListResult": {
"description": "The list of Advisor configurations.",
"type": "object",
Expand Down Expand Up @@ -940,4 +1088,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"parameters": {
"name": "types",
"api-version": "2017-04-19"
},
"responses": {
"200": {
"body": {
"id": "providers/Microsoft.Advisor/metadata/recommendationType",
"name": "recommendationType",
"type": "Microsoft.Advisor/metadata",
"properties": {
"displayName": "Recommendation Type",
"dependsOn": [
"category",
"impact"
],
"supportedValues": [
{
"id": "6a2b1e70-bd4c-4163-86de-5243d7ac05ee",
"displayName": "Upgrade your SKU or add more instances to ensure fault tolerance"
},
{
"id": "da6630fb-4286-4996-92a3-a43f5f26dd34",
"displayName": "Delete ExpressRoute circuits in the provider status of Not Provisioned"
}
]
}
}
},
"404": {
"body": {
"code": "NotFound",
"message": "Unknown metadata name"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"parameters": {
"api-version": "2017-04-19"
},
"responses": {
"200": {
"body": {
"nextLink": "string",
"value": [
{
"id": "providers/Microsoft.Advisor/metadata/recommendationType",
"name": "recommendationType",
"type": "Microsoft.Advisor/metadata",
"properties": {
"displayName": "Recommendation Type",
"dependsOn": [
"category",
"impact"
],
"supportedValues": [
{
"id": "6a2b1e70-bd4c-4163-86de-5243d7ac05ee",
"displayName": "Upgrade your SKU or add more instances to ensure fault tolerance"
},
{
"id": "da6630fb-4286-4996-92a3-a43f5f26dd34",
"displayName": "Delete ExpressRoute circuits in the provider status of Not Provisioned"
}
]
}
},
{
"id": "providers/Microsoft.Advisor/metadata/recommendationCategory",
"name": "recommendationCategory",
"type": "Microsoft.Advisor/metadata",
"properties": {
"displayName": "Category",
"dependsOn": null,
"supportedValues": [
{
"id": "Cost",
"displayName": "Cost"
},
{
"id": "Performance",
"displayName": "Performance"
}
]
}
},
{
"id": "providers/Microsoft.Advisor/metadata/recommendationImpact",
"name": "recommendationImpact",
"type": "Microsoft.Advisor/metadata",
"properties": {
"displayName": "Impact",
"dependsOn": null,
"supportedValues": [
{
"id": "High",
"displayName": "High"
},
{
"id": "Medium",
"displayName": "Medium"
},
{
"id": "Low",
"displayName": "Low"
}
]
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
### Feedback #1 ###
Use ARM error model for next API version.

PR where feedback was given - https://github.com/Azure/azure-rest-api-specs/pull/5826

Link to ARM Error model - https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-details.md#error-response-content

### Error Response Content ###

If the resource provider needs to return an error to any operation, it should return the appropriate HTTP error code and a message body as can be seen below. The message should be localized per the Accept-Language header specified in the original request such that it could be directly be exposed to users.

The resource providers must return the \*code\* and \*message\* fields; however, the other fields are acceptable as additions. This format matches [the OData v4.0 schema](http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#_Toc372793091) for error responses.

#### Response Body ####
```
{
"error": {
"code": "BadArgument",
"message": "The provided database 'foo' has an invalid username.",
"target": "query",
"details": [
{
"code": "301",
"target": "$search"
"message": "$search query option not supported",
},
{
"code": "ConflictingAppendPolicies",
"target": "",
"message": "",
"additionalInfo": [
{
"type": "PolicyViolation",
"info": {
"policySetDefinitionDisplayName": "Secure the environment",
"policySetDefinitionId":"/subscriptions/00000-00000-0000-000/providers/Microsoft.Authorization/policySetDefinitions/TestPolicySet",
"policyDefinitionDisplayName": "Allowed locations",
"policyDefinitionId":"/subscriptions/00000-00000-0000-000/providers/Microsoft.Authorization/policyDefinitions/TestPolicy1",
"policyAssignmentDisplayName": "Allow Central US and WEU only",
"policyAsssignmentId":"/subscriptions/00000-00000-0000-000/providers/Microsoft.Authorization/policyAssignments/TestAssignment1"
}
}
]
}
]
}
```

| Element name | Type | Description |
| --- | --- | --- |
| message | string (required) | Describes the error in detail and provides debugging information. If Accept-Language is set in the request, it must be localized to that language. |
| code | string (required) | Unlocalized string which can be used to programmatically identify the error. The code should be Pascal-cased, and should serve to uniquely identify a particular class of error, for example "BadArgument". |
| target | string (optional) | The target of the particular error (for example, the name of the property in error). |
| details | array (optional) | An array of additional nested error response info objects, as described by this contract. |
| additionalInfo | array (optional) | An array of objects with "type" (string), and "info" (object) properties. The schema of "info" is service-specific and dependent on the "type" string. |