Reference documentation and code samples for the Google Cloud Backup Dr V1 Client class BackupPlan.
A BackupPlan
specifies some common fields, such as description
as well
as one or more BackupRule
messages. Each BackupRule
has a retention
policy and defines a schedule by which the system is to perform backup
workloads.
Generated from protobuf message google.cloud.backupdr.v1.BackupPlan
Namespace
Google \ Cloud \ BackupDR \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. Identifier. The resource name of the BackupPlan
. Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}
↳ description
string
Optional. The description of the BackupPlan
resource. The description allows for additional details about BackupPlan
and its use cases to be provided. An example description is the following: "This is a backup plan that performs a daily backup at 6pm and retains data for 3 months". The description must be at most 2048 characters.
↳ labels
array| Google\Protobuf\Internal\MapField
Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.
↳ create_time
↳ update_time
↳ backup_rules
array< BackupRule
>
Required. The backup rules for this BackupPlan
. There must be at least one BackupRule
message.
↳ state
int
Output only. The State
for the BackupPlan
.
↳ resource_type
string
Required. The resource type to which the BackupPlan
will be applied. Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk".
↳ etag
string
Optional. etag
is returned from the service in the response. As a user of the service, you may provide an etag value in this field to prevent stale resources.
↳ backup_vault
string
Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}
↳ backup_vault_service_account
string
Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.
↳ log_retention_days
int|string
Optional. Applicable only for CloudSQL resource_type. Configures how long logs will be stored. It is defined in “days”. This value should be greater than or equal to minimum enforced log retention duration of the backup vault.
↳ supported_resource_types
array
Output only. All resource types to which backupPlan can be applied.
↳ revision_id
string
Output only. The user friendly revision ID of the BackupPlanRevision
. Example: v0, v1, v2, etc.
↳ revision_name
string
Output only. The resource id of the BackupPlanRevision
. Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}
getName
Output only. Identifier. The resource name of the BackupPlan
.
Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}
string
setName
Output only. Identifier. The resource name of the BackupPlan
.
Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}
var
string
$this
getDescription
Optional. The description of the BackupPlan
resource.
The description allows for additional details about BackupPlan
and its
use cases to be provided. An example description is the following: "This
is a backup plan that performs a daily backup at 6pm and retains data for 3
months". The description must be at most 2048 characters.
string
setDescription
Optional. The description of the BackupPlan
resource.
The description allows for additional details about BackupPlan
and its
use cases to be provided. An example description is the following: "This
is a backup plan that performs a daily backup at 6pm and retains data for 3
months". The description must be at most 2048 characters.
var
string
$this
getLabels
Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.
setLabels
Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.
$this
getCreateTime
Output only. When the BackupPlan
was created.
hasCreateTime
clearCreateTime
setCreateTime
Output only. When the BackupPlan
was created.
$this
getUpdateTime
Output only. When the BackupPlan
was last updated.
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. When the BackupPlan
was last updated.
$this
getBackupRules
Required. The backup rules for this BackupPlan
. There must be at least
one BackupRule
message.
setBackupRules
Required. The backup rules for this BackupPlan
. There must be at least
one BackupRule
message.
$this
getState
Output only. The State
for the BackupPlan
.
int
setState
Output only. The State
for the BackupPlan
.
var
int
$this
getResourceType
Required. The resource type to which the BackupPlan
will be applied.
Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk".
string
setResourceType
Required. The resource type to which the BackupPlan
will be applied.
Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk".
var
string
$this
getEtag
Optional. etag
is returned from the service in the response. As a user of
the service, you may provide an etag value in this field to prevent stale
resources.
string
setEtag
Optional. etag
is returned from the service in the response. As a user of
the service, you may provide an etag value in this field to prevent stale
resources.
var
string
$this
getBackupVault
Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}
string
setBackupVault
Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}
var
string
$this
getBackupVaultServiceAccount
Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.
string
setBackupVaultServiceAccount
Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.
var
string
$this
getLogRetentionDays
Optional. Applicable only for CloudSQL resource_type.
Configures how long logs will be stored. It is defined in “days”. This value should be greater than or equal to minimum enforced log retention duration of the backup vault.
int|string
setLogRetentionDays
Optional. Applicable only for CloudSQL resource_type.
Configures how long logs will be stored. It is defined in “days”. This value should be greater than or equal to minimum enforced log retention duration of the backup vault.
var
int|string
$this
getSupportedResourceTypes
Output only. All resource types to which backupPlan can be applied.
setSupportedResourceTypes
Output only. All resource types to which backupPlan can be applied.
var
string[]
$this
getRevisionId
Output only. The user friendly revision ID of the BackupPlanRevision
.
Example: v0, v1, v2, etc.
string
setRevisionId
Output only. The user friendly revision ID of the BackupPlanRevision
.
Example: v0, v1, v2, etc.
var
string
$this
getRevisionName
Output only. The resource id of the BackupPlanRevision
.
Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}
string
setRevisionName
Output only. The resource id of the BackupPlanRevision
.
Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}
var
string
$this