---
title: "POST /v1/{+parent}/backupPlanAssociations"
method: POST
path: "/v1/{+parent}/backupPlanAssociations"
tags: ["projects"]
---

# POST /v1/{+parent}/backupPlanAssociations

`POST /v1/{+parent}/backupPlanAssociations`

Create a BackupPlanAssociation

## Path parameters

- `parent` string, required

## Query parameters

- `backupPlanAssociationId` string
- `requestId` string

## Request body

- BackupPlanAssociation — A BackupPlanAssociation represents a single BackupPlanAssociation which contains details like workload, backup plan etc
  - `cloudSqlInstanceBackupPlanAssociationProperties` CloudSqlInstanceBackupPlanAssociationProperties — Cloud SQL instance's BPA properties.
    - `instanceCreateTime` string, google-datetime — Output only. The time when the instance was created.
  - `filestoreInstanceBackupPlanAssociationProperties` FilestoreInstanceBackupPlanAssociationProperties — Filestore instance's BPA properties.
    - `instanceCreateTime` string, google-datetime — Output only. The time when the instance was created.
  - `backupPlan` string — Required. Resource name of backup plan which needs to be applied on workload. Format: projects/{project}/locations/{location}/backupPlans/{backupPlanId}
  - `alloydbClusterBackupPlanAssociationProperties` AlloyDBClusterBackupPlanAssociationProperties — Properties for an AlloyDB cluster backup plan association.
    - `clusterUid` string — Output only. The cluster UID of the AlloyDB cluster.
  - `resource` string — Required. Immutable. Resource name of workload on which the backup plan is applied. The format can either be the resource name (e.g., "projects/my-project/zones/us-central1-a/instances/my-instance") or the full resource URI (e.g., "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance").
  - `createTime` string, google-datetime — Output only. The time when the instance was created.
  - `backupPlanRevisionId` string — Output only. The user friendly revision ID of the `BackupPlanRevision`. Example: v0, v1, v2, etc.
  - `resourceType` string — Required. Immutable. Resource type of workload on which backupplan is applied
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'DELETING' | 'INACTIVE' | 'UPDATING' — Output only. The BackupPlanAssociation resource state.
  - `updateTime` string, google-datetime — Output only. The time when the instance was updated.
  - `rulesConfigInfo` RuleConfigInfo[] — Output only. The config info related to backup rules.
    - `ruleId` string — Output only. Backup Rule id fetched from backup plan.
    - `lastBackupState` 'LAST_BACKUP_STATE_UNSPECIFIED' | 'FIRST_BACKUP_PENDING' | 'PERMISSION_DENIED' | 'SUCCEEDED' | 'FAILED' — Output only. The last backup state for rule.
    - `lastBackupError` Status — The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
      - `code` integer — The status code, which should be an enum value of google.rpc.Code.
      - `message` string — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
      - `details` object[] — A list of messages that carry the error details. There is a common set of message types for APIs to use.
    - `lastSuccessfulBackupConsistencyTime` string, google-datetime — Output only. The point in time when the last successful backup was captured from the source.
  - `backupPlanRevisionName` string — Output only. The resource id of the `BackupPlanRevision`. Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
  - `name` string — Output only. Identifier. The resource name of BackupPlanAssociation in below format Format : projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
  - `dataSource` string — Output only. Resource name of data source which will be used as storage location for backups taken. Format : projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/backupdr.md) · [All operations](https://skmtc.dev/google/apis/backupdr/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/backupdr/revisions/b432f73f0b98/schema)
