oci_waas_certificate_facts - Retrieve details about WAAS certificates.

New in version 2.5.

Synopsis

  • This module retrieves information of a specific WAAS certificate or lists all the WAAS certificates in the given compartment.

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.
certificate_id
str
The OCID of the SSL certificate used in the WAAS policy. Required to get information of a specific certificate.
compartment_id
str
The OCID of the compartment.
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
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.
display_name
list
Filter certificates using a list of display names.
id
list
Filter certificates using a list of certificates OCIDs.
lifecycle_state
list
    Choices:
  • CREATING
  • ACTIVE
  • FAILED
  • UPDATING
  • DELETING
  • DELETED
Filter certificates using a list of lifecycle states.
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.
sort_by
str
    Choices:
  • id
  • compartmentId
  • displayName
  • notValidAfter
  • timeCreated
The value by which certificate summaries are sorted in a paginated 'List' call. If unspecified, defaults to timeCreated.
sort_order
str
    Choices:
  • ASC
  • DESC
The order in which to sort the results.
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
time_created_greater_than_or_equal_to
str
A filter that matches certificates created on or after the specified date-time.
time_created_less_than
str
A filter that matches certificates created before the specified date-time.

Examples

- name: Get all the waas certificates in a compartment
  oci_waas_certificate_facts:
    compartment_id: ocid1.compartment.oc1..xxxxxEXAMPLExxxxx

- name: Get a specific waas certificate using its OCID
  oci_waas_certificate_facts:
    certificate_id: ocid1.waascertificate.oc1..xxxxxEXAMPLExxxxx

- name: Get waas certificate having the specified display name
  oci_waas_certificate_facts:
    compartment_id: ocid1.compartment.oc1..xxxxxEXAMPLExxxxx
    display_name: examplewaascertificate

- name: Get waas certificates in a compartment with given display names
  oci_waas_certificate_facts:
    compartment_id: ocid1.compartment.oc1..xxxxxEXAMPLExxxxx
    display_name:
        - examplewaascertificate1
        - examplewaascertificate2

- name: Filter waas certificates in a compartment using display_name, lifecycle_state and sort the results
  oci_waas_certificate_facts:
    compartment_id: ocid1.compartment.oc1..xxxxxEXAMPLExxxxx
    display_name:
        - examplewaascertificate1
        - examplewaascertificate2
    lifecycle_state:
        - ACTIVE
    sort_by: timeCreated
    sort_order: DESC

Return Values

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

Key Returned Description
waas_certificates
complex
on success
List of waas certificates

Sample:
[{'time_not_valid_before': '2019-04-10T08:09:17+00:00', 'subject_name': {'state_province': 'KA', 'organization': 'Ansible', 'organizational_unit': None, 'locality': 'Bangalore', 'common_name': 'testcommonname', 'country': 'IN', 'email_address': None}, 'time_not_valid_after': '2024-04-08T08:09:17+00:00', 'time_created': '2019-04-10T10:05:35.634000+00:00', 'issuer_name': {'state_province': 'KA', 'organization': 'Ansible', 'organizational_unit': None, 'locality': 'Bangalore', 'common_name': 'testcommonname', 'country': 'IN', 'email_address': None}, 'signature_algorithm': None, 'id': 'ocid1.waascertificate.oc1..xxxxxEXAMPLExxxxx', 'lifecycle_state': 'ACTIVE', 'display_name': 'test waas certificate', 'compartment_id': 'ocid1.compartment.oc1..xxxxxEXAMPLExxxxx', 'defined_tags': None, 'issued_by': 'Ansible', 'freeform_tags': None, 'version': None, 'extensions': None, 'public_key_info': {'key_size': 2048, 'exponent': 65537, 'algorithm': 'RSA'}, 'serial_number': '9917593779878295042'}]
  time_not_valid_before
str
success
The time_not_valid_before of this Certificate.

Sample:
2019-04-02 15:29:38
  subject_name
complex
success
The subject_name of this Certificate.

Sample:
{'state_province': 'teststate', 'organization': 'testorg', 'organizational_unit': 'testorgunit', 'locality': 'testlocality', 'common_name': 'testcommonname', 'country': 'AU', 'email_address': 'test.email@address.com'}
  time_not_valid_after
str
success
The date and time the certificate will expire, expressed in RFC 3339 timestamp format.

Sample:
2020-04-01 15:29:38
  time_created
str
success
The date and time the certificate was created, expressed in RFC 3339 timestamp format.

Sample:
2019-04-02 17:12:42.454000
  issuer_name
complex
success
The issuer_name of this Certificate.

Sample:
{'state_province': 'teststate', 'organization': 'testorg', 'organizational_unit': 'testorgunit', 'locality': 'testlocality', 'common_name': 'testcommonname', 'country': 'AU', 'email_address': 'test.email@address.com'}
  signature_algorithm
str
success
The signature_algorithm of this Certificate.

Sample:
SHA-1
  id
str
success
The OCID of the certificate.

Sample:
ocid1.waascertificate.oc1..xxxxxEXAMPLExxxxx
  lifecycle_state
str
success
The current lifecycle state of the SSL certificate.

Sample:
ACTIVE
  display_name
str
success
The user-friendly name of the certificate.

Sample:
testcertificate
  compartment_id
str
success
The OCID of the certificate's compartment.

Sample:
ocid1.compartment.oc1..xxxxxEXAMPLExxxxx
  defined_tags
str
success
A key-value pair with a defined schema that restricts the values of tags. These predefined keys are scoped to namespaces.

Sample:
{'example_namespace': {'example_key': 'example_value'}}
  issued_by
str
success
The issued_by of this Certificate.

Sample:
testissuer
  freeform_tags
complex
success
A simple key-value pair without any defined schema.

Sample:
{'example_freeform_key': 'example_freeform_value'}
  version
int
success
The version of this Certificate.

Sample:
2
  extensions
list
success
The extensions of this Certificate.

Sample:
[{'is_critical': None, 'name': 'subjectKeyIdentifier', 'value': 'A6:B2:56:1X:1X:1X:1X:8C:F6'}]
  public_key_info
complex
success
The public_key_info of this Certificate.

Sample:
{'key_size': 2048, 'exponent': 65537, 'algorithm': 'RSA'}
  serial_number
str
success
The serial_number of this Certificate.

Sample:
100000000000710


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

  • Manoj Meda (@manojmeda)

Hint

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