Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an
asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers?api-version=2026-10-01
With optional parameters:
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers?api-version=2026-10-01&$filter={$filter}
URI Parameters
Name
In
Required
Type
Description
fabricName
path
True
string
Fabric name associated the container.
resourceGroupName
path
True
string
minLength: 1 maxLength: 90
The name of the resource group. The name is case insensitive.
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupFabrics/Azure/refreshContainers?api-version=2026-10-01
from azure.identity import DefaultAzureCredential
from azure.mgmt.recoveryservicesbackup import RecoveryServicesBackupClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-recoveryservicesbackup
# USAGE
python refresh_containers.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="SUBSCRIPTION_ID",
)
client.protection_containers.refresh(
vault_name="NetSDKTestRsVault",
resource_group_name="SwaggerTestRg",
fabric_name="Azure",
)
# x-ms-original-file: 2026-10-01/Common/RefreshContainers.json
if __name__ == "__main__":
main()
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an
* asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API.
*
* @summary discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an
* asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API.
* x-ms-original-file: 2026-10-01/Common/RefreshContainers.json
*/
async function triggerAzureVmDiscovery() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
await client.protectionContainers.refresh("NetSDKTestRsVault", "SwaggerTestRg", "Azure");
}
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupFabrics/Azure/refreshContainers?api-version=2026-10-01&$filter=backupManagementType eq 'AzureWorkload' and containerSubscriptionId eq 'a76f4f58-8c04-4f53-9e68-4a698b0f43e4'
from azure.identity import DefaultAzureCredential
from azure.mgmt.recoveryservicesbackup import RecoveryServicesBackupClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-recoveryservicesbackup
# USAGE
python refresh_containers_cross_subscription.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="SUBSCRIPTION_ID",
)
client.protection_containers.refresh(
vault_name="NetSDKTestRsVault",
resource_group_name="SwaggerTestRg",
fabric_name="Azure",
)
# x-ms-original-file: 2026-10-01/Common/RefreshContainers_CrossSubscription.json
if __name__ == "__main__":
main()
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an
* asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API.
*
* @summary discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an
* asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API.
* x-ms-original-file: 2026-10-01/Common/RefreshContainers_CrossSubscription.json
*/
async function triggerCrossSubscriptionAzureWorkloadDiscovery() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
await client.protectionContainers.refresh("NetSDKTestRsVault", "SwaggerTestRg", "Azure", {
filter:
"backupManagementType eq 'AzureWorkload' and containerSubscriptionId eq 'a76f4f58-8c04-4f53-9e68-4a698b0f43e4'",
});
}