diff --git a/arm-sql/2014-04-01/examples/DatabaseMetricsDefinitionsList.json b/arm-sql/2014-04-01/examples/DatabaseMetricsDefinitionsList.json new file mode 100644 index 000000000000..dec3dde31cbb --- /dev/null +++ b/arm-sql/2014-04-01/examples/DatabaseMetricsDefinitionsList.json @@ -0,0 +1,403 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6730", + "serverName": "sqlcrudtest-9007", + "databaseName": "3481", + "api-version": "2014-04-01", + "$filter": "$filter=(name/value eq 'cpu_percent' ) and timeGrain eq '00:10:00' and startTime eq '2017-06-2T18:35:00Z' and endTime eq '2017-06-2T18:55:00Z'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": { + "value": "cpu_percent", + "localizedValue": "CPU percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT15S", + "retention": "PT1H" + }, + { + "timeGrain": "PT60S", + "retention": "PT1H" + }, + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "physical_data_read_percent", + "localizedValue": "Data IO percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT15S", + "retention": "PT1H" + }, + { + "timeGrain": "PT60S", + "retention": "PT1H" + }, + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "log_write_percent", + "localizedValue": "Log IO percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT15S", + "retention": "PT1H" + }, + { + "timeGrain": "PT60S", + "retention": "PT1H" + }, + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "dtu_consumption_percent", + "localizedValue": "DTU percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT15S", + "retention": "PT1H" + }, + { + "timeGrain": "PT60S", + "retention": "PT1H" + }, + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "storage", + "localizedValue": "Total database size" + }, + "unit": "Bytes", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Maximum", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "xtp_storage_percent", + "localizedValue": "In-Memory OLTP storage percent" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT15S", + "retention": "PT1H" + }, + { + "timeGrain": "PT60S", + "retention": "PT1H" + }, + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "workers_percent", + "localizedValue": "Workers percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "sessions_percent", + "localizedValue": "Sessions percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "dtu_limit", + "localizedValue": "DTU limit" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "dtu_used", + "localizedValue": "DTU used" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "connection_successful", + "localizedValue": "Successful Connections" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Total", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "connection_failed", + "localizedValue": "Failed Connections" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Total", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "blocked_by_firewall", + "localizedValue": "Blocked by Firewall" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Total", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "deadlock", + "localizedValue": "Deadlocks" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Total", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "storage_percent", + "localizedValue": "Database size percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Maximum", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-sql/2014-04-01/examples/DatabaseMetricsListWithFilter.json b/arm-sql/2014-04-01/examples/DatabaseMetricsListWithFilter.json new file mode 100644 index 000000000000..0eb56557be56 --- /dev/null +++ b/arm-sql/2014-04-01/examples/DatabaseMetricsListWithFilter.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6730", + "serverName": "sqlcrudtest-9007", + "databaseName": "3481", + "api-version": "2014-04-01", + "$filter": "$filter=(name/value eq 'cpu_percent' ) and timeGrain eq '00:10:00' and startTime eq '2017-06-02T18:35:00Z' and endTime eq '2017-06-02T18:55:00Z'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": { + "value": "cpu_percent", + "localizedValue": "CPU percentage" + }, + "unit": "percent", + "timeGrain": "00:10:00", + "startTime": "2017-06-02T18:35:00Z", + "endTime": "2017-06-02T18:55:00Z", + "metricValues": [ + { + "timestamp": "2017-06-02T18:30:01Z", + "average": 0, + "minimum": 0, + "maximum": 0, + "total": 0, + "count": 1 + }, + { + "timestamp": "2017-06-02T18:40:01Z", + "average": 0, + "minimum": 0, + "maximum": 0, + "total": 0, + "count": 1 + }, + { + "timestamp": "2017-06-02T18:50:01Z", + "average": 0, + "minimum": 0, + "maximum": 0, + "total": 0, + "count": 1 + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-sql/2014-04-01/examples/ElasticPoolMetricsDefinitionsList.json b/arm-sql/2014-04-01/examples/ElasticPoolMetricsDefinitionsList.json new file mode 100644 index 000000000000..d444b248283f --- /dev/null +++ b/arm-sql/2014-04-01/examples/ElasticPoolMetricsDefinitionsList.json @@ -0,0 +1,403 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6730", + "serverName": "sqlcrudtest-9007", + "elasticPoolName": "3481", + "api-version": "2014-04-01", + "$filter": "$filter=(name/value eq 'cpu_percent' ) and timeGrain eq '00:10:00' and startTime eq '2017-06-2T18:35:00Z' and endTime eq '2017-06-2T18:55:00Z'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": { + "value": "cpu_percent", + "localizedValue": "CPU percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT15S", + "retention": "PT1H" + }, + { + "timeGrain": "PT60S", + "retention": "PT1H" + }, + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "physical_data_read_percent", + "localizedValue": "Data IO percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT15S", + "retention": "PT1H" + }, + { + "timeGrain": "PT60S", + "retention": "PT1H" + }, + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "log_write_percent", + "localizedValue": "Log IO percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT15S", + "retention": "PT1H" + }, + { + "timeGrain": "PT60S", + "retention": "PT1H" + }, + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "dtu_consumption_percent", + "localizedValue": "DTU percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT15S", + "retention": "PT1H" + }, + { + "timeGrain": "PT60S", + "retention": "PT1H" + }, + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "storage", + "localizedValue": "Total database size" + }, + "unit": "Bytes", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Maximum", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "xtp_storage_percent", + "localizedValue": "In-Memory OLTP storage percent" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT15S", + "retention": "PT1H" + }, + { + "timeGrain": "PT60S", + "retention": "PT1H" + }, + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "workers_percent", + "localizedValue": "Workers percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "sessions_percent", + "localizedValue": "Sessions percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "dtu_limit", + "localizedValue": "DTU limit" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "dtu_used", + "localizedValue": "DTU used" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Average", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "connection_successful", + "localizedValue": "Successful Connections" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Total", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "connection_failed", + "localizedValue": "Failed Connections" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Total", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "blocked_by_firewall", + "localizedValue": "Blocked by Firewall" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Total", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "deadlock", + "localizedValue": "Deadlocks" + }, + "unit": "Count", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Total", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + }, + { + "name": { + "value": "storage_percent", + "localizedValue": "Database size percentage" + }, + "unit": "Percent", + "resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1", + "primaryAggregationType": "Maximum", + "metricAvailabilities": [ + { + "timeGrain": "PT5M", + "retention": "P14D" + }, + { + "timeGrain": "PT1H", + "retention": "P14D" + }, + { + "timeGrain": "P1D", + "retention": "P14D" + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-sql/2014-04-01/examples/ElasticPoolMetricsListWithFilter.json b/arm-sql/2014-04-01/examples/ElasticPoolMetricsListWithFilter.json new file mode 100644 index 000000000000..a2eb5a6f2962 --- /dev/null +++ b/arm-sql/2014-04-01/examples/ElasticPoolMetricsListWithFilter.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6730", + "serverName": "sqlcrudtest-9007", + "elasticPoolName": "3481", + "api-version": "2014-04-01", + "$filter": "$filter=(name/value eq 'cpu_percent' ) and timeGrain eq '00:10:00' and startTime eq '2017-06-02T18:35:00Z' and endTime eq '2017-06-02T18:55:00Z'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": { + "value": "cpu_percent", + "localizedValue": "CPU percentage" + }, + "unit": "percent", + "timeGrain": "00:10:00", + "startTime": "2017-06-02T18:35:00Z", + "endTime": "2017-06-02T18:55:00Z", + "metricValues": [ + { + "timestamp": "2017-06-02T18:30:01Z", + "average": 0, + "minimum": 0, + "maximum": 0, + "total": 0, + "count": 1 + }, + { + "timestamp": "2017-06-02T18:40:01Z", + "average": 0, + "minimum": 0, + "maximum": 0, + "total": 0, + "count": 1 + }, + { + "timestamp": "2017-06-02T18:50:01Z", + "average": 0, + "minimum": 0, + "maximum": 0, + "total": 0, + "count": 1 + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-sql/2014-04-01/swagger/metrics.json b/arm-sql/2014-04-01/swagger/metrics.json new file mode 100644 index 000000000000..d8e0e7c64b0b --- /dev/null +++ b/arm-sql/2014-04-01/swagger/metrics.json @@ -0,0 +1,460 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure SQL Database", + "description": "Provides create, read, update and delete functionality for Azure SQL Database resources including servers, databases, elastic pools, recommendations, operations, and usage metrics.", + "version": "2014-04-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics": { + "get": { + "tags": [ + "Databases" + ], + "operationId": "Databases_ListMetrics", + "description": "Returns database metrics.", + "x-ms-examples": { + "List database usage metrics": { "$ref": "../examples/DatabaseMetricsListWithFilter.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the database." + }, + { + "name": "$filter", + "in": "query", + "required": true, + "type": "string", + "description": "An OData filter expression that describes a subset of metrics to return." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MetricListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions": { + "get": { + "tags": [ + "Databases" + ], + "operationId": "Databases_ListMetricDefinitions", + "description": "Returns database metric definitions.", + "x-ms-examples": { + "List database usage metrics": { "$ref": "../examples/DatabaseMetricsDefinitionsList.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the database." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MetricDefinitionListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics": { + "get": { + "tags": [ + "ElasticPools" + ], + "operationId": "ElasticPools_ListMetrics", + "description": "Returns elastic pool metrics.", + "x-ms-examples": { + "List database usage metrics": { "$ref": "../examples/ElasticPoolMetricsListWithFilter.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the elastic pool." + }, + { + "name": "$filter", + "in": "query", + "required": true, + "type": "string", + "description": "An OData filter expression that describes a subset of metrics to return." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MetricListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions": { + "get": { + "tags": [ + "ElasticPools" + ], + "operationId": "ElasticPools_ListMetricDefinitions", + "description": "Returns elastic pool metric definitions.", + "x-ms-examples": { + "List database usage metrics": { "$ref": "../examples/ElasticPoolMetricsDefinitionsList.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the elastic pool." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MetricDefinitionListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + } + }, + "definitions": { + "MetricValue": { + "properties": { + "count": { + "readOnly": true, + "type": "number", + "format": "int32", + "description": "The number of values for the metric." + }, + "average": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The average value of the metric." + }, + "maximum": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The max value of the metric." + }, + "minimum": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The min value of the metric." + }, + "timestamp": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The metric timestamp (ISO-8601 format)." + }, + "total": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The total value of the metric." + } + }, + "description": "Represents database metrics.", + "allOf": [ + { + "$ref": "#/definitions/SubResource" + } + ] + }, + "MetricName": { + "properties": { + "value": { + "readOnly": true, + "type": "string", + "description": "The name of the database metric." + }, + "localizedValue": { + "readOnly": true, + "type": "string", + "description": "The friendly name of the database metric." + } + }, + "description": "A database metric name." + }, + "Metric": { + "properties": { + "startTime": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The start time for the metric (ISO-8601 format)." + }, + "endTime": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The end time for the metric (ISO-8601 format)." + }, + "timeGrain": { + "readOnly": true, + "type": "string", + "description": "The time step to be used to summarize the metric values." + }, + "unit": { + "readOnly": true, + "type": "string", + "description": "The unit of the metric.", + "enum": ["count", "bytes", "seconds", "percent", "countPerSecond", "bytesPerSecond"], + "x-ms-enum": { + "modelAsString": true, + "name": "UnitType" + } + }, + "name": { + "readOnly": true, + "$ref": "#/definitions/MetricName", + "description": "The name information for the metric." + }, + "metricValues": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/MetricValue" + }, + "description": "The metric values for the specified time window and timestep." + } + }, + "description": "Database metrics." + }, + "MetricListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Metric" + }, + "description": "The list of metrics for the database." + } + }, + "required": ["value"], + "description": "The response to a list database metrics request." + }, + "MetricAvailability": { + "properties": { + "retention": { + "readOnly": true, + "type": "string", + "description": "The length of retention for the database metric." + }, + "timeGrain": { + "readOnly": true, + "type": "string", + "description": "The granularity of the database metric." + } + }, + "description": "A metric availability value." + }, + "MetricDefinition": { + "properties": { + "name": { + "readOnly": true, + "$ref": "#/definitions/MetricName", + "description": "The name information for the metric." + }, + "primaryAggregationType": { + "readOnly": true, + "type": "string", + "description": "The primary aggregation type defining how metric values are displayed.", + "enum": ["None", "Average", "Count", "Minimum", "Maximum", "Total"], + "x-ms-enum": { + "modelAsString": true, + "name": "PrimaryAggregationType" + } + }, + "resourceUri": { + "readOnly": true, + "type": "string", + "description": "The resource uri of the database." + }, + "unit": { + "readOnly": true, + "type": "string", + "description": "The unit of the metric.", + "enum": ["Count", "Bytes", "Seconds", "Percent", "CountPerSecond", "BytesPerSecond"], + "x-ms-enum": { + "modelAsString": true, + "name": "UnitDefinitionType" + } + }, + "metricAvailabilities": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/MetricAvailability" + }, + "description": "The list of database metric availabities for the metric." + } + }, + "description": "A database metric definition." + }, + "MetricDefinitionListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricDefinition" + }, + "description": "The list of metric definitions for the database." + } + }, + "required": ["value"], + "description": "The response to a list database metric definitions request." + }, + "SubResource": { + "description": "Subresource properties", + "properties": { + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name" + }, + "id": { + "readOnly": true, + "type": "string", + "description": "The resource ID." + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The subscription ID that identifies an Azure subscription." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the request." + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the server.", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/arm-sql/2014-04-01/swagger/sql.core.json b/arm-sql/2014-04-01/swagger/sql.core.json index b0a48c080544..33147bbb9dd6 100644 --- a/arm-sql/2014-04-01/swagger/sql.core.json +++ b/arm-sql/2014-04-01/swagger/sql.core.json @@ -330,50 +330,6 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages": { - "get": { - "tags": [ - "Databases" - ], - "operationId": "Databases_ListUsages", - "description": "Returns database usages.", - "x-ms-examples": { - "List database usage metrics": { "$ref": "../examples/DatabaseUsageMetricsList.json" } - }, - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "name": "databaseName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the database." - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DatabaseMetricListResult" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}": { "put": { "tags": [ @@ -2363,7 +2319,7 @@ "x-nullable": false } }, - "description": "Represents a Slo Usage Metric." + "description": "A Slo Usage Metric." }, "OperationImpact": { "properties": { @@ -2390,119 +2346,7 @@ "description": "The relative impact to dimension (null if not applicable)" } }, - "description": "Represents impact of an operation, both in absolute and relative terms." - }, - "DatabaseMetric": { - "properties": { - "resourceName": { - "readOnly": true, - "type": "string", - "description": "The name of the resource." - }, - "displayName": { - "readOnly": true, - "type": "string", - "description": "The metric display name." - }, - "currentValue": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The current value of the metric." - }, - "limit": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The current limit of the metric." - }, - "unit": { - "readOnly": true, - "type": "string", - "description": "The units of the metric." - }, - "nextResetTime": { - "readOnly": true, - "type": "string", - "format": "date-time", - "description": "The next reset time for the metric (ISO8601 format)." - } - }, - "description": "Represents database metrics.", - "allOf": [ - { - "$ref": "#/definitions/SubResource" - } - ] - }, - "DatabaseMetricListResult": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/DatabaseMetric" - }, - "description": "The list of database metrics for the database." - } - }, - "required": ["value"], - "description": "Represents the response to a list database metrics request." - }, - "ServerMetric": { - "properties": { - "name": { - "readOnly": true, - "type": "string", - "description": "Name of the server usage metric." - }, - "resourceName": { - "readOnly": true, - "type": "string", - "description": "The name of the resource." - }, - "displayName": { - "readOnly": true, - "type": "string", - "description": "The metric display name." - }, - "currentValue": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The current value of the metric." - }, - "limit": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The current limit of the metric." - }, - "unit": { - "readOnly": true, - "type": "string", - "description": "The units of the metric." - }, - "nextResetTime": { - "readOnly": true, - "type": "string", - "format": "date-time", - "description": "The next reset time for the metric (ISO8601 format)." - } - }, - "description": "Represents server metrics." - }, - "ServerMetricListResult": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/ServerMetric" - }, - "description": "The list of server metrics for the server." - } - }, - "required": ["value"], - "description": "Represents the response to a list server metrics request." + "description": "The impact of an operation, both in absolute and relative terms." }, "ServiceTierAdvisorListResult": { "properties": { diff --git a/arm-sql/2014-04-01/swagger/usages.json b/arm-sql/2014-04-01/swagger/usages.json index edd93b17ebfd..eeca65fe62a9 100644 --- a/arm-sql/2014-04-01/swagger/usages.json +++ b/arm-sql/2014-04-01/swagger/usages.json @@ -44,7 +44,51 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ServerMetricListResult" + "$ref": "#/definitions/ServerUsageListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages": { + "get": { + "tags": [ + "Databases" + ], + "operationId": "Databases_ListUsages", + "description": "Returns database usages.", + "x-ms-examples": { + "List database usage metrics": { "$ref": "../examples/DatabaseUsageMetricsList.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the database." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DatabaseUsageListResult" } } }, @@ -55,7 +99,7 @@ } }, "definitions": { - "ServerMetric": { + "ServerUsage": { "properties": { "name": { "readOnly": true, @@ -98,18 +142,89 @@ }, "description": "Represents server metrics." }, - "ServerMetricListResult": { + "ServerUsageListResult": { "properties": { "value": { "type": "array", "items": { - "$ref": "#/definitions/ServerMetric" + "$ref": "#/definitions/ServerUsage" }, "description": "The list of server metrics for the server." } }, "required": ["value"], "description": "Represents the response to a list server metrics request." + }, + "DatabaseUsage": { + "properties": { + "resourceName": { + "readOnly": true, + "type": "string", + "description": "The name of the resource." + }, + "displayName": { + "readOnly": true, + "type": "string", + "description": "The usage metric display name." + }, + "currentValue": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The current value of the usage metric." + }, + "limit": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The current limit of the usage metric." + }, + "unit": { + "readOnly": true, + "type": "string", + "description": "The units of the usage metric." + }, + "nextResetTime": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The next reset time for the usage metric (ISO8601 format)." + } + }, + "description": "The database usages.", + "allOf": [ + { + "$ref": "#/definitions/SubResource" + } + ] + }, + "DatabaseUsageListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseUsage" + }, + "description": "The list of database usages for the database." + } + }, + "required": ["value"], + "description": "The response to a list database metrics request." + }, + "SubResource": { + "description": "Subresource properties", + "properties": { + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name" + }, + "id": { + "readOnly": true, + "type": "string", + "description": "The resource ID." + } + } } }, "parameters": { diff --git a/arm-sql/compositeSql.json b/arm-sql/compositeSql.json index a8c679ce5d0b..ecbba3091212 100644 --- a/arm-sql/compositeSql.json +++ b/arm-sql/compositeSql.json @@ -8,6 +8,7 @@ "./2014-04-01/swagger/capabilities.json", "./2014-04-01/swagger/firewallRules.json", "./2014-04-01/swagger/importExport.json", + "./2014-04-01/swagger/metrics.json", "./2014-04-01/swagger/operations.json", "./2014-04-01/swagger/replicationLinks.json", "./2014-04-01/swagger/sql.core.json",