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

Adding restart network virtual appliance swagger changes #27467

Merged
Show file tree
Hide file tree
Changes from 9 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,15 @@
{
"parameters": {
"api-version": "2023-11-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"networkVirtualApplianceName": "nva"
},
"responses": {
"200": {
"headers": {
"location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/00000000-0000-0000-0000-000000000000?api-version=2023-11-01"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"api-version": "2023-11-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"networkVirtualApplianceName": "nva",
"instanceIds": [
"0",
"1"
]
},
"responses": {
"200": {
"headers": {
"location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/00000000-0000-0000-0000-000000000000?api-version=2023-11-01"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,67 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/restart": {
arsheen marked this conversation as resolved.
Show resolved Hide resolved
"post": {
"tags": [
"NetworkVirtualAppliances"
],
"operationId": "NetworkVirtualAppliances_Restart",
"description": "Restarts one or more VMs belonging to the specified Network Virtual Appliance.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "networkVirtualApplianceName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of Network Virtual Appliance."
arsheen marked this conversation as resolved.
Show resolved Hide resolved
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./network.json#/parameters/SubscriptionIdParameter"
},
{
"name": "NetworkVirtualApplianceInstanceIds",
Copy link
Contributor

@visingla-ms visingla-ms Jan 30, 2024

Choose a reason for hiding this comment

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

Parameter should have a description.

Copy link
Contributor Author

@arsheen arsheen Jan 30, 2024

Choose a reason for hiding this comment

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

I've added the description in the schema. Do I need to add it here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added description here as well

"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/NetworkVirtualApplianceInstanceIds"
}
}
],
"responses": {
"200": {
"description": "Request successful. The operation restarts one or more Network Virtual Appliance VM resources.",
"schema": {
"$ref": "#/definitions/NetworkVirtualApplianceInstanceIds"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./network.json#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"Restart All NetworkVirtualAppliance VMs in VM Scale Set": {
"$ref": "./examples/NetworkVirtualApplianceEmptyRestart.json"
},
"Restart Specific NetworkVirtualAppliance VMs in VM Scale Set": {
"$ref": "./examples/NetworkVirtualApplianceSpecificRestart.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances": {
"get": {
"tags": [
Expand Down Expand Up @@ -1325,6 +1386,18 @@
}
},
"description": "Properties of the partner managed resource."
},
"NetworkVirtualApplianceInstanceIds": {
"type": "object",
"properties": {
"instanceIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The network virtual appliance instance ids. Omitting the network virtual appliance instance ids will result in the operation being performed on all virtual machines belonging to the network virtual appliance."
}
}
}
}
}