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

Donaliu/20200207 sap monitor #8528

Merged
merged 17 commits into from
Mar 24, 2020
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"api-version": "2020-02-07-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "myResourceGroup",
"sapMonitorName": "mySapMonitor"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance1",
"name": "myProviderInstance1",
"type": "hana",
"properties": "{\"hostname\":\"10.0.0.10\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30015,\"dbUsername\":\"SYSTEM\"}"
},
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance2",
"name": "myProviderInstance2",
"type": "hana",
"properties": "{\"hostname\":\"10.0.0.11\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30015,\"dbUsername\":\"SYSTEM\"}"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@
"enableCustomerAnalytics": true,
"logAnalyticsWorkspaceArmId": "",
"logAnalyticsWorkspaceId": "",
"logAnalyticsWorkspaceSharedKey": "",
"providerInstances": [
{
"name": "myHanaProviderInstance",
"type": "hana",
"properties": "{\"hostname\":\"10.0.0.10\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30015,\"dbUsername\":\"SYSTEM\",\"dbPassword\":\"PASSWORD\"}"
}
]
"logAnalyticsWorkspaceSharedKey": ""
}
}
},
Expand All @@ -42,14 +35,6 @@
"logAnalyticsWorkspaceArmId": "",
"logAnalyticsWorkspaceId": "",
"logAnalyticsWorkspaceSharedKey": "",
"providerInstances": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance",
"name": "myHanaProviderInstance",
"type": "hana",
"properties": "{\"hostname\":\"10.0.0.10\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30015,\"dbUsername\":\"SYSTEM\",\"dbPassword\":\"PASSWORD\"}"
}
],
"managedResourceGroupName": "",
"sapMonitorCollectorVersion": "",
"provisioningState": "Succeeded"
Expand All @@ -70,14 +55,6 @@
"logAnalyticsWorkspaceArmId": "",
"logAnalyticsWorkspaceId": "",
"logAnalyticsWorkspaceSharedKey": "",
"providerInstances": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance",
"name": "myHanaProviderInstance",
"type": "hana",
"properties": "{\"hostname\":\"10.0.0.10\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30015,\"dbUsername\":\"SYSTEM\"}"
}
],
"managedResourceGroupName": "",
"sapMonitorCollectorVersion": "",
"provisioningState": "Accepted"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@
"logAnalyticsWorkspaceArmId": "",
"logAnalyticsWorkspaceId": "",
"logAnalyticsWorkspaceSharedKey": "",
"providerInstances": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance",
"name": "myHanaProviderInstance",
"type": "hana",
"properties": "{\"hostname\":\"10.0.0.10\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30015,\"dbUsername\":\"SYSTEM\"}"
}
],
"managedResourceGroupName": "",
"sapMonitorCollectorVersion": "",
"provisioningState": "Succeeded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@
"logAnalyticsWorkspaceArmId": "",
"logAnalyticsWorkspaceId": "",
"logAnalyticsWorkspaceSharedKey": "",
"providerInstances": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance",
"name": "myHanaProviderInstance",
"type": "hana",
"properties": "{\"hostname\":\"10.0.0.10\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30015,\"dbUsername\":\"SYSTEM\"}"
}
],
"managedResourceGroupName": "",
"sapMonitorCollectorVersion": "",
"provisioningState": "Succeeded"
Expand All @@ -46,14 +38,6 @@
"logAnalyticsWorkspaceArmId": "",
"logAnalyticsWorkspaceId": "",
"logAnalyticsWorkspaceSharedKey": "",
"providerInstances": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor2/providerInstances/myProviderInstance2",
"name": "myHanaProviderInstance2",
"type": "hana",
"properties": "{\"hostname\":\"10.0.0.11\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30015,\"dbUsername\":\"SYSTEM\"}"
}
],
"managedResourceGroupName": "",
"sapMonitorCollectorVersion": "",
"provisioningState": "Succeeded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@
"logAnalyticsWorkspaceArmId": "",
"logAnalyticsWorkspaceId": "",
"logAnalyticsWorkspaceSharedKey": "",
"providerInstances": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance",
"name": "myHanaProviderInstance",
"type": "hana",
"properties": "{\"hostname\":\"10.0.0.10\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30015,\"dbUsername\":\"SYSTEM\"}"
}
],
"managedResourceGroupName": "",
"sapMonitorCollectorVersion": "",
"provisioningState": "Succeeded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@
"logAnalyticsWorkspaceArmId": "",
"logAnalyticsWorkspaceId": "",
"logAnalyticsWorkspaceSharedKey": "",
"providerInstances": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance",
"name": "myHanaProviderInstance",
"type": "hana",
"properties": "{\"hostname\":\"10.0.0.10\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30015,\"dbUsername\":\"SYSTEM\"}"
}
],
"managedResourceGroupName": "",
"sapMonitorCollectorVersion": "",
"provisioningState": "Succeeded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,52 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances": {
"get": {
"tags": [
"HanaOnAzure"
],
"operationId": "ProviderInstances_List",
"summary": "Gets a list of provider instnaces in the specified SAP monitor.",
"description": "Gets a list of provider instnaces in the specified SAP monitor. The operations returns various properties of each provider instnaces.",
"x-ms-examples": {
"List all SAP Monitors in a subscription": {
"$ref": "./examples/ProviderInstances_List.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/SapMonitorNameParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ProviderInstanceListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}/providerInstances/{providerInstanceName}": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we call this 'providers'? This is the name of a resource type and all resources under it are implicitly referred to as Instances.

Copy link

@tniek tniek Feb 28, 2020

Choose a reason for hiding this comment

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

I find "providers" not that a good choice, for two reasons:

  • there is already a "providers" in the URL (before Microsoft.HanaOnAzure), so having another provider seems ambiguous;
  • per our design, "providers" refer to the monitoring providers on a general level (such as saphana, prometheus etc.); however, for the sake of this API, we're dealing with instances of these providers.

That being said, "providerInstances" seems like a better choice to me.

"get": {
PakDLiu marked this conversation as resolved.
Show resolved Hide resolved
"tags": [
Expand Down Expand Up @@ -410,37 +456,63 @@
},
"definitions": {
"Resource": {
"description": "The resource model definition.",
"description": "The core properties of ARM resources",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource ID"
"description": "Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}"
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name"
"description": "The name of the resource"
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type"
},
"location": {
"type": "string",
"description": "Resource location"
},
"description": "The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles."
}
},
"x-ms-azure-resource": true
},
"TrackedResource": {
"description": "The resource model definition for a ARM tracked top level resource",
"properties": {
"tags": {
"readOnly": true,
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags"
"x-ms-mutability": [
"read",
"create",
"update"
],
"description": "Resource tags."
},
"location": {
"type": "string",
"x-ms-mutability": [
"read",
"create"
],
"description": "The Azure Region where the resource lives"
}
},
"x-ms-azure-resource": true
"allOf": [
{
"$ref": "#/definitions/Resource"
}
]
},
"ProxyResource": {
"description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags",
"allOf": [
{
"$ref": "#/definitions/Resource"
}
]
},
"ErrorResponse": {
"description": "Describes the format of Error response.",
Expand Down Expand Up @@ -495,7 +567,7 @@
},
"allOf": [
{
"$ref": "#/definitions/Resource"
"$ref": "#/definitions/TrackedResource"
}
],
"description": "SAP monitor info on Azure (ARM properties and SAP monitor properties)"
Expand Down Expand Up @@ -545,37 +617,39 @@
"readOnly": true,
"type": "string",
"description": "The version of the payload running in the Collector VM"
},
"providerInstances": {
}
},
"description": "Describes the properties of a SAP monitor."
},
"ProviderInstanceListResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/ProviderInstance"
},
"description": "The list of monitor provider instances."
"description": "The list of provider instances."
},
"nextLink": {
"type": "string",
"description": "The URL to get the next set of provider instances."
}
},
"description": "Describes the properties of a SAP monitor."
"description": "The response from the List provider instances operation."
},
"ProviderInstance": {
PakDLiu marked this conversation as resolved.
Show resolved Hide resolved
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource ID"
},
"name": {
"type": "string",
"description": "The name of the provider instance."
},
"type": {
"type": "string",
"description": "The provider instance type."
},
Copy link
Member

Choose a reason for hiding this comment

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

Why is there no modelling of the properties of the provider instance? This is going to make writing tools to consume this type very difficult, both in SDKs and for customers consuming the API directly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is by design. the properties field is a JSON string and the schema will be determined by the type field.

We wanted to make the API flexible. Also, other teams will be implementing their own providers and it will be up to them what their JSON schema will be.

"properties": {
"type": "string",
"description": "A JSON string containing the properties of the provider instance."
}
}
},
"allOf": [
{
"$ref": "#/definitions/ProxyResource"
}
],
"description": "A provider instance associated with a SAP monitor."
}
},
"parameters": {
Expand Down