1. Packages
  2. Azure Native
  3. API Docs
  4. netapp
  5. BackupPolicy
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.0 published on Monday, Jun 24, 2024 by Pulumi

azure-native.netapp.BackupPolicy

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.0 published on Monday, Jun 24, 2024 by Pulumi

    Backup policy information Azure REST API version: 2022-11-01. Prior API version in Azure Native 1.x: 2020-12-01.

    Other available API versions: 2021-04-01, 2021-04-01-preview, 2022-11-01-preview, 2023-05-01, 2023-05-01-preview, 2023-07-01, 2023-07-01-preview, 2023-11-01, 2023-11-01-preview.

    Example Usage

    BackupPolicies_Create

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var backupPolicy = new AzureNative.NetApp.BackupPolicy("backupPolicy", new()
        {
            AccountName = "account1",
            BackupPolicyName = "backupPolicyName",
            DailyBackupsToKeep = 10,
            Enabled = true,
            Location = "westus",
            MonthlyBackupsToKeep = 10,
            ResourceGroupName = "myRG",
            WeeklyBackupsToKeep = 10,
        });
    
    });
    
    package main
    
    import (
    	netapp "github.com/pulumi/pulumi-azure-native-sdk/netapp/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := netapp.NewBackupPolicy(ctx, "backupPolicy", &netapp.BackupPolicyArgs{
    			AccountName:          pulumi.String("account1"),
    			BackupPolicyName:     pulumi.String("backupPolicyName"),
    			DailyBackupsToKeep:   pulumi.Int(10),
    			Enabled:              pulumi.Bool(true),
    			Location:             pulumi.String("westus"),
    			MonthlyBackupsToKeep: pulumi.Int(10),
    			ResourceGroupName:    pulumi.String("myRG"),
    			WeeklyBackupsToKeep:  pulumi.Int(10),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.netapp.BackupPolicy;
    import com.pulumi.azurenative.netapp.BackupPolicyArgs;
    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) {
            var backupPolicy = new BackupPolicy("backupPolicy", BackupPolicyArgs.builder()
                .accountName("account1")
                .backupPolicyName("backupPolicyName")
                .dailyBackupsToKeep(10)
                .enabled(true)
                .location("westus")
                .monthlyBackupsToKeep(10)
                .resourceGroupName("myRG")
                .weeklyBackupsToKeep(10)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    backup_policy = azure_native.netapp.BackupPolicy("backupPolicy",
        account_name="account1",
        backup_policy_name="backupPolicyName",
        daily_backups_to_keep=10,
        enabled=True,
        location="westus",
        monthly_backups_to_keep=10,
        resource_group_name="myRG",
        weekly_backups_to_keep=10)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const backupPolicy = new azure_native.netapp.BackupPolicy("backupPolicy", {
        accountName: "account1",
        backupPolicyName: "backupPolicyName",
        dailyBackupsToKeep: 10,
        enabled: true,
        location: "westus",
        monthlyBackupsToKeep: 10,
        resourceGroupName: "myRG",
        weeklyBackupsToKeep: 10,
    });
    
    resources:
      backupPolicy:
        type: azure-native:netapp:BackupPolicy
        properties:
          accountName: account1
          backupPolicyName: backupPolicyName
          dailyBackupsToKeep: 10
          enabled: true
          location: westus
          monthlyBackupsToKeep: 10
          resourceGroupName: myRG
          weeklyBackupsToKeep: 10
    

    Create BackupPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BackupPolicy(name: string, args: BackupPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def BackupPolicy(resource_name: str,
                     args: BackupPolicyArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def BackupPolicy(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     account_name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     backup_policy_name: Optional[str] = None,
                     daily_backups_to_keep: Optional[int] = None,
                     enabled: Optional[bool] = None,
                     location: Optional[str] = None,
                     monthly_backups_to_keep: Optional[int] = None,
                     tags: Optional[Mapping[str, str]] = None,
                     weekly_backups_to_keep: Optional[int] = None)
    func NewBackupPolicy(ctx *Context, name string, args BackupPolicyArgs, opts ...ResourceOption) (*BackupPolicy, error)
    public BackupPolicy(string name, BackupPolicyArgs args, CustomResourceOptions? opts = null)
    public BackupPolicy(String name, BackupPolicyArgs args)
    public BackupPolicy(String name, BackupPolicyArgs args, CustomResourceOptions options)
    
    type: azure-native:netapp:BackupPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var azure_nativeBackupPolicyResource = new AzureNative.NetApp.BackupPolicy("azure-nativeBackupPolicyResource", new()
    {
        AccountName = "string",
        ResourceGroupName = "string",
        BackupPolicyName = "string",
        DailyBackupsToKeep = 0,
        Enabled = false,
        Location = "string",
        MonthlyBackupsToKeep = 0,
        Tags = 
        {
            { "string", "string" },
        },
        WeeklyBackupsToKeep = 0,
    });
    
    example, err := netapp.NewBackupPolicy(ctx, "azure-nativeBackupPolicyResource", &netapp.BackupPolicyArgs{
    AccountName: pulumi.String("string"),
    ResourceGroupName: pulumi.String("string"),
    BackupPolicyName: pulumi.String("string"),
    DailyBackupsToKeep: pulumi.Int(0),
    Enabled: pulumi.Bool(false),
    Location: pulumi.String("string"),
    MonthlyBackupsToKeep: pulumi.Int(0),
    Tags: pulumi.StringMap{
    "string": pulumi.String("string"),
    },
    WeeklyBackupsToKeep: pulumi.Int(0),
    })
    
    var azure_nativeBackupPolicyResource = new BackupPolicy("azure-nativeBackupPolicyResource", BackupPolicyArgs.builder()
        .accountName("string")
        .resourceGroupName("string")
        .backupPolicyName("string")
        .dailyBackupsToKeep(0)
        .enabled(false)
        .location("string")
        .monthlyBackupsToKeep(0)
        .tags(Map.of("string", "string"))
        .weeklyBackupsToKeep(0)
        .build());
    
    azure_native_backup_policy_resource = azure_native.netapp.BackupPolicy("azure-nativeBackupPolicyResource",
        account_name="string",
        resource_group_name="string",
        backup_policy_name="string",
        daily_backups_to_keep=0,
        enabled=False,
        location="string",
        monthly_backups_to_keep=0,
        tags={
            "string": "string",
        },
        weekly_backups_to_keep=0)
    
    const azure_nativeBackupPolicyResource = new azure_native.netapp.BackupPolicy("azure-nativeBackupPolicyResource", {
        accountName: "string",
        resourceGroupName: "string",
        backupPolicyName: "string",
        dailyBackupsToKeep: 0,
        enabled: false,
        location: "string",
        monthlyBackupsToKeep: 0,
        tags: {
            string: "string",
        },
        weeklyBackupsToKeep: 0,
    });
    
    type: azure-native:netapp:BackupPolicy
    properties:
        accountName: string
        backupPolicyName: string
        dailyBackupsToKeep: 0
        enabled: false
        location: string
        monthlyBackupsToKeep: 0
        resourceGroupName: string
        tags:
            string: string
        weeklyBackupsToKeep: 0
    

    BackupPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The BackupPolicy resource accepts the following input properties:

    AccountName string
    The name of the NetApp account
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    BackupPolicyName string
    Backup policy Name which uniquely identify backup policy.
    DailyBackupsToKeep int
    Daily backups count to keep
    Enabled bool
    The property to decide policy is enabled or not
    Location string
    The geo-location where the resource lives
    MonthlyBackupsToKeep int
    Monthly backups count to keep
    Tags Dictionary<string, string>
    Resource tags.
    WeeklyBackupsToKeep int
    Weekly backups count to keep
    AccountName string
    The name of the NetApp account
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    BackupPolicyName string
    Backup policy Name which uniquely identify backup policy.
    DailyBackupsToKeep int
    Daily backups count to keep
    Enabled bool
    The property to decide policy is enabled or not
    Location string
    The geo-location where the resource lives
    MonthlyBackupsToKeep int
    Monthly backups count to keep
    Tags map[string]string
    Resource tags.
    WeeklyBackupsToKeep int
    Weekly backups count to keep
    accountName String
    The name of the NetApp account
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    backupPolicyName String
    Backup policy Name which uniquely identify backup policy.
    dailyBackupsToKeep Integer
    Daily backups count to keep
    enabled Boolean
    The property to decide policy is enabled or not
    location String
    The geo-location where the resource lives
    monthlyBackupsToKeep Integer
    Monthly backups count to keep
    tags Map<String,String>
    Resource tags.
    weeklyBackupsToKeep Integer
    Weekly backups count to keep
    accountName string
    The name of the NetApp account
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    backupPolicyName string
    Backup policy Name which uniquely identify backup policy.
    dailyBackupsToKeep number
    Daily backups count to keep
    enabled boolean
    The property to decide policy is enabled or not
    location string
    The geo-location where the resource lives
    monthlyBackupsToKeep number
    Monthly backups count to keep
    tags {[key: string]: string}
    Resource tags.
    weeklyBackupsToKeep number
    Weekly backups count to keep
    account_name str
    The name of the NetApp account
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    backup_policy_name str
    Backup policy Name which uniquely identify backup policy.
    daily_backups_to_keep int
    Daily backups count to keep
    enabled bool
    The property to decide policy is enabled or not
    location str
    The geo-location where the resource lives
    monthly_backups_to_keep int
    Monthly backups count to keep
    tags Mapping[str, str]
    Resource tags.
    weekly_backups_to_keep int
    Weekly backups count to keep
    accountName String
    The name of the NetApp account
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    backupPolicyName String
    Backup policy Name which uniquely identify backup policy.
    dailyBackupsToKeep Number
    Daily backups count to keep
    enabled Boolean
    The property to decide policy is enabled or not
    location String
    The geo-location where the resource lives
    monthlyBackupsToKeep Number
    Monthly backups count to keep
    tags Map<String>
    Resource tags.
    weeklyBackupsToKeep Number
    Weekly backups count to keep

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BackupPolicy resource produces the following output properties:

    BackupPolicyId string
    Backup Policy Resource ID
    Etag string
    A unique read-only string that changes whenever the resource is updated.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    ProvisioningState string
    Azure lifecycle management
    SystemData Pulumi.AzureNative.NetApp.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    VolumeBackups List<Pulumi.AzureNative.NetApp.Outputs.VolumeBackupsResponse>
    A list of volumes assigned to this policy
    VolumesAssigned int
    Volumes using current backup policy
    BackupPolicyId string
    Backup Policy Resource ID
    Etag string
    A unique read-only string that changes whenever the resource is updated.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    ProvisioningState string
    Azure lifecycle management
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    VolumeBackups []VolumeBackupsResponse
    A list of volumes assigned to this policy
    VolumesAssigned int
    Volumes using current backup policy
    backupPolicyId String
    Backup Policy Resource ID
    etag String
    A unique read-only string that changes whenever the resource is updated.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    provisioningState String
    Azure lifecycle management
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    volumeBackups List<VolumeBackupsResponse>
    A list of volumes assigned to this policy
    volumesAssigned Integer
    Volumes using current backup policy
    backupPolicyId string
    Backup Policy Resource ID
    etag string
    A unique read-only string that changes whenever the resource is updated.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    provisioningState string
    Azure lifecycle management
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    volumeBackups VolumeBackupsResponse[]
    A list of volumes assigned to this policy
    volumesAssigned number
    Volumes using current backup policy
    backup_policy_id str
    Backup Policy Resource ID
    etag str
    A unique read-only string that changes whenever the resource is updated.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource
    provisioning_state str
    Azure lifecycle management
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    volume_backups Sequence[VolumeBackupsResponse]
    A list of volumes assigned to this policy
    volumes_assigned int
    Volumes using current backup policy
    backupPolicyId String
    Backup Policy Resource ID
    etag String
    A unique read-only string that changes whenever the resource is updated.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    provisioningState String
    Azure lifecycle management
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    volumeBackups List<Property Map>
    A list of volumes assigned to this policy
    volumesAssigned Number
    Volumes using current backup policy

    Supporting Types

    SystemDataResponse, SystemDataResponseArgs

    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    VolumeBackupsResponse, VolumeBackupsResponseArgs

    BackupsCount int
    Total count of backups for volume
    PolicyEnabled bool
    Policy enabled
    VolumeName string
    Volume name
    BackupsCount int
    Total count of backups for volume
    PolicyEnabled bool
    Policy enabled
    VolumeName string
    Volume name
    backupsCount Integer
    Total count of backups for volume
    policyEnabled Boolean
    Policy enabled
    volumeName String
    Volume name
    backupsCount number
    Total count of backups for volume
    policyEnabled boolean
    Policy enabled
    volumeName string
    Volume name
    backups_count int
    Total count of backups for volume
    policy_enabled bool
    Policy enabled
    volume_name str
    Volume name
    backupsCount Number
    Total count of backups for volume
    policyEnabled Boolean
    Policy enabled
    volumeName String
    Volume name

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:netapp:BackupPolicy account1/backupPolicyName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.47.0 published on Monday, Jun 24, 2024 by Pulumi