Provides the details of the tiering related sizes and cost.
Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult API.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/fetchTieringCost?api-version=2026-10-01
URI Parameters
| Name |
In |
Required |
Type |
Description |
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
The name of the resource group. The name is case insensitive.
|
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
The ID of the target subscription.
|
|
vaultName
|
path |
True
|
string
minLength: 2 maxLength: 50 pattern: ^[A-Za-z][-A-Za-z0-9]*[A-Za-z0-9]$
|
The name of the recovery services vault.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
The API version to use for this operation.
|
Request Body
The request body can be one of the following:
FetchTieringCostInfoForRehydrationRequest
Request parameters for fetching cost info of rehydration
| Name |
Required |
Type |
Description |
|
containerName
|
True
|
string
|
Name of the protected item container
|
|
objectType
|
True
|
string:
FetchTieringCostInfoForRehydrationRequest
|
This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
|
|
protectedItemName
|
True
|
string
|
Name of the protectedItemName
|
|
recoveryPointId
|
True
|
string
|
ID of the backup copy for rehydration cost info needs to be fetched.
|
|
rehydrationPriority
|
True
|
RehydrationPriority
|
Rehydration Priority
|
|
sourceTierType
|
True
|
RecoveryPointTierType
|
Source tier for the request
|
|
targetTierType
|
True
|
RecoveryPointTierType
|
target tier for the request
|
FetchTieringCostSavingsInfoForPolicyRequest
Request parameters for tiering cost info for policy
| Name |
Required |
Type |
Description |
|
objectType
|
True
|
string:
FetchTieringCostSavingsInfoForPolicyRequest
|
This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
|
|
policyName
|
True
|
string
|
Name of the backup policy for which the cost savings information is requested
|
|
sourceTierType
|
True
|
RecoveryPointTierType
|
Source tier for the request
|
|
targetTierType
|
True
|
RecoveryPointTierType
|
target tier for the request
|
FetchTieringCostSavingsInfoForProtectedItemRequest
Request parameters for tiering cost info for protected item
| Name |
Required |
Type |
Description |
|
containerName
|
True
|
string
|
Name of the protected item container
|
|
objectType
|
True
|
string:
FetchTieringCostSavingsInfoForProtectedItemRequest
|
This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
|
|
protectedItemName
|
True
|
string
|
Name of the protectedItemName
|
|
sourceTierType
|
True
|
RecoveryPointTierType
|
Source tier for the request
|
|
targetTierType
|
True
|
RecoveryPointTierType
|
target tier for the request
|
FetchTieringCostSavingsInfoForVaultRequest
Request parameters for tiering cost info for vault
Responses
| Name |
Type |
Description |
|
200 OK
|
TieringCostInfo:
|
Azure operation completed successfully.
|
|
202 Accepted
|
|
Accepted
Headers
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
An unexpected error response.
|
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 the rehydration cost for recovery point
Sample request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/fetchTieringCost?api-version=2026-10-01
{
"containerName": "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"objectType": "FetchTieringCostInfoForRehydrationRequest",
"protectedItemName": "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"recoveryPointId": "1222343434",
"rehydrationPriority": "High",
"sourceTierType": "ArchivedRP",
"targetTierType": "HardenedRP"
}
import com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostInfoForRehydrationRequest;
import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType;
import com.azure.resourcemanager.recoveryservicesbackup.models.RehydrationPriority;
/**
* Samples for FetchTieringCost Post.
*/
public final class Main {
/*
* x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForRehydrate.json
*/
/**
* Sample code: Get the rehydration cost for recovery point.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void getTheRehydrationCostForRecoveryPoint(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager.fetchTieringCosts().post("netsdktestrg", "testVault",
new FetchTieringCostInfoForRehydrationRequest().withSourceTierType(RecoveryPointTierType.ARCHIVED_RP)
.withTargetTierType(RecoveryPointTierType.HARDENED_RP)
.withContainerName("IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1")
.withProtectedItemName("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1")
.withRecoveryPointId("1222343434").withRehydrationPriority(RehydrationPriority.HIGH),
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 fetch_tiering_cost_for_rehydrate.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",
)
response = client.fetch_tiering_cost.begin_post(
resource_group_name="netsdktestrg",
vault_name="testVault",
parameters={
"containerName": "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"objectType": "FetchTieringCostInfoForRehydrationRequest",
"protectedItemName": "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"recoveryPointId": "1222343434",
"rehydrationPriority": "High",
"sourceTierType": "ArchivedRP",
"targetTierType": "HardenedRP",
},
).result()
print(response)
# x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForRehydrate.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/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v5"
)
// Generated from example definition: 2026-10-01/TieringCost/FetchTieringCostForRehydrate.json
func ExampleFetchTieringCostClient_BeginPost_getTheRehydrationCostForRecoveryPoint() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewFetchTieringCostClient().BeginPost(ctx, "netsdktestrg", "testVault", &armrecoveryservicesbackup.FetchTieringCostInfoForRehydrationRequest{
ContainerName: to.Ptr("IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
ObjectType: to.Ptr("FetchTieringCostInfoForRehydrationRequest"),
ProtectedItemName: to.Ptr("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
RecoveryPointID: to.Ptr("1222343434"),
RehydrationPriority: to.Ptr(armrecoveryservicesbackup.RehydrationPriorityHigh),
SourceTierType: to.Ptr(armrecoveryservicesbackup.RecoveryPointTierTypeArchivedRP),
TargetTierType: to.Ptr(armrecoveryservicesbackup.RecoveryPointTierTypeHardenedRP),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armrecoveryservicesbackup.FetchTieringCostClientPostResponse{
// TieringCostInfoClassification: &armrecoveryservicesbackup.TieringCostRehydrationInfo{
// ObjectType: to.Ptr("TieringCostRehydrationInfo"),
// RehydrationSizeInBytes: to.Ptr[int64](1204000),
// RetailRehydrationCostPerGBPerMonth: to.Ptr[float64](0.02),
// },
// }
}
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 provides the details of the tiering related sizes and cost.
* Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult API.
*
* @summary provides the details of the tiering related sizes and cost.
* Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult API.
* x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForRehydrate.json
*/
async function getTheRehydrationCostForRecoveryPoint() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.fetchTieringCost.post("netsdktestrg", "testVault", {
containerName: "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
objectType: "FetchTieringCostInfoForRehydrationRequest",
protectedItemName: "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
recoveryPointId: "1222343434",
rehydrationPriority: "High",
sourceTierType: "ArchivedRP",
targetTierType: "HardenedRP",
});
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
Sample response
{
"objectType": "TieringCostRehydrationInfo",
"rehydrationSizeInBytes": 1204000,
"retailRehydrationCostPerGBPerMonth": 0.02
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/operationsStatus/00000000-0000-0000-0000-000000000000?api-version=2025-02-01
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/operationResults/00000000-0000-0000-0000-000000000000?api-version=2025-02-01
Retry-After: 60
Get the tiering savings cost info for policy
Sample request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/fetchTieringCost?api-version=2026-10-01
{
"objectType": "FetchTieringCostSavingsInfoForPolicyRequest",
"policyName": "monthly",
"sourceTierType": "HardenedRP",
"targetTierType": "ArchivedRP"
}
import com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostSavingsInfoForPolicyRequest;
import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType;
/**
* Samples for FetchTieringCost Post.
*/
public final class Main {
/*
* x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForPolicy.json
*/
/**
* Sample code: Get the tiering savings cost info for policy.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void getTheTieringSavingsCostInfoForPolicy(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager.fetchTieringCosts().post("netsdktestrg", "testVault",
new FetchTieringCostSavingsInfoForPolicyRequest().withSourceTierType(RecoveryPointTierType.HARDENED_RP)
.withTargetTierType(RecoveryPointTierType.ARCHIVED_RP).withPolicyName("monthly"),
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 fetch_tiering_cost_for_policy.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",
)
response = client.fetch_tiering_cost.begin_post(
resource_group_name="netsdktestrg",
vault_name="testVault",
parameters={
"objectType": "FetchTieringCostSavingsInfoForPolicyRequest",
"policyName": "monthly",
"sourceTierType": "HardenedRP",
"targetTierType": "ArchivedRP",
},
).result()
print(response)
# x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForPolicy.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/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v5"
)
// Generated from example definition: 2026-10-01/TieringCost/FetchTieringCostForPolicy.json
func ExampleFetchTieringCostClient_BeginPost_getTheTieringSavingsCostInfoForPolicy() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewFetchTieringCostClient().BeginPost(ctx, "netsdktestrg", "testVault", &armrecoveryservicesbackup.FetchTieringCostSavingsInfoForPolicyRequest{
ObjectType: to.Ptr("FetchTieringCostSavingsInfoForPolicyRequest"),
PolicyName: to.Ptr("monthly"),
SourceTierType: to.Ptr(armrecoveryservicesbackup.RecoveryPointTierTypeHardenedRP),
TargetTierType: to.Ptr(armrecoveryservicesbackup.RecoveryPointTierTypeArchivedRP),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armrecoveryservicesbackup.FetchTieringCostClientPostResponse{
// TieringCostInfoClassification: &armrecoveryservicesbackup.TieringCostSavingInfo{
// ObjectType: to.Ptr("TieringCostSavingInfo"),
// RetailSourceTierCostPerGBPerMonth: to.Ptr[float64](0.02),
// RetailTargetTierCostPerGBPerMonth: to.Ptr[float64](0.003),
// SourceTierSizeReductionInBytes: to.Ptr[int64](1204000),
// TargetTierSizeIncreaseInBytes: to.Ptr[int64](1892),
// },
// }
}
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 provides the details of the tiering related sizes and cost.
* Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult API.
*
* @summary provides the details of the tiering related sizes and cost.
* Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult API.
* x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForPolicy.json
*/
async function getTheTieringSavingsCostInfoForPolicy() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.fetchTieringCost.post("netsdktestrg", "testVault", {
objectType: "FetchTieringCostSavingsInfoForPolicyRequest",
policyName: "monthly",
sourceTierType: "HardenedRP",
targetTierType: "ArchivedRP",
});
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
Sample response
{
"objectType": "TieringCostSavingInfo",
"retailSourceTierCostPerGBPerMonth": 0.02,
"retailTargetTierCostPerGBPerMonth": 0.003,
"sourceTierSizeReductionInBytes": 1204000,
"targetTierSizeIncreaseInBytes": 1892
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/operationsStatus/00000000-0000-0000-0000-000000000000?api-version=2025-02-01
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/operationResults/00000000-0000-0000-0000-000000000000?api-version=2025-02-01
Retry-After: 60
Get the tiering savings cost info for protected item
Sample request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/fetchTieringCost?api-version=2026-10-01
{
"containerName": "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"objectType": "FetchTieringCostSavingsInfoForProtectedItemRequest",
"protectedItemName": "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"sourceTierType": "HardenedRP",
"targetTierType": "ArchivedRP"
}
import com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostSavingsInfoForProtectedItemRequest;
import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType;
/**
* Samples for FetchTieringCost Post.
*/
public final class Main {
/*
* x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForProtectedItem.json
*/
/**
* Sample code: Get the tiering savings cost info for protected item.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void getTheTieringSavingsCostInfoForProtectedItem(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager.fetchTieringCosts().post("netsdktestrg", "testVault",
new FetchTieringCostSavingsInfoForProtectedItemRequest()
.withSourceTierType(RecoveryPointTierType.HARDENED_RP)
.withTargetTierType(RecoveryPointTierType.ARCHIVED_RP)
.withContainerName("IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1")
.withProtectedItemName("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
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 fetch_tiering_cost_for_protected_item.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",
)
response = client.fetch_tiering_cost.begin_post(
resource_group_name="netsdktestrg",
vault_name="testVault",
parameters={
"containerName": "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"objectType": "FetchTieringCostSavingsInfoForProtectedItemRequest",
"protectedItemName": "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"sourceTierType": "HardenedRP",
"targetTierType": "ArchivedRP",
},
).result()
print(response)
# x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForProtectedItem.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/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v5"
)
// Generated from example definition: 2026-10-01/TieringCost/FetchTieringCostForProtectedItem.json
func ExampleFetchTieringCostClient_BeginPost_getTheTieringSavingsCostInfoForProtectedItem() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewFetchTieringCostClient().BeginPost(ctx, "netsdktestrg", "testVault", &armrecoveryservicesbackup.FetchTieringCostSavingsInfoForProtectedItemRequest{
ContainerName: to.Ptr("IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
ObjectType: to.Ptr("FetchTieringCostSavingsInfoForProtectedItemRequest"),
ProtectedItemName: to.Ptr("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
SourceTierType: to.Ptr(armrecoveryservicesbackup.RecoveryPointTierTypeHardenedRP),
TargetTierType: to.Ptr(armrecoveryservicesbackup.RecoveryPointTierTypeArchivedRP),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armrecoveryservicesbackup.FetchTieringCostClientPostResponse{
// TieringCostInfoClassification: &armrecoveryservicesbackup.TieringCostSavingInfo{
// ObjectType: to.Ptr("TieringCostSavingInfo"),
// RetailSourceTierCostPerGBPerMonth: to.Ptr[float64](0.02),
// RetailTargetTierCostPerGBPerMonth: to.Ptr[float64](0.003),
// SourceTierSizeReductionInBytes: to.Ptr[int64](1204000),
// TargetTierSizeIncreaseInBytes: to.Ptr[int64](1892),
// },
// }
}
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 provides the details of the tiering related sizes and cost.
* Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult API.
*
* @summary provides the details of the tiering related sizes and cost.
* Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult API.
* x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForProtectedItem.json
*/
async function getTheTieringSavingsCostInfoForProtectedItem() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.fetchTieringCost.post("netsdktestrg", "testVault", {
containerName: "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
objectType: "FetchTieringCostSavingsInfoForProtectedItemRequest",
protectedItemName: "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
sourceTierType: "HardenedRP",
targetTierType: "ArchivedRP",
});
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
Sample response
{
"objectType": "TieringCostSavingInfo",
"retailSourceTierCostPerGBPerMonth": 0.02,
"retailTargetTierCostPerGBPerMonth": 0.003,
"sourceTierSizeReductionInBytes": 1204000,
"targetTierSizeIncreaseInBytes": 1892
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/operationsStatus/00000000-0000-0000-0000-000000000000?api-version=2025-02-01
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/operationResults/00000000-0000-0000-0000-000000000000?api-version=2025-02-01
Retry-After: 60
Get the tiering savings cost info for vault
Sample request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/fetchTieringCost?api-version=2026-10-01
{
"objectType": "FetchTieringCostSavingsInfoForVaultRequest",
"sourceTierType": "HardenedRP",
"targetTierType": "ArchivedRP"
}
import com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostSavingsInfoForVaultRequest;
import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType;
/**
* Samples for FetchTieringCost Post.
*/
public final class Main {
/*
* x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForVault.json
*/
/**
* Sample code: Get the tiering savings cost info for vault.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void getTheTieringSavingsCostInfoForVault(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager.fetchTieringCosts().post("netsdktestrg", "testVault",
new FetchTieringCostSavingsInfoForVaultRequest().withSourceTierType(RecoveryPointTierType.HARDENED_RP)
.withTargetTierType(RecoveryPointTierType.ARCHIVED_RP),
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 fetch_tiering_cost_for_vault.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",
)
response = client.fetch_tiering_cost.begin_post(
resource_group_name="netsdktestrg",
vault_name="testVault",
parameters={
"objectType": "FetchTieringCostSavingsInfoForVaultRequest",
"sourceTierType": "HardenedRP",
"targetTierType": "ArchivedRP",
},
).result()
print(response)
# x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForVault.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/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v5"
)
// Generated from example definition: 2026-10-01/TieringCost/FetchTieringCostForVault.json
func ExampleFetchTieringCostClient_BeginPost_getTheTieringSavingsCostInfoForVault() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewFetchTieringCostClient().BeginPost(ctx, "netsdktestrg", "testVault", &armrecoveryservicesbackup.FetchTieringCostSavingsInfoForVaultRequest{
ObjectType: to.Ptr("FetchTieringCostSavingsInfoForVaultRequest"),
SourceTierType: to.Ptr(armrecoveryservicesbackup.RecoveryPointTierTypeHardenedRP),
TargetTierType: to.Ptr(armrecoveryservicesbackup.RecoveryPointTierTypeArchivedRP),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %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 = armrecoveryservicesbackup.FetchTieringCostClientPostResponse{
// TieringCostInfoClassification: &armrecoveryservicesbackup.TieringCostSavingInfo{
// ObjectType: to.Ptr("TieringCostSavingInfo"),
// RetailSourceTierCostPerGBPerMonth: to.Ptr[float64](0.02),
// RetailTargetTierCostPerGBPerMonth: to.Ptr[float64](0.003),
// SourceTierSizeReductionInBytes: to.Ptr[int64](1204000),
// TargetTierSizeIncreaseInBytes: to.Ptr[int64](1892),
// },
// }
}
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 provides the details of the tiering related sizes and cost.
* Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult API.
*
* @summary provides the details of the tiering related sizes and cost.
* Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult API.
* x-ms-original-file: 2026-10-01/TieringCost/FetchTieringCostForVault.json
*/
async function getTheTieringSavingsCostInfoForVault() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.fetchTieringCost.post("netsdktestrg", "testVault", {
objectType: "FetchTieringCostSavingsInfoForVaultRequest",
sourceTierType: "HardenedRP",
targetTierType: "ArchivedRP",
});
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
Sample response
{
"objectType": "TieringCostSavingInfo",
"retailSourceTierCostPerGBPerMonth": 0.02,
"retailTargetTierCostPerGBPerMonth": 0.003,
"sourceTierSizeReductionInBytes": 1204000,
"targetTierSizeIncreaseInBytes": 1892
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/operationsStatus/00000000-0000-0000-0000-000000000000?api-version=2025-02-01
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupTieringCost/default/operationResults/00000000-0000-0000-0000-000000000000?api-version=2025-02-01
Retry-After: 60
Definitions
ErrorDetail
Object
Error Detail class which encapsulates Code, Message and Recommendations.
| Name |
Type |
Description |
|
code
|
string
|
Error code.
|
|
message
|
string
|
Error Message related to the Code.
|
|
recommendations
|
string[]
|
List of recommendation strings.
|
ErrorResponse
Object
Error response
| Name |
Type |
Description |
|
error
|
ErrorDetail
|
The error object.
|
FetchTieringCostInfoForRehydrationRequest
Object
Request parameters for fetching cost info of rehydration
| Name |
Type |
Description |
|
containerName
|
string
|
Name of the protected item container
|
|
objectType
|
string:
FetchTieringCostInfoForRehydrationRequest
|
This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
|
|
protectedItemName
|
string
|
Name of the protectedItemName
|
|
recoveryPointId
|
string
|
ID of the backup copy for rehydration cost info needs to be fetched.
|
|
rehydrationPriority
|
RehydrationPriority
|
Rehydration Priority
|
|
sourceTierType
|
RecoveryPointTierType
|
Source tier for the request
|
|
targetTierType
|
RecoveryPointTierType
|
target tier for the request
|
FetchTieringCostSavingsInfoForPolicyRequest
Object
Request parameters for tiering cost info for policy
| Name |
Type |
Description |
|
objectType
|
string:
FetchTieringCostSavingsInfoForPolicyRequest
|
This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
|
|
policyName
|
string
|
Name of the backup policy for which the cost savings information is requested
|
|
sourceTierType
|
RecoveryPointTierType
|
Source tier for the request
|
|
targetTierType
|
RecoveryPointTierType
|
target tier for the request
|
FetchTieringCostSavingsInfoForProtectedItemRequest
Object
Request parameters for tiering cost info for protected item
FetchTieringCostSavingsInfoForVaultRequest
Object
Request parameters for tiering cost info for vault
RecoveryPointTierType
Enumeration
Recovery point tier type.
| Value |
Description |
|
Invalid
|
|
|
InstantRP
|
|
|
HardenedRP
|
|
|
ArchivedRP
|
|
|
IASnapshotRP
|
Instant Access snapshot tier, retained for the policy's instantAccessDurationMinutes.
|
RehydrationPriority
Enumeration
Rehydration Priority
| Value |
Description |
|
Standard
|
|
|
High
|
|
TieringCostRehydrationInfo
Object
Response parameters for tiering cost info for rehydration
| Name |
Type |
Description |
|
objectType
|
string:
TieringCostRehydrationInfo
|
This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
|
|
rehydrationSizeInBytes
|
integer
(int64)
|
Rehydration size in bytes
|
|
retailRehydrationCostPerGBPerMonth
|
number
(double)
|
Source tier to target tier rehydration cost per GB per month
|
TieringCostSavingInfo
Object
Response parameters for tiering cost info for savings
| Name |
Type |
Description |
|
objectType
|
string:
TieringCostSavingInfo
|
This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
|
|
retailSourceTierCostPerGBPerMonth
|
number
(double)
|
Source tier retail cost per GB per month
|
|
retailTargetTierCostPerGBPerMonth
|
number
(double)
|
Target tier retail cost per GB per month
|
|
sourceTierSizeReductionInBytes
|
integer
(int64)
|
Source tier size reduction in bytes after moving all the recommended backup points to target tier
|
|
targetTierSizeIncreaseInBytes
|
integer
(int64)
|
Target tier size increase in bytes after moving all the recommended backup points to target tier
|