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 swagger changes for GET and LIST replicationEligibilityResults API #7698

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,29 @@
{
"parameters": {
"api-version": "2018-07-10",
"virtualMachineName": "testVm1",
"resourceGroupName": "testRg1",
"subscriptionId": "d90d145a-4cdd-45a3-b2c4-971d69775278"
},
"responses": {
"200": {
"body": {
"name": "default",
"type": "Microsoft.RecoveryServices/replicationEligibilityResults",
"id": "/subscriptions/d90d145a-4cdd-45a3-b2c4-971d69775278/resourceGroups/testRg1/providers/Microsoft.Compute/virtualMachines/testVm1/providers/Microsoft.RecoveryServices/replicationEligibilityResults/default",
"properties": {
"clientRequestId": "7d72ade7-b9f7-4d9b-8a19-15d9728c6190",
"errors": [
{
"code": "A2AOperatingSystemNotSupported",
"message": "The A2A operation could not be completed as the virtual machine is running OS 'ubuntu' with version '18.04' which is not supported for replication.",
"possibleCauses": "OS version not supported.",
"recommendedAction": "The virtual machine is running unsupported Operating system. Refer to the documentation for supported OS versions - https://aka.ms/a2a-os-support-matrix.",
"status": "Error"
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"parameters": {
"api-version": "2018-07-10",
"virtualMachineName": "testVm2",
"resourceGroupName": "testRg1",
"subscriptionId": "d90d145a-4cdd-45a3-b2c4-971d69775278"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "default",
"type": "Microsoft.RecoveryServices/replicationEligibilityResults",
"id": "/subscriptions/d90d145a-4cdd-45a3-b2c4-971d69775278/resourceGroups/testRg1/providers/Microsoft.Compute/virtualMachines/testVm2/providers/Microsoft.RecoveryServices/replicationEligibilityResults/default",
"properties": {
"clientRequestId": "a62c81df-e26e-47ea-ab4b-f1fcc1e5b135",
"errors": [
{
"code": "AzureVmIsNotInDesiredProvisioningState",
"message": "Azure virtual machine with Id (/subscriptions/d90d145a-4cdd-45a3-b2c4-971d69775278/resourceGroups/testRg1/providers/Microsoft.Compute/virtualMachines/testVm2) is with provisioning state 'failed'. To enable replication, VM's provisioning state should be 'succeeded'.",
"possibleCauses": "Virtual machine is not in desired state.",
"recommendedAction": "\n Ensure that the VM's provisioning state is 'succeeded'.\n Refer to https://aka.ms/a2a-vm-state-issues to troubleshoot VM provisioning state issues.\n ",
"status": "Error"
},
{
"code": "AzureVmIsNotInDesiredPowerState",
"message": "Azure virtual machine with Id (/subscriptions/d90d145a-4cdd-45a3-b2c4-971d69775278/resourceGroups/testRg1/providers/Microsoft.Compute/virtualMachines/testVm2) is with power status 'deallocated'. To enable replication, VM's power status should be 'running'.",
"possibleCauses": "Virtual machine is not in desired state.",
"recommendedAction": "\n Ensure that the VM's power status is 'running'.\n You can check the power status in 'VM > Settings > Properties > Status' in Azure portal.\n ",
"status": "Error"
}
]
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,96 @@
}
}
},
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults": {
"get": {
"tags": [
"ReplicationEligibilityResults"
],
"summary": "Gets the validation errors in case the VM is unsuitable for protection.",
"description": "Validates whether a given VM can be protected or not in which case returns list of errors.",
"operationId": "ReplicationEligibilityResults_List",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/SubscriptionId"
},
{
"name": "virtualMachineName",
"in": "path",
"description": "Virtual Machine name.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ReplicationEligibilityResultsCollection"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-examples": {
"Gets the validation errors in case the VM is unsuitable for protection.": {
"$ref": "./examples/ReplicationEligibilityResults_List.json"
}
}
}
},
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults/default": {
"get": {
"tags": [
"ReplicationEligibilityResults"
],
"summary": "Gets the validation errors in case the VM is unsuitable for protection.",
"description": "Validates whether a given VM can be protected or not in which case returns list of errors.",
"operationId": "ReplicationEligibilityResults_Get",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/SubscriptionId"
},
{
"name": "virtualMachineName",
"in": "path",
"description": "Virtual Machine name.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ReplicationEligibilityResults"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-examples": {
"Gets the validation errors in case the VM is unsuitable for protection.": {
"$ref": "./examples/ReplicationEligibilityResults_Get.json"
}
}
}
},
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents": {
"get": {
"tags": [
Expand Down Expand Up @@ -15037,6 +15127,96 @@
}
}
},
"ReplicationEligibilityResults": {
"description": "Replication eligibility results response model.",
"type": "object",
"properties": {
"name": {
"description": "Gets the name of this object.",
"type": "string",
"readOnly": true
},
"type": {
"description": "Gets the object type.",
"type": "string",
"readOnly": true
},
"id": {
"description": "Gets Unique ARM identifier for this object.",
"type": "string",
"readOnly": true
},
"properties": {
"$ref": "#/definitions/ReplicationEligibilityResultsProperties",
"description": "Gets properties model for replication eligibility results API.",
"readOnly": true
}
}
},
"ReplicationEligibilityResultsCollection": {
"description": "Replication eligibility results collection response model.",
"type": "object",
"properties": {
"value": {
"description": "The replication eligibility results details.",
"uniqueItems": false,
"type": "array",
"items": {
"$ref": "#/definitions/ReplicationEligibilityResults"
}
}
}
},
"ReplicationEligibilityResultsErrorInfo": {
"description": "Error model that can be exposed to the user.",
"type": "object",
"properties": {
"code": {
"description": "The error code.",
"type": "string",
"readOnly": true
},
"message": {
"description": "The error message.",
"type": "string",
"readOnly": true
},
"possibleCauses": {
"description": "The possible causes.",
"type": "string",
"readOnly": true
},
"recommendedAction": {
"description": "The recommended action.",
"type": "string",
"readOnly": true
},
"status": {
"description": "The error status.",
"type": "string",
"readOnly": true
}
}
},
"ReplicationEligibilityResultsProperties": {
"description": "Properties model for replication eligibility results API.",
"type": "object",
"properties": {
"clientRequestId": {
"description": "The client request Id.",
"type": "string",
"readOnly": true
},
"errors": {
"description": "The error details.",
"uniqueItems": false,
"type": "array",
"items": {
"$ref": "#/definitions/ReplicationEligibilityResultsErrorInfo"
}
}
}
},
"ReplicationGroupDetails": {
"description": "Replication group details. This will be used in case of San and Wvr.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ These are the global settings for the RecoveryServicesSiteRecovery API.
``` yaml
openapi-type: arm
tag: package-2018-07

directive:
- where:
- $.paths
suppress:
- UniqueResourcePaths

```


Expand Down