Google Cloud v9.4.0 published on Tuesday, Nov 4, 2025 by Pulumi
gcp.backupdisasterrecovery.getBackupPlanAssociations
Start a Neo task
Explain and create a gcp.backupdisasterrecovery.getBackupPlanAssociations resource
Provides a list of Backup and DR BackupPlanAssociations for a specific resource type.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const computeInstanceAssociations = gcp.backupdisasterrecovery.getBackupPlanAssociations({
location: "us-central1",
resourceType: "compute.googleapis.com/Instance",
});
import pulumi
import pulumi_gcp as gcp
compute_instance_associations = gcp.backupdisasterrecovery.get_backup_plan_associations(location="us-central1",
resource_type="compute.googleapis.com/Instance")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/backupdisasterrecovery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := backupdisasterrecovery.GetBackupPlanAssociations(ctx, &backupdisasterrecovery.GetBackupPlanAssociationsArgs{
Location: "us-central1",
ResourceType: "compute.googleapis.com/Instance",
}, 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 computeInstanceAssociations = Gcp.BackupDisasterRecovery.GetBackupPlanAssociations.Invoke(new()
{
Location = "us-central1",
ResourceType = "compute.googleapis.com/Instance",
});
});
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.GetBackupPlanAssociationsArgs;
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 computeInstanceAssociations = BackupdisasterrecoveryFunctions.getBackupPlanAssociations(GetBackupPlanAssociationsArgs.builder()
.location("us-central1")
.resourceType("compute.googleapis.com/Instance")
.build());
}
}
variables:
computeInstanceAssociations:
fn::invoke:
function: gcp:backupdisasterrecovery:getBackupPlanAssociations
arguments:
location: us-central1
resourceType: compute.googleapis.com/Instance
Using getBackupPlanAssociations
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 getBackupPlanAssociations(args: GetBackupPlanAssociationsArgs, opts?: InvokeOptions): Promise<GetBackupPlanAssociationsResult>
function getBackupPlanAssociationsOutput(args: GetBackupPlanAssociationsOutputArgs, opts?: InvokeOptions): Output<GetBackupPlanAssociationsResult>def get_backup_plan_associations(location: Optional[str] = None,
project: Optional[str] = None,
resource_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBackupPlanAssociationsResult
def get_backup_plan_associations_output(location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
resource_type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBackupPlanAssociationsResult]func GetBackupPlanAssociations(ctx *Context, args *GetBackupPlanAssociationsArgs, opts ...InvokeOption) (*GetBackupPlanAssociationsResult, error)
func GetBackupPlanAssociationsOutput(ctx *Context, args *GetBackupPlanAssociationsOutputArgs, opts ...InvokeOption) GetBackupPlanAssociationsResultOutput> Note: This function is named GetBackupPlanAssociations in the Go SDK.
public static class GetBackupPlanAssociations
{
public static Task<GetBackupPlanAssociationsResult> InvokeAsync(GetBackupPlanAssociationsArgs args, InvokeOptions? opts = null)
public static Output<GetBackupPlanAssociationsResult> Invoke(GetBackupPlanAssociationsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBackupPlanAssociationsResult> getBackupPlanAssociations(GetBackupPlanAssociationsArgs args, InvokeOptions options)
public static Output<GetBackupPlanAssociationsResult> getBackupPlanAssociations(GetBackupPlanAssociationsArgs args, InvokeOptions options)
fn::invoke:
function: gcp:backupdisasterrecovery/getBackupPlanAssociations:getBackupPlanAssociations
arguments:
# arguments dictionaryThe following arguments are supported:
- Location string
- The location where the Backup Plan Association resources reside.
- Resource
Type string - The resource type of the workload. For example, sqladmin.googleapis.com/Instance or compute.googleapis.com/Instance.
- Project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- Location string
- The location where the Backup Plan Association resources reside.
- Resource
Type string - The resource type of the workload. For example, sqladmin.googleapis.com/Instance or compute.googleapis.com/Instance.
- Project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- The location where the Backup Plan Association resources reside.
- resource
Type String - The resource type of the workload. For example, sqladmin.googleapis.com/Instance or compute.googleapis.com/Instance.
- project String
- The project in which the resource belongs. If it is not provided, the provider project is used.
- location string
- The location where the Backup Plan Association resources reside.
- resource
Type string - The resource type of the workload. For example, sqladmin.googleapis.com/Instance or compute.googleapis.com/Instance.
- project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- location str
- The location where the Backup Plan Association resources reside.
- resource_
type str - The resource type of the workload. For example, sqladmin.googleapis.com/Instance or compute.googleapis.com/Instance.
- project str
- The project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- The location where the Backup Plan Association resources reside.
- resource
Type String - The resource type of the workload. For example, sqladmin.googleapis.com/Instance or compute.googleapis.com/Instance.
- project String
- The project in which the resource belongs. If it is not provided, the provider project is used.
getBackupPlanAssociations Result
The following output properties are available:
- Associations
List<Get
Backup Plan Associations Association> - A list of the backup plan associations found.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Project string
- The ID of the project in which the resource belongs.
- Resource
Type string
- Associations
[]Get
Backup Plan Associations Association - A list of the backup plan associations found.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Project string
- The ID of the project in which the resource belongs.
- Resource
Type string
- associations
List<Get
Backup Plan Associations Association> - A list of the backup plan associations found.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- project String
- The ID of the project in which the resource belongs.
- resource
Type String
- associations
Get
Backup Plan Associations Association[] - A list of the backup plan associations found.
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- project string
- The ID of the project in which the resource belongs.
- resource
Type string
- associations
Sequence[Get
Backup Plan Associations Association] - A list of the backup plan associations found.
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- project str
- The ID of the project in which the resource belongs.
- resource_
type str
- associations List<Property Map>
- A list of the backup plan associations found.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- project String
- The ID of the project in which the resource belongs.
- resource
Type String
Supporting Types
GetBackupPlanAssociationsAssociation
- Backup
Plan string - The backup plan to which the resource is attached.
- Create
Time string - Data
Source string - The resource name of data source which will be used as storage location for backups taken.
- Name string
- The full name of the backup plan association resource.
- Resource string
- The resource to which the backup plan is applied.
- Rules
Config List<GetInfos Backup Plan Associations Association Rules Config Info> - A list containing information about the backup rules. Each object in the list contains:
- Backup
Plan string - The backup plan to which the resource is attached.
- Create
Time string - Data
Source string - The resource name of data source which will be used as storage location for backups taken.
- Name string
- The full name of the backup plan association resource.
- Resource string
- The resource to which the backup plan is applied.
- Rules
Config []GetInfos Backup Plan Associations Association Rules Config Info - A list containing information about the backup rules. Each object in the list contains:
- backup
Plan String - The backup plan to which the resource is attached.
- create
Time String - data
Source String - The resource name of data source which will be used as storage location for backups taken.
- name String
- The full name of the backup plan association resource.
- resource String
- The resource to which the backup plan is applied.
- rules
Config List<GetInfos Backup Plan Associations Association Rules Config Info> - A list containing information about the backup rules. Each object in the list contains:
- backup
Plan string - The backup plan to which the resource is attached.
- create
Time string - data
Source string - The resource name of data source which will be used as storage location for backups taken.
- name string
- The full name of the backup plan association resource.
- resource string
- The resource to which the backup plan is applied.
- rules
Config GetInfos Backup Plan Associations Association Rules Config Info[] - A list containing information about the backup rules. Each object in the list contains:
- backup_
plan str - The backup plan to which the resource is attached.
- create_
time str - data_
source str - The resource name of data source which will be used as storage location for backups taken.
- name str
- The full name of the backup plan association resource.
- resource str
- The resource to which the backup plan is applied.
- rules_
config_ Sequence[Getinfos Backup Plan Associations Association Rules Config Info] - A list containing information about the backup rules. Each object in the list contains:
- backup
Plan String - The backup plan to which the resource is attached.
- create
Time String - data
Source String - The resource name of data source which will be used as storage location for backups taken.
- name String
- The full name of the backup plan association resource.
- resource String
- The resource to which the backup plan is applied.
- rules
Config List<Property Map>Infos - A list containing information about the backup rules. Each object in the list contains:
GetBackupPlanAssociationsAssociationRulesConfigInfo
- Last
Backup List<GetErrors Backup Plan Associations Association Rules Config Info Last Backup Error> - A block containing details of the last backup error, if any.
- Last
Backup stringState - State of last backup taken.
- Last
Successful stringBackup Consistency Time - The point in time when the last successful backup was captured from the source.
- Rule
Id string - Backup Rule id fetched from backup plan.
- Last
Backup []GetErrors Backup Plan Associations Association Rules Config Info Last Backup Error - A block containing details of the last backup error, if any.
- Last
Backup stringState - State of last backup taken.
- Last
Successful stringBackup Consistency Time - The point in time when the last successful backup was captured from the source.
- Rule
Id string - Backup Rule id fetched from backup plan.
- last
Backup List<GetErrors Backup Plan Associations Association Rules Config Info Last Backup Error> - A block containing details of the last backup error, if any.
- last
Backup StringState - State of last backup taken.
- last
Successful StringBackup Consistency Time - The point in time when the last successful backup was captured from the source.
- rule
Id String - Backup Rule id fetched from backup plan.
- last
Backup GetErrors Backup Plan Associations Association Rules Config Info Last Backup Error[] - A block containing details of the last backup error, if any.
- last
Backup stringState - State of last backup taken.
- last
Successful stringBackup Consistency Time - The point in time when the last successful backup was captured from the source.
- rule
Id string - Backup Rule id fetched from backup plan.
- last_
backup_ Sequence[Geterrors Backup Plan Associations Association Rules Config Info Last Backup Error] - A block containing details of the last backup error, if any.
- last_
backup_ strstate - State of last backup taken.
- last_
successful_ strbackup_ consistency_ time - The point in time when the last successful backup was captured from the source.
- rule_
id str - Backup Rule id fetched from backup plan.
- last
Backup List<Property Map>Errors - A block containing details of the last backup error, if any.
- last
Backup StringState - State of last backup taken.
- last
Successful StringBackup Consistency Time - The point in time when the last successful backup was captured from the source.
- rule
Id String - Backup Rule id fetched from backup plan.
GetBackupPlanAssociationsAssociationRulesConfigInfoLastBackupError
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
