Skip to content

Commit

Permalink
Feature: ObjectReplicationRestorePoint APIs with examples, validation…
Browse files Browse the repository at this point in the history
… and prettier check
  • Loading branch information
Udit Sharma committed May 10, 2023
1 parent ad4625b commit 6942ddf
Show file tree
Hide file tree
Showing 5 changed files with 338 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res7687",
"accountName": "src1122",
"objectReplicationPolicyId": "2a20bb73-5717-4635-985a-5d4cf777438f",
"api-version": "2023-01-01",
"monitor": "true",
"label": "label"
},
"responses": {
"200": {
"body": {
"id": "2a20bb73-5717-4635-985a-5d4cf777438f",
"label": "label",
"timestamp": "2023-03-08T03:01:55.7168089Z"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res6977",
"accountName": "sto2527",
"objectReplicationRestorePointId": "{objectReplicationRestorePoint-Id}",
"api-version": "2023-01-01",
"monitor": "true"
},
"responses": {
"200": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res6977",
"accountName": "sto2527",
"objectReplicationRestorePointId": "{objectReplicationRestorePoint-Id}",
"api-version": "2023-01-01",
"monitor": "true"
},
"responses": {
"200": {
"body": {
"id": "{objectReplicationPolicy-Id}",
"label": "label",
"timestamp": "2023-03-08T03:01:55.7168089Z",
"sourceAccount": "sourceaccount"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res6977",
"accountName": "sto2527",
"api-version": "2023-01-01",
"monitor": "true"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "c6c23999-fd4e-433a-bcf9-1db69d27cd8a",
"label": "sto2527",
"sourceAccount": "sourceaccount1",
"timestamp": "2023-03-01T13:45:30.0000000Z"
},
{
"id": "141d23dc-8958-4b48-b6e6-5a40bf1af116",
"label": "sto2527",
"sourceAccount": "sourceaccount1",
"timestamp": "2023-03-02T13:45:30.0000000Z"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,190 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restorePoints": {
"get": {
"tags": [
"ObjectReplicationRestorePoints"
],
"operationId": "ObjectReplicationRestorePoints_List",
"description": "List the object replication restore points associated with the storage account.",
"x-ms-examples": {
"StorageAccountListObjectReplicationRestorePoints": {
"$ref": "./examples/StorageAccountListObjectReplicationRestorePoints.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/StorageAccountName"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK -- List object replication restore points successfully.",
"schema": {
"$ref": "#/definitions/ObjectReplicationRestorePoints"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}/restorePointMarkers/default": {
"put": {
"tags": [
"ObjectReplicationRestorePointMarkers"
],
"operationId": "ObjectReplicationRestorePointMarkers_Create",
"description": "Create the object replication restore point marker of the storage account.",
"x-ms-examples": {
"StorageAccountCreateObjectReplicationRestorePointMarker": {
"$ref": "./examples/StorageAccountCreateObjectReplicationRestorePointMarker.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/StorageAccountName"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ObjectReplicationPolicyId"
},
{
"name": "label",
"schema": {
"$ref": "#/definitions/ObjectReplicationRestorePointMarkerLabel"
},
"in": "body",
"required": true,
"description": "The label for the object replication restore point marker set to a storage account."
}
],
"responses": {
"200": {
"description": "OK -- Put object replication restore point marker successfully.",
"schema": {
"$ref": "#/definitions/ObjectReplicationRestorePointMarker"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restorePoints/{objectReplicationRestorePointId}": {
"get": {
"tags": [
"ObjectReplicationRestorePoints"
],
"operationId": "ObjectReplicationRestorePoints_Get",
"description": "Get the object replication restore point of the storage account by restore point ID.",
"x-ms-examples": {
"StorageAccountGetObjectReplicationRestorePoints": {
"$ref": "./examples/StorageAccountGetObjectReplicationRestorePoint.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/StorageAccountName"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ObjectReplicationRestorePointId"
}
],
"responses": {
"200": {
"description": "OK -- Get the object replication restore point successfully.",
"schema": {
"$ref": "#/definitions/ObjectReplicationRestorePoint"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"ObjectReplicationRestorePoints"
],
"operationId": "ObjectReplicationRestorePoints_Delete",
"description": "Delete the object replication restore point associated with the specified storage account.",
"x-ms-examples": {
"StorageAccountDeleteObjectReplicationRestorePoints": {
"$ref": "./examples/StorageAccountDeleteObjectReplicationRestorePoint.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/StorageAccountName"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ObjectReplicationRestorePointId"
}
],
"responses": {
"200": {
"description": "OK -- Delete the object replication restore point successfully."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys": {
"post": {
"tags": [
Expand Down Expand Up @@ -5045,6 +5229,69 @@
},
"description": "Filters limit replication to a subset of blobs within the storage account. A logical OR is performed on values in the filter. If multiple filters are defined, a logical AND is performed on all filters."
},
"ObjectReplicationRestorePoints": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/ObjectReplicationRestorePoint"
},
"description": "The replication restore points of storage account."
}
},
"description": "List of storage account object replication restore points."
},
"ObjectReplicationRestorePointMarker": {
"properties": {
"id": {
"type": "string",
"description": "Restore point id is auto-generated for each new restore point marker of account."
},
"label": {
"type": "string",
"description": "Label of restore point marker, for reference."
},
"timestamp": {
"type": "string",
"readOnly": true,
"format": "date-time",
"description": "Timestamp of the restore point creation."
}
},
"description": "The replication restore point marker of storage account."
},
"ObjectReplicationRestorePoint": {
"properties": {
"id": {
"type": "string",
"description": "Restore point id is auto-generated for each new restore point of account."
},
"label": {
"type": "string",
"description": "Label of restore point, for reference."
},
"sourceAccount": {
"type": "string",
"description": "ARM id of account which created the restore point, for reference."
},
"timestamp": {
"type": "string",
"readOnly": true,
"format": "date-time",
"description": "Timestamp of the restore point creation."
}
},
"description": "The replication restore point of storage account."
},
"ObjectReplicationRestorePointMarkerLabel": {
"properties": {
"label": {
"type": "string",
"description": "Label of restore point marker, for reference."
}
},
"description": "The replication restore point marker label of storage account."
},
"LocalUsers": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -5484,6 +5731,15 @@
"minLength": 1,
"x-ms-parameter-location": "method"
},
"ObjectReplicationRestorePointId": {
"name": "objectReplicationRestorePointId",
"in": "path",
"required": true,
"type": "string",
"description": "The generated ID when you create the corresponding restore point marker",
"minLength": 1,
"x-ms-parameter-location": "method"
},
"Username": {
"name": "username",
"in": "path",
Expand Down

0 comments on commit 6942ddf

Please sign in to comment.