Google Cloud v8.14.0 published on Wednesday, Jan 15, 2025 by Pulumi
gcp.backupdisasterrecovery.getBackup
Explore with Pulumi AI
A Backup and DR Backup.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const foo = gcp.backupdisasterrecovery.getBackup({
location: "us-central1",
project: "project-test",
dataSourceId: "ds-test",
backupVaultId: "bv-test",
});
import pulumi
import pulumi_gcp as gcp
foo = gcp.backupdisasterrecovery.get_backup(location="us-central1",
project="project-test",
data_source_id="ds-test",
backup_vault_id="bv-test")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/backupdisasterrecovery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := backupdisasterrecovery.GetBackup(ctx, &backupdisasterrecovery.GetBackupArgs{
Location: "us-central1",
Project: "project-test",
DataSourceId: "ds-test",
BackupVaultId: "bv-test",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var foo = Gcp.BackupDisasterRecovery.GetBackup.Invoke(new()
{
Location = "us-central1",
Project = "project-test",
DataSourceId = "ds-test",
BackupVaultId = "bv-test",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions;
import com.pulumi.gcp.backupdisasterrecovery.inputs.GetBackupArgs;
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) {
final var foo = BackupdisasterrecoveryFunctions.getBackup(GetBackupArgs.builder()
.location("us-central1")
.project("project-test")
.dataSourceId("ds-test")
.backupVaultId("bv-test")
.build());
}
}
variables:
foo:
fn::invoke:
function: gcp:backupdisasterrecovery:getBackup
arguments:
location: us-central1
project: project-test
dataSourceId: ds-test
backupVaultId: bv-test
Using getBackup
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getBackup(args: GetBackupArgs, opts?: InvokeOptions): Promise<GetBackupResult>
function getBackupOutput(args: GetBackupOutputArgs, opts?: InvokeOptions): Output<GetBackupResult>
def get_backup(backup_vault_id: Optional[str] = None,
data_source_id: Optional[str] = None,
location: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBackupResult
def get_backup_output(backup_vault_id: Optional[pulumi.Input[str]] = None,
data_source_id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBackupResult]
func GetBackup(ctx *Context, args *GetBackupArgs, opts ...InvokeOption) (*GetBackupResult, error)
func GetBackupOutput(ctx *Context, args *GetBackupOutputArgs, opts ...InvokeOption) GetBackupResultOutput
> Note: This function is named GetBackup
in the Go SDK.
public static class GetBackup
{
public static Task<GetBackupResult> InvokeAsync(GetBackupArgs args, InvokeOptions? opts = null)
public static Output<GetBackupResult> Invoke(GetBackupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBackupResult> getBackup(GetBackupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:backupdisasterrecovery/getBackup:getBackup
arguments:
# arguments dictionary
The following arguments are supported:
- Backup
Vault stringId - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- Data
Source stringId - The ID of the Data Source in which the Backup belongs.
- Location string
- The location in which the Backup belongs.
- Project string
- The Google Cloud Project in which the Backup belongs.
- Backup
Vault stringId - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- Data
Source stringId - The ID of the Data Source in which the Backup belongs.
- Location string
- The location in which the Backup belongs.
- Project string
- The Google Cloud Project in which the Backup belongs.
- backup
Vault StringId - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- data
Source StringId - The ID of the Data Source in which the Backup belongs.
- location String
- The location in which the Backup belongs.
- project String
- The Google Cloud Project in which the Backup belongs.
- backup
Vault stringId - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- data
Source stringId - The ID of the Data Source in which the Backup belongs.
- location string
- The location in which the Backup belongs.
- project string
- The Google Cloud Project in which the Backup belongs.
- backup_
vault_ strid - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- data_
source_ strid - The ID of the Data Source in which the Backup belongs.
- location str
- The location in which the Backup belongs.
- project str
- The Google Cloud Project in which the Backup belongs.
- backup
Vault StringId - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- data
Source StringId - The ID of the Data Source in which the Backup belongs.
- location String
- The location in which the Backup belongs.
- project String
- The Google Cloud Project in which the Backup belongs.
getBackup Result
The following output properties are available:
- Backup
Vault stringId - Backups
List<Get
Backup Backup> - Data
Source stringId - Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Project string
- Backup
Vault stringId - Backups
[]Get
Backup Backup - Data
Source stringId - Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Project string
- backup
Vault StringId - backups
List<Get
Backup Backup> - data
Source StringId - id String
- The provider-assigned unique ID for this managed resource.
- location String
- name String
- project String
- backup
Vault stringId - backups
Get
Backup Backup[] - data
Source stringId - id string
- The provider-assigned unique ID for this managed resource.
- location string
- name string
- project string
- backup_
vault_ strid - backups
Sequence[Get
Backup Backup] - data_
source_ strid - id str
- The provider-assigned unique ID for this managed resource.
- location str
- name str
- project str
- backup
Vault StringId - backups List<Property Map>
- data
Source StringId - id String
- The provider-assigned unique ID for this managed resource.
- location String
- name String
- project String
Supporting Types
GetBackupBackup
- Backup
Id string - Id of the requesting object, Backup.
- Backup
Vault stringId - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- Data
Source stringId - The ID of the Data Source in which the Backup belongs.
- Location string
- The location in which the Backup belongs.
- Name string
- Name of the resource.
- Backup
Id string - Id of the requesting object, Backup.
- Backup
Vault stringId - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- Data
Source stringId - The ID of the Data Source in which the Backup belongs.
- Location string
- The location in which the Backup belongs.
- Name string
- Name of the resource.
- backup
Id String - Id of the requesting object, Backup.
- backup
Vault StringId - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- data
Source StringId - The ID of the Data Source in which the Backup belongs.
- location String
- The location in which the Backup belongs.
- name String
- Name of the resource.
- backup
Id string - Id of the requesting object, Backup.
- backup
Vault stringId - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- data
Source stringId - The ID of the Data Source in which the Backup belongs.
- location string
- The location in which the Backup belongs.
- name string
- Name of the resource.
- backup_
id str - Id of the requesting object, Backup.
- backup_
vault_ strid - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- data_
source_ strid - The ID of the Data Source in which the Backup belongs.
- location str
- The location in which the Backup belongs.
- name str
- Name of the resource.
- backup
Id String - Id of the requesting object, Backup.
- backup
Vault StringId - The ID of the Backup Vault of the Data Source in which the Backup belongs.
- data
Source StringId - The ID of the Data Source in which the Backup belongs.
- location String
- The location in which the Backup belongs.
- name String
- Name of the resource.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.