Restore Channel Args
A RestoreChannel imposes constraints on where backups can be restored. The RestoreChannel should be in the same project and region as the backups. The backups can only be restored in the destination_project. To get more information about RestoreChannel, see:
How-to Guides
Example Usage
Gkebackup Restorechannel Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const basic = new gcp.gkebackup.RestoreChannel("basic", {
name: "basic-channel",
location: "us-central1",
description: "",
destinationProject: "projects/24240755850",
labels: {
key: "some-value",
},
});
import pulumi
import pulumi_gcp as gcp
basic = gcp.gkebackup.RestoreChannel("basic",
name="basic-channel",
location="us-central1",
description="",
destination_project="projects/24240755850",
labels={
"key": "some-value",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var basic = new Gcp.GkeBackup.RestoreChannel("basic", new()
{
Name = "basic-channel",
Location = "us-central1",
Description = "",
DestinationProject = "projects/24240755850",
Labels =
{
{ "key", "some-value" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkebackup"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gkebackup.NewRestoreChannel(ctx, "basic", &gkebackup.RestoreChannelArgs{
Name: pulumi.String("basic-channel"),
Location: pulumi.String("us-central1"),
Description: pulumi.String(""),
DestinationProject: pulumi.String("projects/24240755850"),
Labels: pulumi.StringMap{
"key": pulumi.String("some-value"),
},
})
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.gcp.gkebackup.RestoreChannel;
import com.pulumi.gcp.gkebackup.RestoreChannelArgs;
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 basic = new RestoreChannel("basic", RestoreChannelArgs.builder()
.name("basic-channel")
.location("us-central1")
.description("")
.destinationProject("projects/24240755850")
.labels(Map.of("key", "some-value"))
.build());
}
}
resources:
basic:
type: gcp:gkebackup:RestoreChannel
properties:
name: basic-channel
location: us-central1
description: ""
destinationProject: projects/24240755850
labels:
key: some-value
Import
RestoreChannel can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/restoreChannels/{{name}}
{{project}}/{{location}}/{{name}}
{{location}}/{{name}}
When using thepulumi import
command, RestoreChannel can be imported using one of the formats above. For example:
$ pulumi import gcp:gkebackup/restoreChannel:RestoreChannel default projects/{{project}}/locations/{{location}}/restoreChannels/{{name}}
$ pulumi import gcp:gkebackup/restoreChannel:RestoreChannel default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:gkebackup/restoreChannel:RestoreChannel default {{location}}/{{name}}
Constructors
Properties
User specified descriptive string for this RestoreChannel.
The project where Backups will be restored. The format is projects/{project}
. {project} can only be a project number.
Description: A set of custom labels supplied by the user. 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.