Google Cloud Backup Dr V1 Client - Class BackupPlan (0.4.0)

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 \ V1

Methods

__construct

Constructor.

Parameters
Name Description
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 Google\Protobuf\Timestamp

Output only. When the BackupPlan was created.

↳ update_time Google\Protobuf\Timestamp

Output only. When the BackupPlan was last updated.

↳ backup_rules array<Google\Cloud\BackupDR\V1\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" and "storage.googleapis.com/Bucket".

↳ 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.

getName

Output only. Identifier. The resource name of the BackupPlan.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

Returns
Type Description
string

setName

Output only. Identifier. The resource name of the BackupPlan.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

Parameter
Name Description
var string
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var string
Returns
Type Description
$this

getLabels

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

Returns
Type Description
Google\Protobuf\Internal\MapField

setLabels

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getCreateTime

Output only. When the BackupPlan was created.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. When the BackupPlan was created.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. When the BackupPlan was last updated.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. When the BackupPlan was last updated.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getBackupRules

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setBackupRules

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

Parameter
Name Description
var array<Google\Cloud\BackupDR\V1\BackupRule>
Returns
Type Description
$this

getState

Output only. The State for the BackupPlan.

Returns
Type Description
int

setState

Output only. The State for the BackupPlan.

Parameter
Name Description
var int
Returns
Type Description
$this

getResourceType

Required. The resource type to which the BackupPlan will be applied.

Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".

Returns
Type Description
string

setResourceType

Required. The resource type to which the BackupPlan will be applied.

Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket".

Parameter
Name Description
var string
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var string
Returns
Type Description
$this

getBackupVault

Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}

Returns
Type Description
string

setBackupVault

Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}

Parameter
Name Description
var string
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var string
Returns
Type Description
$this