We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.netapp.getBackupPolicy
Explore with Pulumi AI
Use this data source to access information about an existing NetApp Backup Vault.
NetApp Backup Policy Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.netapp.getBackupPolicy({
    resourceGroupName: "example-resource-group",
    accountName: "example-netappaccount",
    name: "example-backuppolicy",
});
export const backupPolicyId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.netapp.get_backup_policy(resource_group_name="example-resource-group",
    account_name="example-netappaccount",
    name="example-backuppolicy")
pulumi.export("backupPolicyId", example.id)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/netapp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := netapp.LookupBackupPolicy(ctx, &netapp.LookupBackupPolicyArgs{
			ResourceGroupName: "example-resource-group",
			AccountName:       "example-netappaccount",
			Name:              "example-backuppolicy",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("backupPolicyId", example.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.NetApp.GetBackupPolicy.Invoke(new()
    {
        ResourceGroupName = "example-resource-group",
        AccountName = "example-netappaccount",
        Name = "example-backuppolicy",
    });
    return new Dictionary<string, object?>
    {
        ["backupPolicyId"] = example.Apply(getBackupPolicyResult => getBackupPolicyResult.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.netapp.NetappFunctions;
import com.pulumi.azure.netapp.inputs.GetBackupPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var example = NetappFunctions.getBackupPolicy(GetBackupPolicyArgs.builder()
            .resourceGroupName("example-resource-group")
            .accountName("example-netappaccount")
            .name("example-backuppolicy")
            .build());
        ctx.export("backupPolicyId", example.applyValue(getBackupPolicyResult -> getBackupPolicyResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:netapp:getBackupPolicy
      arguments:
        resourceGroupName: example-resource-group
        accountName: example-netappaccount
        name: example-backuppolicy
outputs:
  backupPolicyId: ${example.id}
Using getBackupPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getBackupPolicy(args: GetBackupPolicyArgs, opts?: InvokeOptions): Promise<GetBackupPolicyResult>
function getBackupPolicyOutput(args: GetBackupPolicyOutputArgs, opts?: InvokeOptions): Output<GetBackupPolicyResult>def get_backup_policy(account_name: Optional[str] = None,
                      name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetBackupPolicyResult
def get_backup_policy_output(account_name: Optional[pulumi.Input[str]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      resource_group_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetBackupPolicyResult]func LookupBackupPolicy(ctx *Context, args *LookupBackupPolicyArgs, opts ...InvokeOption) (*LookupBackupPolicyResult, error)
func LookupBackupPolicyOutput(ctx *Context, args *LookupBackupPolicyOutputArgs, opts ...InvokeOption) LookupBackupPolicyResultOutput> Note: This function is named LookupBackupPolicy in the Go SDK.
public static class GetBackupPolicy 
{
    public static Task<GetBackupPolicyResult> InvokeAsync(GetBackupPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetBackupPolicyResult> Invoke(GetBackupPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBackupPolicyResult> getBackupPolicy(GetBackupPolicyArgs args, InvokeOptions options)
public static Output<GetBackupPolicyResult> getBackupPolicy(GetBackupPolicyArgs args, InvokeOptions options)
fn::invoke:
  function: azure:netapp/getBackupPolicy:getBackupPolicy
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AccountName string
- The name of the NetApp Account in which the NetApp Policy exists.
- Name string
- The name of the NetApp Backup Policy.
- ResourceGroup stringName 
- The name of the resource group where the NetApp Backup Policy exists.
- AccountName string
- The name of the NetApp Account in which the NetApp Policy exists.
- Name string
- The name of the NetApp Backup Policy.
- ResourceGroup stringName 
- The name of the resource group where the NetApp Backup Policy exists.
- accountName String
- The name of the NetApp Account in which the NetApp Policy exists.
- name String
- The name of the NetApp Backup Policy.
- resourceGroup StringName 
- The name of the resource group where the NetApp Backup Policy exists.
- accountName string
- The name of the NetApp Account in which the NetApp Policy exists.
- name string
- The name of the NetApp Backup Policy.
- resourceGroup stringName 
- The name of the resource group where the NetApp Backup Policy exists.
- account_name str
- The name of the NetApp Account in which the NetApp Policy exists.
- name str
- The name of the NetApp Backup Policy.
- resource_group_ strname 
- The name of the resource group where the NetApp Backup Policy exists.
- accountName String
- The name of the NetApp Account in which the NetApp Policy exists.
- name String
- The name of the NetApp Backup Policy.
- resourceGroup StringName 
- The name of the resource group where the NetApp Backup Policy exists.
getBackupPolicy Result
The following output properties are available:
- AccountName string
- The name of the NetApp account in which the NetApp Policy exists.
- DailyBackups intTo Keep 
- The number of daily backups to keep.
- Enabled bool
- Whether the Backup Policy is enabled.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- NetApp Backup Policy location.
- MonthlyBackups intTo Keep 
- The number of monthly backups to keep.
- Name string
- ResourceGroup stringName 
- Dictionary<string, string>
- List of tags assigned to the resource.
- WeeklyBackups intTo Keep 
- The number of weekly backups to keep.
- AccountName string
- The name of the NetApp account in which the NetApp Policy exists.
- DailyBackups intTo Keep 
- The number of daily backups to keep.
- Enabled bool
- Whether the Backup Policy is enabled.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- NetApp Backup Policy location.
- MonthlyBackups intTo Keep 
- The number of monthly backups to keep.
- Name string
- ResourceGroup stringName 
- map[string]string
- List of tags assigned to the resource.
- WeeklyBackups intTo Keep 
- The number of weekly backups to keep.
- accountName String
- The name of the NetApp account in which the NetApp Policy exists.
- dailyBackups IntegerTo Keep 
- The number of daily backups to keep.
- enabled Boolean
- Whether the Backup Policy is enabled.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- NetApp Backup Policy location.
- monthlyBackups IntegerTo Keep 
- The number of monthly backups to keep.
- name String
- resourceGroup StringName 
- Map<String,String>
- List of tags assigned to the resource.
- weeklyBackups IntegerTo Keep 
- The number of weekly backups to keep.
- accountName string
- The name of the NetApp account in which the NetApp Policy exists.
- dailyBackups numberTo Keep 
- The number of daily backups to keep.
- enabled boolean
- Whether the Backup Policy is enabled.
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- NetApp Backup Policy location.
- monthlyBackups numberTo Keep 
- The number of monthly backups to keep.
- name string
- resourceGroup stringName 
- {[key: string]: string}
- List of tags assigned to the resource.
- weeklyBackups numberTo Keep 
- The number of weekly backups to keep.
- account_name str
- The name of the NetApp account in which the NetApp Policy exists.
- daily_backups_ intto_ keep 
- The number of daily backups to keep.
- enabled bool
- Whether the Backup Policy is enabled.
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- NetApp Backup Policy location.
- monthly_backups_ intto_ keep 
- The number of monthly backups to keep.
- name str
- resource_group_ strname 
- Mapping[str, str]
- List of tags assigned to the resource.
- weekly_backups_ intto_ keep 
- The number of weekly backups to keep.
- accountName String
- The name of the NetApp account in which the NetApp Policy exists.
- dailyBackups NumberTo Keep 
- The number of daily backups to keep.
- enabled Boolean
- Whether the Backup Policy is enabled.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- NetApp Backup Policy location.
- monthlyBackups NumberTo Keep 
- The number of monthly backups to keep.
- name String
- resourceGroup StringName 
- Map<String>
- List of tags assigned to the resource.
- weeklyBackups NumberTo Keep 
- The number of weekly backups to keep.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.