Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gcp.alloydb.kotlin.BackupArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.alloydb.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.alloydb.BackupArgs.builder
import com.pulumi.gcp.alloydb.kotlin.inputs.BackupEncryptionConfigArgs
import com.pulumi.gcp.alloydb.kotlin.inputs.BackupEncryptionConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* An AlloyDB Backup.
* To get more information about Backup, see:
* * [API documentation](https://cloud.google.com/alloydb/docs/reference/rest/v1/projects.locations.backups/create)
* * How-to Guides
* * [AlloyDB](https://cloud.google.com/alloydb/docs/)
* ## Example Usage
* ### Alloydb Backup Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const defaultNetwork = new gcp.compute.Network("default", {name: "alloydb-network"});
* const defaultCluster = new gcp.alloydb.Cluster("default", {
* clusterId: "alloydb-cluster",
* location: "us-central1",
* networkConfig: {
* network: defaultNetwork.id,
* },
* });
* const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
* name: "alloydb-cluster",
* addressType: "INTERNAL",
* purpose: "VPC_PEERING",
* prefixLength: 16,
* network: defaultNetwork.id,
* });
* const vpcConnection = new gcp.servicenetworking.Connection("vpc_connection", {
* network: defaultNetwork.id,
* service: "servicenetworking.googleapis.com",
* reservedPeeringRanges: [privateIpAlloc.name],
* });
* const defaultInstance = new gcp.alloydb.Instance("default", {
* cluster: defaultCluster.name,
* instanceId: "alloydb-instance",
* instanceType: "PRIMARY",
* }, {
* dependsOn: [vpcConnection],
* });
* const _default = new gcp.alloydb.Backup("default", {
* location: "us-central1",
* backupId: "alloydb-backup",
* clusterName: defaultCluster.name,
* }, {
* dependsOn: [defaultInstance],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default_network = gcp.compute.Network("default", name="alloydb-network")
* default_cluster = gcp.alloydb.Cluster("default",
* cluster_id="alloydb-cluster",
* location="us-central1",
* network_config={
* "network": default_network.id,
* })
* private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
* name="alloydb-cluster",
* address_type="INTERNAL",
* purpose="VPC_PEERING",
* prefix_length=16,
* network=default_network.id)
* vpc_connection = gcp.servicenetworking.Connection("vpc_connection",
* network=default_network.id,
* service="servicenetworking.googleapis.com",
* reserved_peering_ranges=[private_ip_alloc.name])
* default_instance = gcp.alloydb.Instance("default",
* cluster=default_cluster.name,
* instance_id="alloydb-instance",
* instance_type="PRIMARY",
* opts = pulumi.ResourceOptions(depends_on=[vpc_connection]))
* default = gcp.alloydb.Backup("default",
* location="us-central1",
* backup_id="alloydb-backup",
* cluster_name=default_cluster.name,
* opts = pulumi.ResourceOptions(depends_on=[default_instance]))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var defaultNetwork = new Gcp.Compute.Network("default", new()
* {
* Name = "alloydb-network",
* });
* var defaultCluster = new Gcp.Alloydb.Cluster("default", new()
* {
* ClusterId = "alloydb-cluster",
* Location = "us-central1",
* NetworkConfig = new Gcp.Alloydb.Inputs.ClusterNetworkConfigArgs
* {
* Network = defaultNetwork.Id,
* },
* });
* var privateIpAlloc = new Gcp.Compute.GlobalAddress("private_ip_alloc", new()
* {
* Name = "alloydb-cluster",
* AddressType = "INTERNAL",
* Purpose = "VPC_PEERING",
* PrefixLength = 16,
* Network = defaultNetwork.Id,
* });
* var vpcConnection = new Gcp.ServiceNetworking.Connection("vpc_connection", new()
* {
* Network = defaultNetwork.Id,
* Service = "servicenetworking.googleapis.com",
* ReservedPeeringRanges = new[]
* {
* privateIpAlloc.Name,
* },
* });
* var defaultInstance = new Gcp.Alloydb.Instance("default", new()
* {
* Cluster = defaultCluster.Name,
* InstanceId = "alloydb-instance",
* InstanceType = "PRIMARY",
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* vpcConnection,
* },
* });
* var @default = new Gcp.Alloydb.Backup("default", new()
* {
* Location = "us-central1",
* BackupId = "alloydb-backup",
* ClusterName = defaultCluster.Name,
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* defaultInstance,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/alloydb"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/servicenetworking"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
* Name: pulumi.String("alloydb-network"),
* })
* if err != nil {
* return err
* }
* defaultCluster, err := alloydb.NewCluster(ctx, "default", &alloydb.ClusterArgs{
* ClusterId: pulumi.String("alloydb-cluster"),
* Location: pulumi.String("us-central1"),
* NetworkConfig: &alloydb.ClusterNetworkConfigArgs{
* Network: defaultNetwork.ID(),
* },
* })
* if err != nil {
* return err
* }
* privateIpAlloc, err := compute.NewGlobalAddress(ctx, "private_ip_alloc", &compute.GlobalAddressArgs{
* Name: pulumi.String("alloydb-cluster"),
* AddressType: pulumi.String("INTERNAL"),
* Purpose: pulumi.String("VPC_PEERING"),
* PrefixLength: pulumi.Int(16),
* Network: defaultNetwork.ID(),
* })
* if err != nil {
* return err
* }
* vpcConnection, err := servicenetworking.NewConnection(ctx, "vpc_connection", &servicenetworking.ConnectionArgs{
* Network: defaultNetwork.ID(),
* Service: pulumi.String("servicenetworking.googleapis.com"),
* ReservedPeeringRanges: pulumi.StringArray{
* privateIpAlloc.Name,
* },
* })
* if err != nil {
* return err
* }
* defaultInstance, err := alloydb.NewInstance(ctx, "default", &alloydb.InstanceArgs{
* Cluster: defaultCluster.Name,
* InstanceId: pulumi.String("alloydb-instance"),
* InstanceType: pulumi.String("PRIMARY"),
* }, pulumi.DependsOn([]pulumi.Resource{
* vpcConnection,
* }))
* if err != nil {
* return err
* }
* _, err = alloydb.NewBackup(ctx, "default", &alloydb.BackupArgs{
* Location: pulumi.String("us-central1"),
* BackupId: pulumi.String("alloydb-backup"),
* ClusterName: defaultCluster.Name,
* }, pulumi.DependsOn([]pulumi.Resource{
* defaultInstance,
* }))
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.compute.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.alloydb.Cluster;
* import com.pulumi.gcp.alloydb.ClusterArgs;
* import com.pulumi.gcp.alloydb.inputs.ClusterNetworkConfigArgs;
* import com.pulumi.gcp.compute.GlobalAddress;
* import com.pulumi.gcp.compute.GlobalAddressArgs;
* import com.pulumi.gcp.servicenetworking.Connection;
* import com.pulumi.gcp.servicenetworking.ConnectionArgs;
* import com.pulumi.gcp.alloydb.Instance;
* import com.pulumi.gcp.alloydb.InstanceArgs;
* import com.pulumi.gcp.alloydb.Backup;
* import com.pulumi.gcp.alloydb.BackupArgs;
* 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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
* .name("alloydb-network")
* .build());
* var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
* .clusterId("alloydb-cluster")
* .location("us-central1")
* .networkConfig(ClusterNetworkConfigArgs.builder()
* .network(defaultNetwork.id())
* .build())
* .build());
* var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
* .name("alloydb-cluster")
* .addressType("INTERNAL")
* .purpose("VPC_PEERING")
* .prefixLength(16)
* .network(defaultNetwork.id())
* .build());
* var vpcConnection = new Connection("vpcConnection", ConnectionArgs.builder()
* .network(defaultNetwork.id())
* .service("servicenetworking.googleapis.com")
* .reservedPeeringRanges(privateIpAlloc.name())
* .build());
* var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
* .cluster(defaultCluster.name())
* .instanceId("alloydb-instance")
* .instanceType("PRIMARY")
* .build(), CustomResourceOptions.builder()
* .dependsOn(vpcConnection)
* .build());
* var default_ = new Backup("default", BackupArgs.builder()
* .location("us-central1")
* .backupId("alloydb-backup")
* .clusterName(defaultCluster.name())
* .build(), CustomResourceOptions.builder()
* .dependsOn(defaultInstance)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:alloydb:Backup
* properties:
* location: us-central1
* backupId: alloydb-backup
* clusterName: ${defaultCluster.name}
* options:
* dependson:
* - ${defaultInstance}
* defaultCluster:
* type: gcp:alloydb:Cluster
* name: default
* properties:
* clusterId: alloydb-cluster
* location: us-central1
* networkConfig:
* network: ${defaultNetwork.id}
* defaultInstance:
* type: gcp:alloydb:Instance
* name: default
* properties:
* cluster: ${defaultCluster.name}
* instanceId: alloydb-instance
* instanceType: PRIMARY
* options:
* dependson:
* - ${vpcConnection}
* privateIpAlloc:
* type: gcp:compute:GlobalAddress
* name: private_ip_alloc
* properties:
* name: alloydb-cluster
* addressType: INTERNAL
* purpose: VPC_PEERING
* prefixLength: 16
* network: ${defaultNetwork.id}
* vpcConnection:
* type: gcp:servicenetworking:Connection
* name: vpc_connection
* properties:
* network: ${defaultNetwork.id}
* service: servicenetworking.googleapis.com
* reservedPeeringRanges:
* - ${privateIpAlloc.name}
* defaultNetwork:
* type: gcp:compute:Network
* name: default
* properties:
* name: alloydb-network
* ```
*
* ### Alloydb Backup Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const defaultNetwork = new gcp.compute.Network("default", {name: "alloydb-network"});
* const defaultCluster = new gcp.alloydb.Cluster("default", {
* clusterId: "alloydb-cluster",
* location: "us-central1",
* networkConfig: {
* network: defaultNetwork.id,
* },
* });
* const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
* name: "alloydb-cluster",
* addressType: "INTERNAL",
* purpose: "VPC_PEERING",
* prefixLength: 16,
* network: defaultNetwork.id,
* });
* const vpcConnection = new gcp.servicenetworking.Connection("vpc_connection", {
* network: defaultNetwork.id,
* service: "servicenetworking.googleapis.com",
* reservedPeeringRanges: [privateIpAlloc.name],
* });
* const defaultInstance = new gcp.alloydb.Instance("default", {
* cluster: defaultCluster.name,
* instanceId: "alloydb-instance",
* instanceType: "PRIMARY",
* }, {
* dependsOn: [vpcConnection],
* });
* const _default = new gcp.alloydb.Backup("default", {
* location: "us-central1",
* backupId: "alloydb-backup",
* clusterName: defaultCluster.name,
* description: "example description",
* type: "ON_DEMAND",
* labels: {
* label: "key",
* },
* }, {
* dependsOn: [defaultInstance],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default_network = gcp.compute.Network("default", name="alloydb-network")
* default_cluster = gcp.alloydb.Cluster("default",
* cluster_id="alloydb-cluster",
* location="us-central1",
* network_config={
* "network": default_network.id,
* })
* private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
* name="alloydb-cluster",
* address_type="INTERNAL",
* purpose="VPC_PEERING",
* prefix_length=16,
* network=default_network.id)
* vpc_connection = gcp.servicenetworking.Connection("vpc_connection",
* network=default_network.id,
* service="servicenetworking.googleapis.com",
* reserved_peering_ranges=[private_ip_alloc.name])
* default_instance = gcp.alloydb.Instance("default",
* cluster=default_cluster.name,
* instance_id="alloydb-instance",
* instance_type="PRIMARY",
* opts = pulumi.ResourceOptions(depends_on=[vpc_connection]))
* default = gcp.alloydb.Backup("default",
* location="us-central1",
* backup_id="alloydb-backup",
* cluster_name=default_cluster.name,
* description="example description",
* type="ON_DEMAND",
* labels={
* "label": "key",
* },
* opts = pulumi.ResourceOptions(depends_on=[default_instance]))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var defaultNetwork = new Gcp.Compute.Network("default", new()
* {
* Name = "alloydb-network",
* });
* var defaultCluster = new Gcp.Alloydb.Cluster("default", new()
* {
* ClusterId = "alloydb-cluster",
* Location = "us-central1",
* NetworkConfig = new Gcp.Alloydb.Inputs.ClusterNetworkConfigArgs
* {
* Network = defaultNetwork.Id,
* },
* });
* var privateIpAlloc = new Gcp.Compute.GlobalAddress("private_ip_alloc", new()
* {
* Name = "alloydb-cluster",
* AddressType = "INTERNAL",
* Purpose = "VPC_PEERING",
* PrefixLength = 16,
* Network = defaultNetwork.Id,
* });
* var vpcConnection = new Gcp.ServiceNetworking.Connection("vpc_connection", new()
* {
* Network = defaultNetwork.Id,
* Service = "servicenetworking.googleapis.com",
* ReservedPeeringRanges = new[]
* {
* privateIpAlloc.Name,
* },
* });
* var defaultInstance = new Gcp.Alloydb.Instance("default", new()
* {
* Cluster = defaultCluster.Name,
* InstanceId = "alloydb-instance",
* InstanceType = "PRIMARY",
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* vpcConnection,
* },
* });
* var @default = new Gcp.Alloydb.Backup("default", new()
* {
* Location = "us-central1",
* BackupId = "alloydb-backup",
* ClusterName = defaultCluster.Name,
* Description = "example description",
* Type = "ON_DEMAND",
* Labels =
* {
* { "label", "key" },
* },
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* defaultInstance,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/alloydb"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/servicenetworking"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
* Name: pulumi.String("alloydb-network"),
* })
* if err != nil {
* return err
* }
* defaultCluster, err := alloydb.NewCluster(ctx, "default", &alloydb.ClusterArgs{
* ClusterId: pulumi.String("alloydb-cluster"),
* Location: pulumi.String("us-central1"),
* NetworkConfig: &alloydb.ClusterNetworkConfigArgs{
* Network: defaultNetwork.ID(),
* },
* })
* if err != nil {
* return err
* }
* privateIpAlloc, err := compute.NewGlobalAddress(ctx, "private_ip_alloc", &compute.GlobalAddressArgs{
* Name: pulumi.String("alloydb-cluster"),
* AddressType: pulumi.String("INTERNAL"),
* Purpose: pulumi.String("VPC_PEERING"),
* PrefixLength: pulumi.Int(16),
* Network: defaultNetwork.ID(),
* })
* if err != nil {
* return err
* }
* vpcConnection, err := servicenetworking.NewConnection(ctx, "vpc_connection", &servicenetworking.ConnectionArgs{
* Network: defaultNetwork.ID(),
* Service: pulumi.String("servicenetworking.googleapis.com"),
* ReservedPeeringRanges: pulumi.StringArray{
* privateIpAlloc.Name,
* },
* })
* if err != nil {
* return err
* }
* defaultInstance, err := alloydb.NewInstance(ctx, "default", &alloydb.InstanceArgs{
* Cluster: defaultCluster.Name,
* InstanceId: pulumi.String("alloydb-instance"),
* InstanceType: pulumi.String("PRIMARY"),
* }, pulumi.DependsOn([]pulumi.Resource{
* vpcConnection,
* }))
* if err != nil {
* return err
* }
* _, err = alloydb.NewBackup(ctx, "default", &alloydb.BackupArgs{
* Location: pulumi.String("us-central1"),
* BackupId: pulumi.String("alloydb-backup"),
* ClusterName: defaultCluster.Name,
* Description: pulumi.String("example description"),
* Type: pulumi.String("ON_DEMAND"),
* Labels: pulumi.StringMap{
* "label": pulumi.String("key"),
* },
* }, pulumi.DependsOn([]pulumi.Resource{
* defaultInstance,
* }))
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.compute.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.alloydb.Cluster;
* import com.pulumi.gcp.alloydb.ClusterArgs;
* import com.pulumi.gcp.alloydb.inputs.ClusterNetworkConfigArgs;
* import com.pulumi.gcp.compute.GlobalAddress;
* import com.pulumi.gcp.compute.GlobalAddressArgs;
* import com.pulumi.gcp.servicenetworking.Connection;
* import com.pulumi.gcp.servicenetworking.ConnectionArgs;
* import com.pulumi.gcp.alloydb.Instance;
* import com.pulumi.gcp.alloydb.InstanceArgs;
* import com.pulumi.gcp.alloydb.Backup;
* import com.pulumi.gcp.alloydb.BackupArgs;
* 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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
* .name("alloydb-network")
* .build());
* var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
* .clusterId("alloydb-cluster")
* .location("us-central1")
* .networkConfig(ClusterNetworkConfigArgs.builder()
* .network(defaultNetwork.id())
* .build())
* .build());
* var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
* .name("alloydb-cluster")
* .addressType("INTERNAL")
* .purpose("VPC_PEERING")
* .prefixLength(16)
* .network(defaultNetwork.id())
* .build());
* var vpcConnection = new Connection("vpcConnection", ConnectionArgs.builder()
* .network(defaultNetwork.id())
* .service("servicenetworking.googleapis.com")
* .reservedPeeringRanges(privateIpAlloc.name())
* .build());
* var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
* .cluster(defaultCluster.name())
* .instanceId("alloydb-instance")
* .instanceType("PRIMARY")
* .build(), CustomResourceOptions.builder()
* .dependsOn(vpcConnection)
* .build());
* var default_ = new Backup("default", BackupArgs.builder()
* .location("us-central1")
* .backupId("alloydb-backup")
* .clusterName(defaultCluster.name())
* .description("example description")
* .type("ON_DEMAND")
* .labels(Map.of("label", "key"))
* .build(), CustomResourceOptions.builder()
* .dependsOn(defaultInstance)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:alloydb:Backup
* properties:
* location: us-central1
* backupId: alloydb-backup
* clusterName: ${defaultCluster.name}
* description: example description
* type: ON_DEMAND
* labels:
* label: key
* options:
* dependson:
* - ${defaultInstance}
* defaultCluster:
* type: gcp:alloydb:Cluster
* name: default
* properties:
* clusterId: alloydb-cluster
* location: us-central1
* networkConfig:
* network: ${defaultNetwork.id}
* defaultInstance:
* type: gcp:alloydb:Instance
* name: default
* properties:
* cluster: ${defaultCluster.name}
* instanceId: alloydb-instance
* instanceType: PRIMARY
* options:
* dependson:
* - ${vpcConnection}
* privateIpAlloc:
* type: gcp:compute:GlobalAddress
* name: private_ip_alloc
* properties:
* name: alloydb-cluster
* addressType: INTERNAL
* purpose: VPC_PEERING
* prefixLength: 16
* network: ${defaultNetwork.id}
* vpcConnection:
* type: gcp:servicenetworking:Connection
* name: vpc_connection
* properties:
* network: ${defaultNetwork.id}
* service: servicenetworking.googleapis.com
* reservedPeeringRanges:
* - ${privateIpAlloc.name}
* defaultNetwork:
* type: gcp:compute:Network
* name: default
* properties:
* name: alloydb-network
* ```
*
* ## Import
* Backup can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/backups/{{backup_id}}`
* * `{{project}}/{{location}}/{{backup_id}}`
* * `{{location}}/{{backup_id}}`
* When using the `pulumi import` command, Backup can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:alloydb/backup:Backup default projects/{{project}}/locations/{{location}}/backups/{{backup_id}}
* ```
* ```sh
* $ pulumi import gcp:alloydb/backup:Backup default {{project}}/{{location}}/{{backup_id}}
* ```
* ```sh
* $ pulumi import gcp:alloydb/backup:Backup default {{location}}/{{backup_id}}
* ```
* @property annotations Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128
* An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effective_annotations` for all of the annotations present on the resource.
* @property backupId The ID of the alloydb backup.
* @property clusterName The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
* @property description User-provided description of the backup.
* @property displayName User-settable and human-readable display name for the Backup.
* @property encryptionConfig EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
* Structure is documented below.
* @property labels User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effective_labels` for all of the labels present on the resource.
* @property location The location where the alloydb backup should reside.
* - - -
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property type The backup type, which suggests the trigger for the backup.
* Possible values are: `TYPE_UNSPECIFIED`, `ON_DEMAND`, `AUTOMATED`, `CONTINUOUS`.
*/
public data class BackupArgs(
public val annotations: Output>? = null,
public val backupId: Output? = null,
public val clusterName: Output? = null,
public val description: Output? = null,
public val displayName: Output? = null,
public val encryptionConfig: Output? = null,
public val labels: Output>? = null,
public val location: Output? = null,
public val project: Output? = null,
public val type: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.alloydb.BackupArgs =
com.pulumi.gcp.alloydb.BackupArgs.builder()
.annotations(
annotations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.backupId(backupId?.applyValue({ args0 -> args0 }))
.clusterName(clusterName?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.displayName(displayName?.applyValue({ args0 -> args0 }))
.encryptionConfig(encryptionConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.location(location?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [BackupArgs].
*/
@PulumiTagMarker
public class BackupArgsBuilder internal constructor() {
private var annotations: Output>? = null
private var backupId: Output? = null
private var clusterName: Output? = null
private var description: Output? = null
private var displayName: Output? = null
private var encryptionConfig: Output? = null
private var labels: Output>? = null
private var location: Output? = null
private var project: Output? = null
private var type: Output? = null
/**
* @param value Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128
* An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effective_annotations` for all of the annotations present on the resource.
*/
@JvmName("wnldhhtknwsowufp")
public suspend fun annotations(`value`: Output>) {
this.annotations = value
}
/**
* @param value The ID of the alloydb backup.
*/
@JvmName("yhespviehvhawkew")
public suspend fun backupId(`value`: Output) {
this.backupId = value
}
/**
* @param value The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
*/
@JvmName("dynxxuxphxkynaki")
public suspend fun clusterName(`value`: Output) {
this.clusterName = value
}
/**
* @param value User-provided description of the backup.
*/
@JvmName("camupevbewckfthi")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value User-settable and human-readable display name for the Backup.
*/
@JvmName("avhpuggkmlmobgdx")
public suspend fun displayName(`value`: Output) {
this.displayName = value
}
/**
* @param value EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
* Structure is documented below.
*/
@JvmName("nnwmcxlelxhljias")
public suspend fun encryptionConfig(`value`: Output) {
this.encryptionConfig = value
}
/**
* @param value User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effective_labels` for all of the labels present on the resource.
*/
@JvmName("oatutcnlxenbokrm")
public suspend fun labels(`value`: Output>) {
this.labels = value
}
/**
* @param value The location where the alloydb backup should reside.
* - - -
*/
@JvmName("ovvxkixeprxfxybc")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("xsdlkewbrroaicxy")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The backup type, which suggests the trigger for the backup.
* Possible values are: `TYPE_UNSPECIFIED`, `ON_DEMAND`, `AUTOMATED`, `CONTINUOUS`.
*/
@JvmName("dsaxgqxwyjaxqgdd")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128
* An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effective_annotations` for all of the annotations present on the resource.
*/
@JvmName("mqepyxvbnvaxdblw")
public suspend fun annotations(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.annotations = mapped
}
/**
* @param values Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128
* An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effective_annotations` for all of the annotations present on the resource.
*/
@JvmName("csxtikqimpvetpcr")
public fun annotations(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.annotations = mapped
}
/**
* @param value The ID of the alloydb backup.
*/
@JvmName("vsiigahrgmfwllce")
public suspend fun backupId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backupId = mapped
}
/**
* @param value The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
*/
@JvmName("qfguhpnvyegjfkfr")
public suspend fun clusterName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clusterName = mapped
}
/**
* @param value User-provided description of the backup.
*/
@JvmName("upqqsrifibcugtkw")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value User-settable and human-readable display name for the Backup.
*/
@JvmName("torddbvplsbyciay")
public suspend fun displayName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.displayName = mapped
}
/**
* @param value EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
* Structure is documented below.
*/
@JvmName("hhmhqfujkmyqapyx")
public suspend fun encryptionConfig(`value`: BackupEncryptionConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.encryptionConfig = mapped
}
/**
* @param argument EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
* Structure is documented below.
*/
@JvmName("qkqvrnmqphajqjfa")
public suspend fun encryptionConfig(argument: suspend BackupEncryptionConfigArgsBuilder.() -> Unit) {
val toBeMapped = BackupEncryptionConfigArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.encryptionConfig = mapped
}
/**
* @param value User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effective_labels` for all of the labels present on the resource.
*/
@JvmName("xtbnpuewaylldciw")
public suspend fun labels(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param values User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effective_labels` for all of the labels present on the resource.
*/
@JvmName("igqdvbxnwogdedcv")
public fun labels(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param value The location where the alloydb backup should reside.
* - - -
*/
@JvmName("jasaeqqfnboafocu")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("rlecjfkalgigbvyd")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value The backup type, which suggests the trigger for the backup.
* Possible values are: `TYPE_UNSPECIFIED`, `ON_DEMAND`, `AUTOMATED`, `CONTINUOUS`.
*/
@JvmName("hkosgcexkkvmhvub")
public suspend fun type(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): BackupArgs = BackupArgs(
annotations = annotations,
backupId = backupId,
clusterName = clusterName,
description = description,
displayName = displayName,
encryptionConfig = encryptionConfig,
labels = labels,
location = location,
project = project,
type = type,
)
}