We recommend using Azure Native.
Azure v6.28.0 published on Friday, Oct 3, 2025 by Pulumi
azure.netapp.getBackupPolicy
Start a Neo task
Explain and create an azure.netapp.getBackupPolicy resource
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.id());
}
}
variables:
example:
fn::invoke:
function: azure:netapp:getBackupPolicy
arguments:
resourceGroupName: example-resource-group
accountName: example-netappaccount
name: example-backuppolicy
outputs:
backupPolicyId: ${example.id}
API Providers
This data source uses the following Azure API Providers:
Microsoft.NetApp- 2025-06-01
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:
- Account
Name string - The name of the NetApp Account in which the NetApp Policy exists.
- Name string
- The name of the NetApp Backup Policy.
- Resource
Group stringName - The name of the resource group where the NetApp Backup Policy exists.
- Account
Name string - The name of the NetApp Account in which the NetApp Policy exists.
- Name string
- The name of the NetApp Backup Policy.
- Resource
Group stringName - The name of the resource group where the NetApp Backup Policy exists.
- account
Name String - The name of the NetApp Account in which the NetApp Policy exists.
- name String
- The name of the NetApp Backup Policy.
- resource
Group StringName - The name of the resource group where the NetApp Backup Policy exists.
- account
Name string - The name of the NetApp Account in which the NetApp Policy exists.
- name string
- The name of the NetApp Backup Policy.
- resource
Group 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.
- account
Name String - The name of the NetApp Account in which the NetApp Policy exists.
- name String
- The name of the NetApp Backup Policy.
- resource
Group StringName - The name of the resource group where the NetApp Backup Policy exists.
getBackupPolicy Result
The following output properties are available:
- Account
Name string - 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 string
- The provider-assigned unique ID for this managed resource.
- Location string
- NetApp Backup Policy location.
- Monthly
Backups intTo Keep - The number of monthly backups to keep.
- Name string
- Resource
Group stringName - Dictionary<string, string>
- List of tags assigned to the resource.
- Weekly
Backups intTo Keep - The number of weekly backups to keep.
- Account
Name string - 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 string
- The provider-assigned unique ID for this managed resource.
- Location string
- NetApp Backup Policy location.
- Monthly
Backups intTo Keep - The number of monthly backups to keep.
- Name string
- Resource
Group stringName - map[string]string
- List of tags assigned to the resource.
- Weekly
Backups intTo Keep - The number of weekly backups to keep.
- account
Name String - The name of the NetApp account in which the NetApp Policy exists.
- daily
Backups 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.
- monthly
Backups IntegerTo Keep - The number of monthly backups to keep.
- name String
- resource
Group StringName - Map<String,String>
- List of tags assigned to the resource.
- weekly
Backups IntegerTo Keep - The number of weekly backups to keep.
- account
Name string - The name of the NetApp account in which the NetApp Policy exists.
- daily
Backups 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.
- monthly
Backups numberTo Keep - The number of monthly backups to keep.
- name string
- resource
Group stringName - {[key: string]: string}
- List of tags assigned to the resource.
- weekly
Backups 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.
- account
Name String - The name of the NetApp account in which the NetApp Policy exists.
- daily
Backups 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.
- monthly
Backups NumberTo Keep - The number of monthly backups to keep.
- name String
- resource
Group StringName - Map<String>
- List of tags assigned to the resource.
- weekly
Backups 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.
