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

Changes to add operation id for outbound rules #4320

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
@@ -0,0 +1,33 @@
{
"parameters": {
"subscriptionId": "subid",
"resourceGroupName": "testrg",
"loadBalancerName": "lb1",
"outboundRuleName": "rule1",
"api-version": "2018-08-01"
},
"responses": {
"200": {
"body": {
"name": "rule1",
"id": "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/outboundRules/rule1",
"etag": "W/\\\"00000000-0000-0000-0000-000000000000\\\"",
"properties": {
"provisioningState": "Succeeded",
"frontendIPConfigurations": [
{
"id": "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfrontend"
}
],
"allocatedOutboundPorts": 64,
"idleTimeoutInMinutes": 15,
"protocol": "Tcp",
"enableTcpReset": true,
"backendAddressPool": {
"id": "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/bepool1"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"subscriptionId": "subid",
"resourceGroupName": "testrg",
"loadBalancerName": "lb1",
"api-version": "2018-08-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "rule1",
"id": "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/outboundRules/rule1",
"etag": "W/\\\"00000000-0000-0000-0000-000000000000\\\"",
"properties": {
"provisioningState": "Succeeded",
"frontendIPConfigurations": [
{
"id": "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfrontend"
}
],
"allocatedOutboundPorts": 64,
"idleTimeoutInMinutes": 15,
"protocol": "Tcp",
"enableTcpReset": true,
"backendAddressPool": {
"id": "/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/bepool1"
}
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"consumes": [
"application/json"
],

"produces": [
"application/json"
],
Expand Down Expand Up @@ -800,6 +801,100 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules": {
"get": {
"tags": [
"LoadBalancers"
],
"operationId": "LoadBalancerOutboundRules_List",
"description": "Gets all the outbound rules in a load balancer.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "loadBalancerName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the load balancer."
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./network.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
Copy link
Contributor

Choose a reason for hiding this comment

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

You should include a 'default' response for all error cases, example: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json

      "default": {
        "description": "Error response describing why the operation failed.",
        "schema": {
          "$ref": "#/definitions/CloudError"
        }
      }

This should be addressed across your entire Swagger spec though. Please include this in your next PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will address it in the next PR - Tracking item - https://trello.com/c/HrzSc9bZ/69-include-a-default-response-for-all-error-cases

"description": "Request successful. The operation returns a list of LoadBalancer OutboundRule resources.",
"schema": {
"$ref": "#/definitions/LoadBalancerOutboundRuleListResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"LoadBalancerOutboundRuleList": { "$ref": "./examples/LoadBalancerOutboundRuleList.json" }
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}": {
"get": {
"tags": [
"LoadBalancers"
],
"operationId": "LoadBalancerOutboundRules_Get",
"description": "Gets the specified load balancer outbound rule.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "loadBalancerName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the load balancer."
},
{
"name": "outboundRuleName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the outbound rule."
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./network.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Request successful. The operation returns the resulting OutboundRule resource.",
"schema": {
"$ref": "#/definitions/OutboundRule"
}
}
},
"x-ms-examples": {
"LoadBalancerOutboundRuleGet": { "$ref": "./examples/LoadBalancerOutboundRuleGet.json" }
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces": {
"get": {
"tags": [
Expand Down Expand Up @@ -1658,6 +1753,23 @@
},
"description": "Response for ListLoadBalancingRule API service call."
},
"LoadBalancerOutboundRuleListResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/OutboundRule"
},
"description": "A list of outbound rules in a load balancer."
},
"nextLink": {
"readOnly": true,
"type": "string",
"description": "The URL to get the next set of results."
}
},
"description": "Response for ListOutboundRule API service call."
},
"LoadBalancerProbeListResult": {
"properties": {
"value": {
Expand Down