oracle.oci.oci_psql_db_system_facts – Fetches details about one or multiple DbSystem resources in Oracle Cloud Infrastructure¶
Note
This plugin is part of the oracle.oci collection (version 5.3.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 oracle.oci
.
To use it in a playbook, specify: oracle.oci.oci_psql_db_system_facts
.
New in version 2.9.0: of oracle.oci
Synopsis¶
Fetches details about one or multiple DbSystem resources in Oracle Cloud Infrastructure
Returns a list of database systems.
If db_system_id is specified, the details of a single DbSystem will be returned.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 3.6
Python SDK for Oracle Cloud Infrastructure https://oracle-cloud-infrastructure-python-sdk.readthedocs.io
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
api_user
string
|
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See
config_file_location ). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm. |
|
api_user_fingerprint
string
|
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See
config_file_location ). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm. |
|
api_user_key_file
string
|
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See
config_file_location ). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided. |
|
api_user_key_pass_phrase
string
|
Passphrase used by the key referenced in
api_user_key_file , if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location ). |
|
auth_purpose
string
|
|
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
|
auth_type
string
|
|
The type of authentication to use for making API requests. By default
auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance. |
cert_bundle
string
|
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
|
|
compartment_id
string
|
The ID of the compartment in which to list resources.
|
|
config_file_location
string
|
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
|
|
config_profile_name
string
|
The profile to load from the config file referenced by
config_file_location . If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location . |
|
db_system_id
string
|
A unique identifier for the database system.
Required to get a specific db_system.
aliases: id |
|
display_name
string
|
A filter to return only resources that match the entire display name given.
aliases: name |
|
excluded_fields
list
/ elements=string
|
|
A filter to exclude database configuration when this query parameter is set to OverrideDbConfig.
|
lifecycle_state
string
|
|
A filter to return only resources if their `lifecycleState` matches the given `lifecycleState`.
|
realm_specific_endpoint_template_enabled
boolean
|
|
Enable/Disable realm specific endpoint template for service client. By Default, realm specific endpoint template is disabled. If not set, then the value of the OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED variable, if any, is used.
|
region
string
|
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See
config_file_location ). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions. |
|
sort_by
string
|
|
The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending.
|
sort_order
string
|
|
The sort order to use, either 'ASC' or 'DESC'.
|
tenancy
string
|
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See
config_file_location ). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm |
Notes¶
Note
For OCI python sdk configuration, please refer to https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/configuration.html
Examples¶
- name: Get a specific db_system
oci_psql_db_system_facts:
# required
db_system_id: "ocid1.dbsystem.oc1..xxxxxxEXAMPLExxxxxx"
# optional
excluded_fields: [ "dbConfigurationParams" ]
- name: List db_systems
oci_psql_db_system_facts:
# optional
compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
lifecycle_state: CREATING
display_name: display_name_example
sort_order: ASC
sort_by: timeCreated
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |||
---|---|---|---|---|---|
db_systems
complex
|
on success |
List of DbSystem resources
Sample:
[{'admin_username': 'admin_username_example', 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'config_id': 'ocid1.config.oc1..xxxxxxEXAMPLExxxxxx', 'db_version': 'db_version_example', 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'description': 'description_example', 'display_name': 'display_name_example', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'instance_count': 56, 'instance_memory_size_in_gbs': 56, 'instance_ocpu_count': 56, 'instances': [{'availability_domain': 'Uocm:PHX-AD-1', 'description': 'description_example', 'display_name': 'display_name_example', 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'CREATING', 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00'}], 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'CREATING', 'management_policy': {'backup_policy': {'backup_start': 'backup_start_example', 'days_of_the_month': [], 'days_of_the_week': [], 'kind': 'DAILY', 'retention_days': 56}, 'maintenance_window_start': 'maintenance_window_start_example'}, 'network_details': {'nsg_ids': [], 'primary_db_endpoint_private_ip': 'primary_db_endpoint_private_ip_example', 'subnet_id': 'ocid1.subnet.oc1..xxxxxxEXAMPLExxxxxx'}, 'shape': 'shape_example', 'source': {'backup_id': 'ocid1.backup.oc1..xxxxxxEXAMPLExxxxxx', 'is_having_restore_config_overrides': True, 'source_type': 'BACKUP'}, 'storage_details': {'availability_domain': 'Uocm:PHX-AD-1', 'iops': 56, 'is_regionally_durable': True, 'system_type': 'OCI_OPTIMIZED_STORAGE'}, 'system_tags': {}, 'system_type': 'OCI_OPTIMIZED_STORAGE', 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00'}]
|
|||
admin_username
string
|
on success |
The database system administrator username.
Returned for get operation
Sample:
admin_username_example
|
|||
compartment_id
string
|
on success |
The OCID of the compartment that contains the database system.
Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
|
|||
config_id
string
|
on success |
The OCID of the configuration associated with the database system.
Sample:
ocid1.config.oc1..xxxxxxEXAMPLExxxxxx
|
|||
db_version
string
|
on success |
The major and minor versions of the database system software.
Sample:
db_version_example
|
|||
defined_tags
dictionary
|
on success |
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace": {"bar-key": "value"}}`
Sample:
{'Operations': {'CostCenter': 'US'}}
|
|||
description
string
|
on success |
A description of the database system.
Returned for get operation
Sample:
description_example
|
|||
display_name
string
|
on success |
A user-friendly display name for the database system. Avoid entering confidential information.
Sample:
display_name_example
|
|||
freeform_tags
dictionary
|
on success |
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
Sample:
{'Department': 'Finance'}
|
|||
id
string
|
on success |
A unique identifier for the database system. Immutable on creation.
Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
|
|||
instance_count
integer
|
on success |
Count of instances, or nodes, in the database system.
Sample:
56
|
|||
instance_memory_size_in_gbs
integer
|
on success |
The total amount of memory available to each database instance node, in gigabytes.
Sample:
56
|
|||
instance_ocpu_count
integer
|
on success |
The total number of OCPUs available to each database instance node.
Sample:
56
|
|||
instances
complex
|
on success |
The list of instances, or nodes, in the database system.
Returned for get operation
|
|||
availability_domain
string
|
on success |
The availability domain in which the database instance node is located.
Sample:
Uocm:PHX-AD-1
|
|||
description
string
|
on success |
Description of the database instance node.
Sample:
description_example
|
|||
display_name
string
|
on success |
A user-friendly display name for the database instance node. Avoid entering confidential information.
Sample:
display_name_example
|
|||
id
string
|
on success |
A unique identifier for the database instance node. Immutable on creation.
Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
|
|||
lifecycle_details
string
|
on success |
A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
Sample:
lifecycle_details_example
|
|||
lifecycle_state
string
|
on success |
The current state of the database instance node.
Sample:
CREATING
|
|||
time_created
string
|
on success |
The date and time that the database instance node was created, expressed in RFC 3339 timestamp format.
Example: `2016-08-25T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
time_updated
string
|
on success |
The date and time that the database instance node was updated, expressed in RFC 3339 timestamp format.
Example: `2016-08-25T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
lifecycle_details
string
|
on success |
A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
Sample:
lifecycle_details_example
|
|||
lifecycle_state
string
|
on success |
The current state of the database system.
Sample:
CREATING
|
|||
management_policy
complex
|
on success |
Returned for get operation
|
|||
backup_policy
complex
|
on success |
|
|||
backup_start
string
|
on success |
Hour of the day when the backup starts.
Sample:
backup_start_example
|
|||
days_of_the_month
list
/ elements=string
|
on success |
Day of the month when the backup should start. To ensure that the backup runs monthly, the latest day of the month that you can use to schedule a backup is the the 28th day.
|
|||
days_of_the_week
list
/ elements=string
|
on success |
The day of the week that the backup starts.
|
|||
kind
string
|
on success |
The kind of backup policy.
Sample:
DAILY
|
|||
retention_days
integer
|
on success |
How many days the data should be stored after the database system deletion.
Sample:
56
|
|||
maintenance_window_start
string
|
on success |
The start of the maintenance window.
Sample:
maintenance_window_start_example
|
|||
network_details
complex
|
on success |
Returned for get operation
|
|||
nsg_ids
list
/ elements=string
|
on success |
List of customer Network Security Group OCIDs associated with the database system.
|
|||
primary_db_endpoint_private_ip
string
|
on success |
Private IP in customer subnet. The value is optional. If the IP is not provided, the IP will be chosen from the available IP addresses from the specified subnet.
Sample:
primary_db_endpoint_private_ip_example
|
|||
subnet_id
string
|
on success |
The OCID of the customer subnet associated with the database system.
Sample:
ocid1.subnet.oc1..xxxxxxEXAMPLExxxxxx
|
|||
shape
string
|
on success |
The name of the shape for the database instance. Example: `VM.Standard.E4.Flex`
Sample:
shape_example
|
|||
source
complex
|
on success |
Returned for get operation
|
|||
backup_id
string
|
on success |
The OCID of the database system backup.
Sample:
ocid1.backup.oc1..xxxxxxEXAMPLExxxxxx
|
|||
is_having_restore_config_overrides
boolean
|
on success |
Deprecated. Don't use.
Sample:
True
|
|||
source_type
string
|
on success |
The source descriminator.
Sample:
BACKUP
|
|||
storage_details
complex
|
on success |
Returned for get operation
|
|||
availability_domain
string
|
on success |
Specifies the availability domain of AD-local storage. If `isRegionallyDurable` is set to true, `availabilityDomain` should not be specified. If `isRegionallyDurable` is set to false, `availabilityDomain` must be specified.
Sample:
Uocm:PHX-AD-1
|
|||
iops
integer
|
on success |
Guaranteed input/output storage requests per second (IOPS) available to the database system.
Sample:
56
|
|||
is_regionally_durable
boolean
|
on success |
Specifies if the block volume used for the database system is regional or AD-local. If not specified, it will be set to false. If `isRegionallyDurable` is set to true, `availabilityDomain` should not be specified. If `isRegionallyDurable` is set to false, `availabilityDomain` must be specified.
Sample:
True
|
|||
system_type
string
|
on success |
Type of the database system.
Sample:
OCI_OPTIMIZED_STORAGE
|
|||
system_tags
dictionary
|
on success |
System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`
|
|||
system_type
string
|
on success |
Type of the database system.
Sample:
OCI_OPTIMIZED_STORAGE
|
|||
time_created
string
|
on success |
The date and time that the database system was created, expressed in RFC 3339 timestamp format.
Example: `2016-08-25T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
time_updated
string
|
on success |
The date and time that the database system was updated, expressed in RFC 3339 timestamp format.
Example: `2016-08-25T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
Authors¶
Oracle (@oracle)