L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Protection Containers - Refresh
Service:
Recovery Services - Backup
Version d’API:
2026-10-01
Découvre tous les conteneurs de l’abonnement qui peuvent être sauvegardés dans le coffre Recovery Services. Il s’agit d’une opération asynchrone. Pour connaître l’état de l’opération, appelez l’API GetRefreshOperationResult.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers?api-version=2026-10-01
Avec des paramètres facultatifs:
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers?api-version=2026-10-01&$filter={$filter}
Paramètres URI
Nom
Dans
Obligatoire
Type
Description
fabricName
path
True
string
Le nom Fabric associait le contenant.
resourceGroupName
path
True
string
minLength: 1 maxLength: 90
Nom du groupe de ressources. Le nom ne respecte pas la casse.
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'",
});
}