BackupArgs

data class BackupArgs(val backupName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val serverName: Output<String>? = null) : ConvertibleToJava<BackupArgs>

Server backup properties Uses Azure REST API version 2024-08-01. In version 2.x of the Azure Native provider, it used API version 2024-03-01-preview. Other available API versions: 2024-03-01-preview, 2024-11-01-preview, 2025-01-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native dbforpostgresql [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create a new Backup for a flexible server

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var backup = new AzureNative.DBforPostgreSQL.Backup("backup", new()
{
BackupName = "backup_20210615T160516",
ResourceGroupName = "TestGroup",
ServerName = "postgresqltestserver",
});
});
package main
import (
dbforpostgresql "github.com/pulumi/pulumi-azure-native-sdk/dbforpostgresql/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbforpostgresql.NewBackup(ctx, "backup", &dbforpostgresql.BackupArgs{
BackupName: pulumi.String("backup_20210615T160516"),
ResourceGroupName: pulumi.String("TestGroup"),
ServerName: pulumi.String("postgresqltestserver"),
})
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.dbforpostgresql.Backup;
import com.pulumi.azurenative.dbforpostgresql.BackupArgs;
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 backup = new Backup("backup", BackupArgs.builder()
.backupName("backup_20210615T160516")
.resourceGroupName("TestGroup")
.serverName("postgresqltestserver")
.build());
}
}

Import

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

$ pulumi import azure-native:dbforpostgresql:Backup backup_20210615T160516 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}

Constructors

Link copied to clipboard
constructor(backupName: Output<String>? = null, resourceGroupName: Output<String>? = null, serverName: Output<String>? = null)

Properties

Link copied to clipboard
val backupName: Output<String>? = null

The name of the backup.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val serverName: Output<String>? = null

The name of the server.

Functions

Link copied to clipboard
open override fun toJava(): BackupArgs