1. Packages
  2. Azure Classic
  3. API Docs
  4. dataprotection
  5. BackupInstancePostgresqlFlexibleServer

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.dataprotection.BackupInstancePostgresqlFlexibleServer

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages a Backup Instance to back up PostgreSQL Flexible Server.

    Note: Before using this resource, there are some prerequisite permissions for configure backup and restore. See more details from https://learn.microsoft.com/azure/backup/backup-azure-database-postgresql-flex-overview.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleFlexibleServer = new azure.postgresql.FlexibleServer("example", {
        name: "example-postgresqlfs",
        resourceGroupName: example.name,
        location: example.location,
        administratorLogin: "adminTerraform",
        administratorPassword: "QAZwsx123",
        storageMb: 32768,
        version: "12",
        skuName: "GP_Standard_D4s_v3",
        zone: "2",
    });
    const exampleBackupVault = new azure.dataprotection.BackupVault("example", {
        name: "example-backupvault",
        resourceGroupName: example.name,
        location: example.location,
        datastoreType: "VaultStore",
        redundancy: "LocallyRedundant",
        softDelete: "Off",
        identity: {
            type: "SystemAssigned",
        },
    });
    const exampleAssignment = new azure.authorization.Assignment("example", {
        scope: example.id,
        roleDefinitionName: "Reader",
        principalId: exampleBackupVault.identity.apply(identity => identity?.principalId),
    });
    const example2 = new azure.authorization.Assignment("example2", {
        scope: exampleFlexibleServer.id,
        roleDefinitionName: "PostgreSQL Flexible Server Long Term Retention Backup Role",
        principalId: exampleBackupVault.identity.apply(identity => identity?.principalId),
    });
    const exampleBackupPolicyPostgresqlFlexibleServer = new azure.dataprotection.BackupPolicyPostgresqlFlexibleServer("example", {
        name: "example-dp",
        vaultId: exampleBackupVault.id,
        backupRepeatingTimeIntervals: ["R/2021-05-23T02:30:00+00:00/P1W"],
        defaultRetentionRule: {
            lifeCycles: [{
                duration: "P4M",
                dataStoreType: "VaultStore",
            }],
        },
    }, {
        dependsOn: [
            exampleAssignment,
            example2,
        ],
    });
    const exampleBackupInstancePostgresqlFlexibleServer = new azure.dataprotection.BackupInstancePostgresqlFlexibleServer("example", {
        name: "example-dbi",
        location: example.location,
        vaultId: exampleBackupVault.id,
        serverId: exampleFlexibleServer.id,
        backupPolicyId: exampleBackupPolicyPostgresqlFlexibleServer.id,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_flexible_server = azure.postgresql.FlexibleServer("example",
        name="example-postgresqlfs",
        resource_group_name=example.name,
        location=example.location,
        administrator_login="adminTerraform",
        administrator_password="QAZwsx123",
        storage_mb=32768,
        version="12",
        sku_name="GP_Standard_D4s_v3",
        zone="2")
    example_backup_vault = azure.dataprotection.BackupVault("example",
        name="example-backupvault",
        resource_group_name=example.name,
        location=example.location,
        datastore_type="VaultStore",
        redundancy="LocallyRedundant",
        soft_delete="Off",
        identity={
            "type": "SystemAssigned",
        })
    example_assignment = azure.authorization.Assignment("example",
        scope=example.id,
        role_definition_name="Reader",
        principal_id=example_backup_vault.identity.principal_id)
    example2 = azure.authorization.Assignment("example2",
        scope=example_flexible_server.id,
        role_definition_name="PostgreSQL Flexible Server Long Term Retention Backup Role",
        principal_id=example_backup_vault.identity.principal_id)
    example_backup_policy_postgresql_flexible_server = azure.dataprotection.BackupPolicyPostgresqlFlexibleServer("example",
        name="example-dp",
        vault_id=example_backup_vault.id,
        backup_repeating_time_intervals=["R/2021-05-23T02:30:00+00:00/P1W"],
        default_retention_rule={
            "life_cycles": [{
                "duration": "P4M",
                "data_store_type": "VaultStore",
            }],
        },
        opts = pulumi.ResourceOptions(depends_on=[
                example_assignment,
                example2,
            ]))
    example_backup_instance_postgresql_flexible_server = azure.dataprotection.BackupInstancePostgresqlFlexibleServer("example",
        name="example-dbi",
        location=example.location,
        vault_id=example_backup_vault.id,
        server_id=example_flexible_server.id,
        backup_policy_id=example_backup_policy_postgresql_flexible_server.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleFlexibleServer, err := postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{
    			Name:                  pulumi.String("example-postgresqlfs"),
    			ResourceGroupName:     example.Name,
    			Location:              example.Location,
    			AdministratorLogin:    pulumi.String("adminTerraform"),
    			AdministratorPassword: pulumi.String("QAZwsx123"),
    			StorageMb:             pulumi.Int(32768),
    			Version:               pulumi.String("12"),
    			SkuName:               pulumi.String("GP_Standard_D4s_v3"),
    			Zone:                  pulumi.String("2"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
    			Name:              pulumi.String("example-backupvault"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    			DatastoreType:     pulumi.String("VaultStore"),
    			Redundancy:        pulumi.String("LocallyRedundant"),
    			SoftDelete:        pulumi.String("Off"),
    			Identity: &dataprotection.BackupVaultIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
    			Scope:              example.ID(),
    			RoleDefinitionName: pulumi.String("Reader"),
    			PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
    				return &identity.PrincipalId, nil
    			}).(pulumi.StringPtrOutput)),
    		})
    		if err != nil {
    			return err
    		}
    		example2, err := authorization.NewAssignment(ctx, "example2", &authorization.AssignmentArgs{
    			Scope:              exampleFlexibleServer.ID(),
    			RoleDefinitionName: pulumi.String("PostgreSQL Flexible Server Long Term Retention Backup Role"),
    			PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
    				return &identity.PrincipalId, nil
    			}).(pulumi.StringPtrOutput)),
    		})
    		if err != nil {
    			return err
    		}
    		exampleBackupPolicyPostgresqlFlexibleServer, err := dataprotection.NewBackupPolicyPostgresqlFlexibleServer(ctx, "example", &dataprotection.BackupPolicyPostgresqlFlexibleServerArgs{
    			Name:    pulumi.String("example-dp"),
    			VaultId: exampleBackupVault.ID(),
    			BackupRepeatingTimeIntervals: pulumi.StringArray{
    				pulumi.String("R/2021-05-23T02:30:00+00:00/P1W"),
    			},
    			DefaultRetentionRule: &dataprotection.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleArgs{
    				LifeCycles: dataprotection.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleLifeCycleArray{
    					&dataprotection.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleLifeCycleArgs{
    						Duration:      pulumi.String("P4M"),
    						DataStoreType: pulumi.String("VaultStore"),
    					},
    				},
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			exampleAssignment,
    			example2,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = dataprotection.NewBackupInstancePostgresqlFlexibleServer(ctx, "example", &dataprotection.BackupInstancePostgresqlFlexibleServerArgs{
    			Name:           pulumi.String("example-dbi"),
    			Location:       example.Location,
    			VaultId:        exampleBackupVault.ID(),
    			ServerId:       exampleFlexibleServer.ID(),
    			BackupPolicyId: exampleBackupPolicyPostgresqlFlexibleServer.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleFlexibleServer = new Azure.PostgreSql.FlexibleServer("example", new()
        {
            Name = "example-postgresqlfs",
            ResourceGroupName = example.Name,
            Location = example.Location,
            AdministratorLogin = "adminTerraform",
            AdministratorPassword = "QAZwsx123",
            StorageMb = 32768,
            Version = "12",
            SkuName = "GP_Standard_D4s_v3",
            Zone = "2",
        });
    
        var exampleBackupVault = new Azure.DataProtection.BackupVault("example", new()
        {
            Name = "example-backupvault",
            ResourceGroupName = example.Name,
            Location = example.Location,
            DatastoreType = "VaultStore",
            Redundancy = "LocallyRedundant",
            SoftDelete = "Off",
            Identity = new Azure.DataProtection.Inputs.BackupVaultIdentityArgs
            {
                Type = "SystemAssigned",
            },
        });
    
        var exampleAssignment = new Azure.Authorization.Assignment("example", new()
        {
            Scope = example.Id,
            RoleDefinitionName = "Reader",
            PrincipalId = exampleBackupVault.Identity.Apply(identity => identity?.PrincipalId),
        });
    
        var example2 = new Azure.Authorization.Assignment("example2", new()
        {
            Scope = exampleFlexibleServer.Id,
            RoleDefinitionName = "PostgreSQL Flexible Server Long Term Retention Backup Role",
            PrincipalId = exampleBackupVault.Identity.Apply(identity => identity?.PrincipalId),
        });
    
        var exampleBackupPolicyPostgresqlFlexibleServer = new Azure.DataProtection.BackupPolicyPostgresqlFlexibleServer("example", new()
        {
            Name = "example-dp",
            VaultId = exampleBackupVault.Id,
            BackupRepeatingTimeIntervals = new[]
            {
                "R/2021-05-23T02:30:00+00:00/P1W",
            },
            DefaultRetentionRule = new Azure.DataProtection.Inputs.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleArgs
            {
                LifeCycles = new[]
                {
                    new Azure.DataProtection.Inputs.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleLifeCycleArgs
                    {
                        Duration = "P4M",
                        DataStoreType = "VaultStore",
                    },
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                exampleAssignment,
                example2,
            },
        });
    
        var exampleBackupInstancePostgresqlFlexibleServer = new Azure.DataProtection.BackupInstancePostgresqlFlexibleServer("example", new()
        {
            Name = "example-dbi",
            Location = example.Location,
            VaultId = exampleBackupVault.Id,
            ServerId = exampleFlexibleServer.Id,
            BackupPolicyId = exampleBackupPolicyPostgresqlFlexibleServer.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.postgresql.FlexibleServer;
    import com.pulumi.azure.postgresql.FlexibleServerArgs;
    import com.pulumi.azure.dataprotection.BackupVault;
    import com.pulumi.azure.dataprotection.BackupVaultArgs;
    import com.pulumi.azure.dataprotection.inputs.BackupVaultIdentityArgs;
    import com.pulumi.azure.authorization.Assignment;
    import com.pulumi.azure.authorization.AssignmentArgs;
    import com.pulumi.azure.dataprotection.BackupPolicyPostgresqlFlexibleServer;
    import com.pulumi.azure.dataprotection.BackupPolicyPostgresqlFlexibleServerArgs;
    import com.pulumi.azure.dataprotection.inputs.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleArgs;
    import com.pulumi.azure.dataprotection.BackupInstancePostgresqlFlexibleServer;
    import com.pulumi.azure.dataprotection.BackupInstancePostgresqlFlexibleServerArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleFlexibleServer = new FlexibleServer("exampleFlexibleServer", FlexibleServerArgs.builder()
                .name("example-postgresqlfs")
                .resourceGroupName(example.name())
                .location(example.location())
                .administratorLogin("adminTerraform")
                .administratorPassword("QAZwsx123")
                .storageMb(32768)
                .version("12")
                .skuName("GP_Standard_D4s_v3")
                .zone("2")
                .build());
    
            var exampleBackupVault = new BackupVault("exampleBackupVault", BackupVaultArgs.builder()
                .name("example-backupvault")
                .resourceGroupName(example.name())
                .location(example.location())
                .datastoreType("VaultStore")
                .redundancy("LocallyRedundant")
                .softDelete("Off")
                .identity(BackupVaultIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .build());
    
            var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()
                .scope(example.id())
                .roleDefinitionName("Reader")
                .principalId(exampleBackupVault.identity().applyValue(identity -> identity.principalId()))
                .build());
    
            var example2 = new Assignment("example2", AssignmentArgs.builder()
                .scope(exampleFlexibleServer.id())
                .roleDefinitionName("PostgreSQL Flexible Server Long Term Retention Backup Role")
                .principalId(exampleBackupVault.identity().applyValue(identity -> identity.principalId()))
                .build());
    
            var exampleBackupPolicyPostgresqlFlexibleServer = new BackupPolicyPostgresqlFlexibleServer("exampleBackupPolicyPostgresqlFlexibleServer", BackupPolicyPostgresqlFlexibleServerArgs.builder()
                .name("example-dp")
                .vaultId(exampleBackupVault.id())
                .backupRepeatingTimeIntervals("R/2021-05-23T02:30:00+00:00/P1W")
                .defaultRetentionRule(BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleArgs.builder()
                    .lifeCycles(BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleLifeCycleArgs.builder()
                        .duration("P4M")
                        .dataStoreType("VaultStore")
                        .build())
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(                
                        exampleAssignment,
                        example2)
                    .build());
    
            var exampleBackupInstancePostgresqlFlexibleServer = new BackupInstancePostgresqlFlexibleServer("exampleBackupInstancePostgresqlFlexibleServer", BackupInstancePostgresqlFlexibleServerArgs.builder()
                .name("example-dbi")
                .location(example.location())
                .vaultId(exampleBackupVault.id())
                .serverId(exampleFlexibleServer.id())
                .backupPolicyId(exampleBackupPolicyPostgresqlFlexibleServer.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleFlexibleServer:
        type: azure:postgresql:FlexibleServer
        name: example
        properties:
          name: example-postgresqlfs
          resourceGroupName: ${example.name}
          location: ${example.location}
          administratorLogin: adminTerraform
          administratorPassword: QAZwsx123
          storageMb: 32768
          version: '12'
          skuName: GP_Standard_D4s_v3
          zone: '2'
      exampleBackupVault:
        type: azure:dataprotection:BackupVault
        name: example
        properties:
          name: example-backupvault
          resourceGroupName: ${example.name}
          location: ${example.location}
          datastoreType: VaultStore
          redundancy: LocallyRedundant
          softDelete: Off
          identity:
            type: SystemAssigned
      exampleAssignment:
        type: azure:authorization:Assignment
        name: example
        properties:
          scope: ${example.id}
          roleDefinitionName: Reader
          principalId: ${exampleBackupVault.identity.principalId}
      example2:
        type: azure:authorization:Assignment
        properties:
          scope: ${exampleFlexibleServer.id}
          roleDefinitionName: PostgreSQL Flexible Server Long Term Retention Backup Role
          principalId: ${exampleBackupVault.identity.principalId}
      exampleBackupPolicyPostgresqlFlexibleServer:
        type: azure:dataprotection:BackupPolicyPostgresqlFlexibleServer
        name: example
        properties:
          name: example-dp
          vaultId: ${exampleBackupVault.id}
          backupRepeatingTimeIntervals:
            - R/2021-05-23T02:30:00+00:00/P1W
          defaultRetentionRule:
            lifeCycles:
              - duration: P4M
                dataStoreType: VaultStore
        options:
          dependson:
            - ${exampleAssignment}
            - ${example2}
      exampleBackupInstancePostgresqlFlexibleServer:
        type: azure:dataprotection:BackupInstancePostgresqlFlexibleServer
        name: example
        properties:
          name: example-dbi
          location: ${example.location}
          vaultId: ${exampleBackupVault.id}
          serverId: ${exampleFlexibleServer.id}
          backupPolicyId: ${exampleBackupPolicyPostgresqlFlexibleServer.id}
    

    Create BackupInstancePostgresqlFlexibleServer Resource

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

    Constructor syntax

    new BackupInstancePostgresqlFlexibleServer(name: string, args: BackupInstancePostgresqlFlexibleServerArgs, opts?: CustomResourceOptions);
    @overload
    def BackupInstancePostgresqlFlexibleServer(resource_name: str,
                                               args: BackupInstancePostgresqlFlexibleServerArgs,
                                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def BackupInstancePostgresqlFlexibleServer(resource_name: str,
                                               opts: Optional[ResourceOptions] = None,
                                               backup_policy_id: Optional[str] = None,
                                               server_id: Optional[str] = None,
                                               vault_id: Optional[str] = None,
                                               location: Optional[str] = None,
                                               name: Optional[str] = None)
    func NewBackupInstancePostgresqlFlexibleServer(ctx *Context, name string, args BackupInstancePostgresqlFlexibleServerArgs, opts ...ResourceOption) (*BackupInstancePostgresqlFlexibleServer, error)
    public BackupInstancePostgresqlFlexibleServer(string name, BackupInstancePostgresqlFlexibleServerArgs args, CustomResourceOptions? opts = null)
    public BackupInstancePostgresqlFlexibleServer(String name, BackupInstancePostgresqlFlexibleServerArgs args)
    public BackupInstancePostgresqlFlexibleServer(String name, BackupInstancePostgresqlFlexibleServerArgs args, CustomResourceOptions options)
    
    type: azure:dataprotection:BackupInstancePostgresqlFlexibleServer
    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 BackupInstancePostgresqlFlexibleServerArgs
    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 BackupInstancePostgresqlFlexibleServerArgs
    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 BackupInstancePostgresqlFlexibleServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackupInstancePostgresqlFlexibleServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackupInstancePostgresqlFlexibleServerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var backupInstancePostgresqlFlexibleServerResource = new Azure.DataProtection.BackupInstancePostgresqlFlexibleServer("backupInstancePostgresqlFlexibleServerResource", new()
    {
        BackupPolicyId = "string",
        ServerId = "string",
        VaultId = "string",
        Location = "string",
        Name = "string",
    });
    
    example, err := dataprotection.NewBackupInstancePostgresqlFlexibleServer(ctx, "backupInstancePostgresqlFlexibleServerResource", &dataprotection.BackupInstancePostgresqlFlexibleServerArgs{
    	BackupPolicyId: pulumi.String("string"),
    	ServerId:       pulumi.String("string"),
    	VaultId:        pulumi.String("string"),
    	Location:       pulumi.String("string"),
    	Name:           pulumi.String("string"),
    })
    
    var backupInstancePostgresqlFlexibleServerResource = new BackupInstancePostgresqlFlexibleServer("backupInstancePostgresqlFlexibleServerResource", BackupInstancePostgresqlFlexibleServerArgs.builder()
        .backupPolicyId("string")
        .serverId("string")
        .vaultId("string")
        .location("string")
        .name("string")
        .build());
    
    backup_instance_postgresql_flexible_server_resource = azure.dataprotection.BackupInstancePostgresqlFlexibleServer("backupInstancePostgresqlFlexibleServerResource",
        backup_policy_id="string",
        server_id="string",
        vault_id="string",
        location="string",
        name="string")
    
    const backupInstancePostgresqlFlexibleServerResource = new azure.dataprotection.BackupInstancePostgresqlFlexibleServer("backupInstancePostgresqlFlexibleServerResource", {
        backupPolicyId: "string",
        serverId: "string",
        vaultId: "string",
        location: "string",
        name: "string",
    });
    
    type: azure:dataprotection:BackupInstancePostgresqlFlexibleServer
    properties:
        backupPolicyId: string
        location: string
        name: string
        serverId: string
        vaultId: string
    

    BackupInstancePostgresqlFlexibleServer Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BackupInstancePostgresqlFlexibleServer resource accepts the following input properties:

    BackupPolicyId string
    The ID of the Backup Policy.
    ServerId string
    The ID of the source server. Changing this forces a new resource to be created.
    VaultId string
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    Location string
    The location of the source database. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    BackupPolicyId string
    The ID of the Backup Policy.
    ServerId string
    The ID of the source server. Changing this forces a new resource to be created.
    VaultId string
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    Location string
    The location of the source database. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    backupPolicyId String
    The ID of the Backup Policy.
    serverId String
    The ID of the source server. Changing this forces a new resource to be created.
    vaultId String
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    location String
    The location of the source database. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    backupPolicyId string
    The ID of the Backup Policy.
    serverId string
    The ID of the source server. Changing this forces a new resource to be created.
    vaultId string
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    location string
    The location of the source database. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    backup_policy_id str
    The ID of the Backup Policy.
    server_id str
    The ID of the source server. Changing this forces a new resource to be created.
    vault_id str
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    location str
    The location of the source database. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    backupPolicyId String
    The ID of the Backup Policy.
    serverId String
    The ID of the source server. Changing this forces a new resource to be created.
    vaultId String
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    location String
    The location of the source database. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BackupInstancePostgresqlFlexibleServer Resource

    Get an existing BackupInstancePostgresqlFlexibleServer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BackupInstancePostgresqlFlexibleServerState, opts?: CustomResourceOptions): BackupInstancePostgresqlFlexibleServer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_policy_id: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            server_id: Optional[str] = None,
            vault_id: Optional[str] = None) -> BackupInstancePostgresqlFlexibleServer
    func GetBackupInstancePostgresqlFlexibleServer(ctx *Context, name string, id IDInput, state *BackupInstancePostgresqlFlexibleServerState, opts ...ResourceOption) (*BackupInstancePostgresqlFlexibleServer, error)
    public static BackupInstancePostgresqlFlexibleServer Get(string name, Input<string> id, BackupInstancePostgresqlFlexibleServerState? state, CustomResourceOptions? opts = null)
    public static BackupInstancePostgresqlFlexibleServer get(String name, Output<String> id, BackupInstancePostgresqlFlexibleServerState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BackupPolicyId string
    The ID of the Backup Policy.
    Location string
    The location of the source database. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    ServerId string
    The ID of the source server. Changing this forces a new resource to be created.
    VaultId string
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    BackupPolicyId string
    The ID of the Backup Policy.
    Location string
    The location of the source database. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    ServerId string
    The ID of the source server. Changing this forces a new resource to be created.
    VaultId string
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    backupPolicyId String
    The ID of the Backup Policy.
    location String
    The location of the source database. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    serverId String
    The ID of the source server. Changing this forces a new resource to be created.
    vaultId String
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    backupPolicyId string
    The ID of the Backup Policy.
    location string
    The location of the source database. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    serverId string
    The ID of the source server. Changing this forces a new resource to be created.
    vaultId string
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    backup_policy_id str
    The ID of the Backup Policy.
    location str
    The location of the source database. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    server_id str
    The ID of the source server. Changing this forces a new resource to be created.
    vault_id str
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
    backupPolicyId String
    The ID of the Backup Policy.
    location String
    The location of the source database. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
    serverId String
    The ID of the source server. Changing this forces a new resource to be created.
    vaultId String
    The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.

    Import

    Backup Instance PostgreSQL Flexible Servers can be imported using the resource id, e.g.

    $ pulumi import azure:dataprotection/backupInstancePostgresqlFlexibleServer:BackupInstancePostgresqlFlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupInstances/backupInstance1
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi