oci_db_system_facts - Fetches details of the OCI DB System

New in version 2.5.

Synopsis

  • Fetches details of the OCI DB System.

Requirements

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

Parameters

Parameter Choices/Defaults Comments
api_user
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_OCID 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
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
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
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_type
    Choices:
  • api_key ←
  • instance_principal
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.
compartment_id
Identifier of the compartment in which this DB System exists
config_file_location
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 Default:
DEFAULT
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
Identifier of the DB System whose details needs to be fetched.

aliases: id
display_name
Use display_name along with the other options to return only resources that match the given display name exactly.
region
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.
tenancy
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

Examples

#Fetch DB System
- name: List all DB System in a compartment
  oci_db_system_facts:
      compartment_id: 'ocid1.compartment..xcds'

#Fetch specific DB System
- name: List a specific DB System
  oci_db_system_facts:
      db_system_id: 'ocid1.dbsystem..xcds'

Return Values

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

Key Returned Description
db_system
complex
success
Attributes of the Fetched DB System.

Sample:
[{'domain': 'ansiblevcn955.ansiblevcn955.oraclevcn.com', 'backup_subnet_id': None, 'reco_storage_size_in_gb': None, 'database_edition': 'STANDARD_EDITION', 'time_created': '2018-02-10T19:21:44.171000+00:00', 'shape': 'BM.DenseIO1.36', 'disk_redundancy': 'NORMAL', 'last_patch_history_entry_id': None, 'license_model': 'LICENSE_INCLUDED', 'lifecycle_details': None, 'data_storage_size_in_gbs': None, 'id': 'ocid1.dbsystem.oc1.iad.xxxxxEXAMPLExxxxx', 'listener_port': 1521, 'lifecycle_state': 'PROVISIONING', 'availability_domain': 'IwGV:US-ASHBURN-AD-2', 'display_name': 'ansible-db-system-955', 'data_storage_percentage': 80, 'compartment_id': 'ocid1.compartment.oc1..xxxxxEXAMPLExxxxx', 'subnet_id': 'ocid1.subnet.oc1.iad.xxxxxEXAMPLExxxxx', 'defined_tags': {'target_users': {'division': 'accounts'}}, 'hostname': 'db-system-955', 'freeform_tags': {'deployment': 'production'}, 'ssh_public_keys': ['ssh-rsa AAA'], 'vip_ids': None, 'cluster_name': 'db-clus-955', 'scan_ip_ids': None, 'version': None, 'cpu_core_count': 2, 'scan_dns_record_id': None, 'node_count': None}]
  domain
string
always
The domain name for the DB System.

Sample:
ansiblevcn955.ansiblevcn955.oraclevcn.com
  data_storage_percentage
string
always
The percentage assigned to DATA storage

Sample:
80
  reco_storage_size_in_gb
string
always
RECO/REDO storage size, in GBs, that is currently allocated to the DB system. This is applicable only for VM-based DBs.

Sample:
1024
  database_edition
string
always
The Oracle Database Edition that applies to all the databases on the DB System.

Sample:
STANDARD_EDITION
  time_created
datetime
always
Date and time when the DB System was created, in the format defined by RFC3339

Sample:
2016-08-25 21:10:29.600000
  shape
string
always
The shape of the DB System

Sample:
BM.DenseIO1.36
  disk_redundancy
string
always
The type of redundancy configured for the DB System.

Sample:
NORMAL
  last_patch_history_entry_id
string
always
The OCID of the last patch history. This is updated as soon as a patch operation is started.

Sample:
ocid1.lastpatchhistory.aaaa
  license_model
string
always
The Oracle license model that applies to all the databases on the DB System

Sample:
LICENSE_INCLUDED
  lifecycle_details
string
always
Additional information about the current lifecycle state.

Sample:
details
  data_storage_size_in_gbs
string
always
Data storage size, in GBs, that is currently available to the DB system. This is applicable only for VM-based DBs.

Sample:
2048
  id
string
always
The identifier of the DB System

Sample:
ocid1.dbsystem.oc1.xzvf..oifds
  listener_port
string
always
The port number configured for the listener on the DB System.

Sample:
1521
  lifecycle_state
string
always
The current state of the DB System.

Sample:
AVAILABLE
  availability_domain
string
always
The Availability Domain where the DB System is located.

Sample:
IwGV:US-ASHBURN-AD-2
  display_name
string
always
The user-friendly name for the DB System.

Sample:
ansible-db-system
  compartment_id
string
always
The identifier of the compartment containing the DB System

Sample:
ocid1.compartment.oc1.xzvf..oifds
  subnet_id
string
always
The OCID of the subnet the DB System is associated with.

Sample:
ocid1.subnet.aaaa
  scan_dns_record_id
string
always
The OCID of the DNS record for the SCAN IP addresses that are associated with the DB System.

Sample:
ocid.dnsrecord.aaaa
  hostname
string
always
The user-friendly name for the DB System.

Sample:
db-system
  ssh_public_keys
string
always
The public key portion of one or more key pairs used for SSH access to the DB System.

Sample:
['ssh-rsa 3NzaC1y']
  vip_ids
string
always
The OCID of the virtual IP (VIP) addresses associated with the DB System.

Sample:
['159.28.0.1']
  cluster_name
string
always
Cluster name for Exadata and 2-node RAC DB Systems

Sample:
db-cluster
  scan_ip_ids
string
always
The OCID of the Single Client Access Name (SCAN) IP addresses associated with the DB System. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Clusterware directs the requests to the appropriate nodes in the cluster. For a single-node DB System, this list is empty.

Sample:
ocid1.scanip.aaaa
  version
string
always
The version of the DB System.

Sample:
12.2.0.1
  cpu_core_count
string
always
The number of CPU cores to enable.

Sample:
2
  node_count
string
always
Number of nodes in this DB system. For RAC DBs, this will be greater than 1.

Sample:
2


Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Author

  • Debayan Gupta(@debayan_gupta)

Hint

If you notice any issues in this documentation you can edit this document to improve it.