Skip to content

Commit

Permalink
Adding ResourceGuardProxy APIs to Microsoft.Dataprotection latest sta…
Browse files Browse the repository at this point in the history
…ble version (Azure#22574)

* manual swagger fix
adding change to newer version
ResourceGuardProxy APIs and example
fixing parameter refs
fixing refs
incorrect ref fixes
pattern for resourceGuardProxyName param
semantic fixes

* warning fixes

---------

Co-authored-by: Charan MVS <[email protected]>
  • Loading branch information
2 people authored and aviyerMSFT committed Mar 22, 2023
1 parent 5cfa6ef commit 63e935b
Show file tree
Hide file tree
Showing 6 changed files with 508 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3456,6 +3456,280 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies": {
"get": {
"tags": [
"DppResourceGuardProxies"
],
"summary": "Returns the list of ResourceGuardProxies associated with the vault",
"operationId": "DppResourceGuardProxy_List",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/VaultName"
},
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ResourceGuardProxyBaseResourceList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Get ResourceGuardProxies": {
"$ref": "./examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}": {
"get": {
"tags": [
"DppResourceGuardProxies"
],
"summary": "Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request",
"operationId": "DppResourceGuardProxy_Get",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/VaultName"
},
{
"name": "resourceGuardProxyName",
"description": "name of the resource guard proxy",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[A-Za-z0-9]*$"
},
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ResourceGuardProxyBaseResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"Get ResourceGuardProxy": {
"$ref": "./examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json"
}
}
},
"put": {
"tags": [
"DppResourceGuardProxies"
],
"summary": "Creates or Updates a ResourceGuardProxy",
"operationId": "DppResourceGuardProxy_CreateOrUpdate",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/VaultName"
},
{
"name": "resourceGuardProxyName",
"description": "name of the resource guard proxy",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[A-Za-z0-9]*$"
},
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter"
},
{
"name": "parameters",
"in": "body",
"description": "Request body for operation",
"required": true,
"schema": {
"$ref": "#/definitions/ResourceGuardProxyBaseResource"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ResourceGuardProxyBaseResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"Create ResourceGuardProxy": {
"$ref": "./examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json"
}
}
},
"delete": {
"tags": [
"DppResourceGuardProxies"
],
"summary": "Deletes the ResourceGuardProxy",
"operationId": "DppResourceGuardProxy_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/VaultName"
},
{
"name": "resourceGuardProxyName",
"description": "name of the resource guard proxy",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[A-Za-z0-9]*$"
},
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"204": {
"description": "NoContent"
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"Delete ResourceGuardProxy": {
"$ref": "./examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete": {
"post": {
"tags": [
"DppResourceGuardProxies"
],
"summary": "UnlockDelete call for ResourceGuardProxy, executed before one can delete it",
"operationId": "DppResourceGuardProxy_UnlockDelete",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/VaultName"
},
{
"name": "resourceGuardProxyName",
"description": "name of the resource guard proxy",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[A-Za-z0-9]*$"
},
{
"$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter"
},
{
"name": "parameters",
"in": "body",
"description": "Request body for operation",
"required": true,
"schema": {
"$ref": "#/definitions/UnlockDeleteRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/UnlockDeleteResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"UnlockDelete ResourceGuardProxy": {
"$ref": "./examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -6973,6 +7247,98 @@
}
}
}
},
"ResourceGuardOperationDetail": {
"description": "VaultCritical Operation protected by a resource guard",
"type": "object",
"properties": {
"vaultCriticalOperation": {
"type": "string"
},
"defaultResourceRequest": {
"type": "string"
}
}
},
"ResourceGuardProxyBase": {
"description": "ResourceGuardProxyBase object, used in ResourceGuardProxyBaseResource",
"type": "object",
"properties": {
"resourceGuardResourceId": {
"type": "string"
},
"resourceGuardOperationDetails": {
"type": "array",
"items": {
"$ref": "#/definitions/ResourceGuardOperationDetail"
},
"x-ms-identifiers": []
},
"lastUpdatedTime": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"ResourceGuardProxyBaseResource": {
"description": "ResourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/DppResource"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/ResourceGuardProxyBase",
"description": "ResourceGuardProxyBaseResource properties"
}
}
},
"ResourceGuardProxyBaseResourceList": {
"description": "List of ResourceGuardProxyBase resources",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/DppResourceList"
}
],
"properties": {
"value": {
"description": "List of resources.",
"type": "array",
"items": {
"$ref": "#/definitions/ResourceGuardProxyBaseResource"
}
}
}
},
"UnlockDeleteRequest": {
"description": "Request body of unlock delete API.",
"type": "object",
"properties": {
"resourceGuardOperationRequests": {
"type": "array",
"items": {
"type": "string"
}
},
"resourceToBeDeleted": {
"type": "string"
}
}
},
"UnlockDeleteResponse": {
"description": "Response of Unlock Delete API.",
"type": "object",
"properties": {
"unlockDeleteExpiryTime": {
"description": "This is the time when unlock delete privileges will get expired.",
"type": "string"
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7",
"vaultName": "sampleVault",
"resourceGroupName": "SampleResourceGroup",
"resourceGuardProxyName": "swaggerExample",
"api-version": "2023-01-01"
},
"responses": {
"200": {},
"204": {}
}
}
Loading

0 comments on commit 63e935b

Please sign in to comment.