Skip to content

Commit

Permalink
Adding iperf APIs (Azure#14714)
Browse files Browse the repository at this point in the history
* Adding iperf APIs

* Addressing review comments

* Addressing PR comments

* Removing APIs unimplemented in Sterling

* Fixing resource schemas

* Fixing linting errors
  • Loading branch information
dsgouda authored and Andrew Sager committed Jun 24, 2021
1 parent 468d5c8 commit 8f8837b
Show file tree
Hide file tree
Showing 11 changed files with 1,293 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,341 @@
{
"swagger": "2.0",
"info": {
"title": "PostgreSQLServerManagementClient",
"description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.",
"version": "2021-06-01-preview"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advisors/{advisorName}": {
"get": {
"tags": [
"Advisors"
],
"operationId": "Advisors_Get",
"x-ms-examples": {
"AdvisorsGet": {
"$ref": "./examples/AdvisorsGet.json"
}
},
"description": "Get a recommendation action advisor.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/AdvisorNameParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Advisor"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advisors": {
"get": {
"tags": [
"Advisors"
],
"operationId": "Advisors_ListByServer",
"x-ms-examples": {
"AdvisorsListByServer": {
"$ref": "./examples/AdvisorsListByServer.json"
}
},
"description": "List recommendation action advisors.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AdvisorsResultList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advisors/{advisorName}/recommendedActions": {
"get": {
"tags": [
"RecommendedActions"
],
"operationId": "RecommendedActions_ListByServer",
"x-ms-examples": {
"RecommendedActionsListByServer": {
"$ref": "./examples/RecommendedActionsListByServer.json"
}
},
"description": "Retrieve recommended actions from the advisor.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/AdvisorNameParameter"
},
{
"name": "sessionId",
"in": "query",
"required": false,
"type": "string",
"description": "The recommendation action session identifier."
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/RecommendationActionsResultList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
}
},
"definitions": {
"AdvisorProperties": {
"type": "object",
"properties": {},
"description": "The properties of a recommendation action advisor."
},
"Advisor": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/AdvisorProperties",
"x-ms-client-flatten": true,
"description": "The properties of a recommendation action advisor."
}
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
}
],
"readOnly": true,
"description": "Represents a recommendation action advisor."
},
"AdvisorsResultList": {
"description": "A list of query statistics.",
"type": "object",
"properties": {
"value": {
"description": "The list of recommendation action advisors.",
"type": "array",
"items": {
"$ref": "#/definitions/Advisor"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
},
"RecommendationActionProperties": {
"type": "object",
"properties": {
"advisorName": {
"type": "string",
"description": "Advisor name."
},
"sessionId": {
"type": "string",
"description": "Recommendation action session identifier."
},
"actionId": {
"type": "integer",
"format": "int32",
"description": "Recommendation action identifier."
},
"createdTime": {
"type": "string",
"format": "date-time",
"description": "Recommendation action creation time."
},
"expirationTime": {
"type": "string",
"format": "date-time",
"description": "Recommendation action expiration time."
},
"reason": {
"type": "string",
"description": "Recommendation action reason."
},
"recommendationType": {
"type": "string",
"description": "Recommendation action type."
},
"details": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Recommendation action details."
}
},
"description": "The properties of a recommendation action."
},
"RecommendationAction": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/RecommendationActionProperties",
"x-ms-client-flatten": true,
"description": "The properties of a recommendation action."
}
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
}
],
"readOnly": true,
"description": "Represents a Recommendation Action."
},
"RecommendationActionsResultList": {
"description": "A list of recommendation actions.",
"type": "object",
"properties": {
"value": {
"description": "The list of recommendation action advisors.",
"type": "array",
"items": {
"$ref": "#/definitions/RecommendationAction"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
},
"CloudError": {
"x-ms-external": true,
"properties": {
"error": {
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse"
}
},
"description": "An error response from the Batch service."
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"description": "The name of the server.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
"AdvisorNameParameter": {
"name": "advisorName",
"in": "path",
"required": true,
"type": "string",
"description": "The advisor name for recommendation action.",
"x-ms-parameter-location": "method"
},
"RecommendedActionNameParameter": {
"name": "recommendedActionName",
"in": "path",
"required": true,
"type": "string",
"description": "The recommended action name.",
"x-ms-parameter-location": "method"
}
}
}
Loading

0 comments on commit 8f8837b

Please sign in to comment.