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 |
|---|---|
The access token used to authenticate. |
|
The type of credential used. Choices:
|
|
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. |
|
A list of filter expression strings used to filter the resources returned by the API. Each string is a filter expression (e.g. 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. |
|
The location where the alloydb backup should reside. |
|
The Google Cloud Platform project to use. |
|
Array of scopes to be used. |
|
The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
|
An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
|
The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
Note
API Reference: https://cloud.google.com/alloydb/docs/reference/rest/v1/projects.locations.backups/create
AlloyDB Guide: https://cloud.google.com/alloydb/docs/
For authentication, you can set auth_kind using the
GCP_AUTH_KINDenv variable.For authentication, you can set service_account_file using the
GCP_SERVICE_ACCOUNT_FILEenv variable.For authentication, you can set service_account_contents using the
GCP_SERVICE_ACCOUNT_CONTENTSenv variable.For authentication, you can set service_account_email using the
GCP_SERVICE_ACCOUNT_EMAILenv variable.For authentication, you can set access_token using the
GCP_ACCESS_TOKENenv variable.For authentication, you can set scopes using the
GCP_SCOPESenv variable.Environment variables values will only be used if the playbook values are not set.
The
service_account_email,service_account_file,service_account_fileandaccess_tokenoptions are mutually exclusive.
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 |
|---|---|
Whether any changes were made (always false for info modules). Returned: always |
|
List of Alloydb.Backup resources matching the supplied filters. May be empty, contain a single resource, or multiple resources. Returned: always |
|
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 |
|
The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}). Returned: always |
|
Output only. The system-generated UID of the cluster which was used to create this resource. Returned: success |
|
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 |
|
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 |
|
User-provided description of the backup. Returned: when set |
|
User-settable and human-readable display name for the Backup. Returned: when set |
|
EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key). Returned: when set |
|
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 describes the encryption information of a cluster or a backup. Returned: success |
|
Output only. Type of encryption. Returned: success |
|
Output only. Cloud KMS key versions that are being used to protect the database or the backup. Returned: success |
|
For Resource freshness validation (https://google.aip.dev/154). Returned: success |
|
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 |
|
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 |
|
Output only. The length of the quantity-based queue, specified by the backup’s retention policy. Returned: success |
|
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 |
|
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 |
|
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}. Returned: success |
|
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 |
|
Output only. The size of the backup in bytes. Returned: success |
|
Output only. The current state of the backup. Returned: success |
|
The backup type, which suggests the trigger for the backup. Returned: when set |
|
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 |
|
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 |