From 4389594677a51062d017ee9381bf6d2ff89eaa76 Mon Sep 17 00:00:00 2001 From: chandrasekarendran <59728024+chandrasekarendran@users.noreply.github.com> Date: Fri, 28 Feb 2020 02:42:39 +0530 Subject: [PATCH] New Put API for updating vault security config (#8292) * Adding Swagger details for Put BackupResourceVaultConfigs call Adding Swagger details for Put BackupResourceVaultConfigs call * Setting feature state as Enabled * Fixing duplicate OperationId for new Put API * Adding default response Co-authored-by: gcs06 --- .../BackupResourceVaultConfigs_Patch.json | 4 +- .../stable/2019-06-15/bms.json | 52 +++++++++++++++++++ .../BackupResourceVaultConfigs_Patch.json | 4 +- .../BackupResourceVaultConfigs_Put.json | 27 ++++++++++ 4 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/examples/Common/BackupResourceVaultConfigs_Put.json diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-05-13/examples/Common/BackupResourceVaultConfigs_Patch.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-05-13/examples/Common/BackupResourceVaultConfigs_Patch.json index aa044378b4df..78129dfabef1 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-05-13/examples/Common/BackupResourceVaultConfigs_Patch.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-05-13/examples/Common/BackupResourceVaultConfigs_Patch.json @@ -7,7 +7,7 @@ "parameters": { "properties": { "enhancedSecurityState": "Enabled", - "softDeleteFeatureState": "Disabled" + "softDeleteFeatureState": "Enabled" } } }, @@ -19,7 +19,7 @@ "type": "Microsoft.RecoveryServices/vaults/backupconfig", "properties": { "enhancedSecurityState": "Enabled", - "softDeleteFeatureState": "Disabled" + "softDeleteFeatureState": "Enabled" } } } diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/bms.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/bms.json index 6ff3c63b4322..aa358fefa44b 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/bms.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/bms.json @@ -101,6 +101,58 @@ "$ref": "./examples/Common/BackupResourceVaultConfigs_Patch.json" } } + }, + "put": { + "tags": [ + "BackupResourceVaultConfigs" + ], + "description": "Updates vault security config.", + "operationId": "BackupResourceVaultConfigs_Put", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "name": "parameters", + "in": "body", + "description": "resource config request", + "required": true, + "schema": { + "$ref": "#/definitions/BackupResourceVaultConfigResource" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/BackupResourceVaultConfigResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Update Vault Security Config": { + "$ref": "./examples/Common/BackupResourceVaultConfigs_Put.json" + } + } } }, "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}": { diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/examples/Common/BackupResourceVaultConfigs_Patch.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/examples/Common/BackupResourceVaultConfigs_Patch.json index 3afab713b496..385b7324d179 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/examples/Common/BackupResourceVaultConfigs_Patch.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/examples/Common/BackupResourceVaultConfigs_Patch.json @@ -7,7 +7,7 @@ "parameters": { "properties": { "enhancedSecurityState": "Enabled", - "softDeleteFeatureState": "Disabled" + "softDeleteFeatureState": "Enabled" } } }, @@ -19,7 +19,7 @@ "type": "Microsoft.RecoveryServices/vaults/backupconfig", "properties": { "enhancedSecurityState": "Enabled", - "softDeleteFeatureState": "Disabled" + "softDeleteFeatureState": "Enabled" } } } diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/examples/Common/BackupResourceVaultConfigs_Put.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/examples/Common/BackupResourceVaultConfigs_Put.json new file mode 100644 index 000000000000..385b7324d179 --- /dev/null +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2019-06-15/examples/Common/BackupResourceVaultConfigs_Put.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "SwaggerTestRg", + "vaultName": "SwaggerTest", + "api-version": "2019-06-15", + "parameters": { + "properties": { + "enhancedSecurityState": "Enabled", + "softDeleteFeatureState": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/SwaggerTest/backupconfig/vaultconfig", + "name": "vaultconfig", + "type": "Microsoft.RecoveryServices/vaults/backupconfig", + "properties": { + "enhancedSecurityState": "Enabled", + "softDeleteFeatureState": "Enabled" + } + } + } + } +}