Fetches resource vault config.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig?api-version=2023-02-01
URI Parameters
Name |
In |
Required |
Type |
Description |
resourceGroupName
|
path |
True
|
string
|
The name of the resource group where the recovery services vault is present.
|
subscriptionId
|
path |
True
|
string
|
The subscription Id.
|
vaultName
|
path |
True
|
string
|
The name of the recovery services vault.
|
api-version
|
query |
True
|
string
|
Client Api Version.
|
Responses
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
impersonate your user account.
|
Examples
Get Vault Security Config
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/SwaggerTest/backupconfig/vaultconfig?api-version=2023-02-01
/** Samples for BackupResourceVaultConfigs Get. */
public final class Main {
/*
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupResourceVaultConfigs_Get.json
*/
/**
* Sample code: Get Vault Security Config.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void getVaultSecurityConfig(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager
.backupResourceVaultConfigs()
.getWithResponse("SwaggerTest", "SwaggerTestRg", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.recoveryservicesbackup import RecoveryServicesBackupClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-recoveryservicesbackup
# USAGE
python backup_resource_vault_configs_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = RecoveryServicesBackupClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.backup_resource_vault_configs.get(
vault_name="SwaggerTest",
resource_group_name="SwaggerTestRg",
)
print(response)
# x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupResourceVaultConfigs_Get.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armrecoveryservicesbackup_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a498cae6d1a93f4c33073f0747b93b22815c09b7/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupResourceVaultConfigs_Get.json
func ExampleBackupResourceVaultConfigsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBackupResourceVaultConfigsClient().Get(ctx, "SwaggerTest", "SwaggerTestRg", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.BackupResourceVaultConfigResource = armrecoveryservicesbackup.BackupResourceVaultConfigResource{
// Name: to.Ptr("vaultconfig"),
// Type: to.Ptr("Microsoft.RecoveryServices/vaults/backupconfig"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/SwaggerTest/backupconfig/vaultconfig"),
// Properties: &armrecoveryservicesbackup.BackupResourceVaultConfig{
// EnhancedSecurityState: to.Ptr(armrecoveryservicesbackup.EnhancedSecurityStateEnabled),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Fetches resource vault config.
*
* @summary Fetches resource vault config.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupResourceVaultConfigs_Get.json
*/
async function getVaultSecurityConfig() {
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "SwaggerTest";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.backupResourceVaultConfigs.get(vaultName, resourceGroupName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.RecoveryServicesBackup;
using Azure.ResourceManager.RecoveryServicesBackup.Models;
// Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/Common/BackupResourceVaultConfigs_Get.json
// this example is just showing the usage of "BackupResourceVaultConfigs_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BackupResourceVaultConfigResource created on azure
// for more information of creating BackupResourceVaultConfigResource, please refer to the document of BackupResourceVaultConfigResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "SwaggerTestRg";
string vaultName = "SwaggerTest";
ResourceIdentifier backupResourceVaultConfigResourceId = BackupResourceVaultConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName);
BackupResourceVaultConfigResource backupResourceVaultConfig = client.GetBackupResourceVaultConfigResource(backupResourceVaultConfigResourceId);
// invoke the operation
BackupResourceVaultConfigResource result = await backupResourceVaultConfig.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BackupResourceVaultConfigData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"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"
}
}
Definitions
BackupResourceVaultConfig
Backup resource vault config details.
Name |
Type |
Description |
enhancedSecurityState
|
EnhancedSecurityState
|
Enabled or Disabled.
|
isSoftDeleteFeatureStateEditable
|
boolean
|
This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault
|
resourceGuardOperationRequests
|
string[]
|
ResourceGuard Operation Requests
|
softDeleteFeatureState
|
SoftDeleteFeatureState
|
Soft Delete feature state
|
softDeleteRetentionPeriodInDays
|
integer
|
Soft delete retention period in days
|
storageModelType
|
StorageType
|
Storage type.
|
storageType
|
StorageType
|
Storage type.
|
storageTypeState
|
StorageTypeState
|
Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked.
|
BackupResourceVaultConfigResource
Backup resource vault config details.
Name |
Type |
Description |
eTag
|
string
|
Optional ETag.
|
id
|
string
|
Resource Id represents the complete path to the resource.
|
location
|
string
|
Resource location.
|
name
|
string
|
Resource name associated with the resource.
|
properties
|
BackupResourceVaultConfig
|
BackupResourceVaultConfigResource properties
|
tags
|
object
|
Resource tags.
|
type
|
string
|
Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
|
EnhancedSecurityState
Enabled or Disabled.
Name |
Type |
Description |
Disabled
|
string
|
|
Enabled
|
string
|
|
Invalid
|
string
|
|
Error
The error object.
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
code
|
string
|
The error code.
|
details
|
NewErrorResponse[]
|
The error details.
|
message
|
string
|
The error message.
|
target
|
string
|
The error target.
|
ErrorAdditionalInfo
The resource management error additional info.
Name |
Type |
Description |
info
|
object
|
The additional info.
|
type
|
string
|
The additional info type.
|
NewErrorResponse
The resource management error response.
Name |
Type |
Description |
error
|
Error
|
The error object.
|
SoftDeleteFeatureState
Soft Delete feature state
Name |
Type |
Description |
AlwaysON
|
string
|
|
Disabled
|
string
|
|
Enabled
|
string
|
|
Invalid
|
string
|
|
StorageType
Storage type
Name |
Type |
Description |
GeoRedundant
|
string
|
|
Invalid
|
string
|
|
LocallyRedundant
|
string
|
|
ReadAccessGeoZoneRedundant
|
string
|
|
ZoneRedundant
|
string
|
|
StorageTypeState
Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked.
Name |
Type |
Description |
Invalid
|
string
|
|
Locked
|
string
|
|
Unlocked
|
string
|
|