google.cloud.gcp_alloydb_backup_info module – List Alloydb.Backup resources

Note

This module is part of the google.cloud collection (version 1.15.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install google.cloud. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: google.cloud.gcp_alloydb_backup_info.

Synopsis

  • An AlloyDB Backup.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.8

  • requests >= 2.18.4

  • google-auth >= 2.25.1

Parameters

Parameter

Comments

access_token

string

The access token used to authenticate.

auth_kind

string / required

The type of credential used.

Choices:

  • "accesstoken"

  • "application"

  • "machineaccount"

  • "serviceaccount"

env_type

string

Specifies which Ansible environment you’re running this module within.

This should not be set unless you know what you’re doing.

This only alters the User Agent string for any API requests.

filters

list / elements=string

A list of filter expression strings used to filter the resources returned by the API.

Each string is a filter expression (e.g. some_field = "SOME_VALUE").

Multiple expressions are combined with a logical AND.

Refer to the filter topic documentation https://cloud.google.com/sdk/gcloud/reference/topic/filters.

Refer to the AIP-160 filter syntax documentation https://google.aip.dev/160.

location

string / required

The location where the alloydb backup should reside.

project

string

The Google Cloud Platform project to use.

scopes

list / elements=string

Array of scopes to be used.

service_account_contents

jsonarg

The contents of a Service Account JSON file,

either in a dictionary or as a JSON string that represents it.

service_account_email

string

An optional service account email address if machineaccount is

selected and the user does not wish to use the default email.

service_account_file

path

The path of a Service Account JSON file if serviceaccount

is selected as type.

Notes

Note

Examples

- name: List all gcp_alloydb_backup_info resources
  google.cloud.gcp_alloydb_backup_info:
    project: "{{ gcp_project }}"
    auth_kind: "{{ gcp_cred_kind }}"
    service_account_file: "{{ gcp_cred_file }}"
  register: result

- name: List gcp_alloydb_backup_info resources matching given filters
  google.cloud.gcp_alloydb_backup_info:
    filters:
      - display_name = "my-resource"
    project: "{{ gcp_project }}"
    auth_kind: "{{ gcp_cred_kind }}"
    service_account_file: "{{ gcp_cred_file }}"
  register: result

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

changed

boolean

Whether any changes were made (always false for info modules).

Returned: always

resources

list / elements=dictionary

List of Alloydb.Backup resources matching the supplied filters. May be empty, contain a single resource, or multiple resources.

Returned: always

annotations

dictionary

Annotations to allow client tools to store small amount of arbitrary data.

This is distinct from labels.

https://google.aip.dev/128 An object containing a list of “key”: value pairs.

Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.

**Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.

Returned: when set

clusterName

string

The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).

Returned: always

clusterUid

string

Output only.

The system-generated UID of the cluster which was used to create this resource.

Returned: success

createTime

string

Output only.

Create time stamp.

A timestamp in RFC3339 UTC “Zulu” format, with nanosecond resolution and up to nine fractional digits.

Examples: “2014-10-02T15:01:23Z” and “2014-10-02T15:01:23.045123456Z”.

Returned: success

deleteTime

string

Output only.

Delete time stamp.

A timestamp in RFC3339 UTC “Zulu” format, with nanosecond resolution and up to nine fractional digits.

Examples: “2014-10-02T15:01:23Z” and “2014-10-02T15:01:23.045123456Z”.

Returned: success

description

string

User-provided description of the backup.

Returned: when set

displayName

string

User-settable and human-readable display name for the Backup.

Returned: when set

encryptionConfig

dictionary

EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).

Returned: when set

kmsKeyName

string

The fully-qualified resource name of the KMS key.

Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME].

Returned: when set

encryptionInfo

dictionary

EncryptionInfo describes the encryption information of a cluster or a backup.

Returned: success

encryptionType

string

Output only.

Type of encryption.

Returned: success

kmsKeyVersions

list / elements=string

Output only.

Cloud KMS key versions that are being used to protect the database or the backup.

Returned: success

etag

string

For Resource freshness validation (https://google.aip.dev/154).

Returned: success

expiryQuantity

dictionary

Output only.

The QuantityBasedExpiry of the backup, specified by the backup’s retention policy.

Once the expiry quantity is over retention, the backup is eligible to be garbage collected.

Returned: success

retentionCount

integer

Output only.

The backup’s position among its backups with the same source cluster and type, by descending chronological order create time (i.e.

newest first).

Returned: success

totalRetentionCount

integer

Output only.

The length of the quantity-based queue, specified by the backup’s retention policy.

Returned: success

expiryTime

string

Output only.

The time at which after the backup is eligible to be garbage collected.

It is the duration specified by the backup’s retention policy, added to the backup’s createTime.

Returned: success

labels

dictionary

User-defined labels for the alloydb backup.

An object containing a list of “key”: value pairs.

Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.

**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.

Returned: when set

name

string

Output only.

The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}.

Returned: success

reconciling

boolean

Output only.

Reconciling (https://google.aip.dev/128#reconciliation), if true, indicates that the service is actively updating the resource.

This can happen due to user-triggered updates or system actions like failover or maintenance.

Returned: success

sizeBytes

string

Output only.

The size of the backup in bytes.

Returned: success

state

string

Output only.

The current state of the backup.

Returned: success

type

string

The backup type, which suggests the trigger for the backup.

Returned: when set

uid

string

Output only.

The system-generated UID of the resource.

The UID is assigned when the resource is created, and it is retained until it is deleted.

Returned: success

updateTime

string

Output only.

Update time stamp.

A timestamp in RFC3339 UTC “Zulu” format, with nanosecond resolution and up to nine fractional digits.

Examples: “2014-10-02T15:01:23Z” and “2014-10-02T15:01:23.045123456Z”.

Returned: success

Authors

  • Google Inc. (@googlecloudplatform)