oracle.oci.oci_certificates_management_certificate_facts – Fetches details about one or multiple Certificate resources in Oracle Cloud Infrastructure¶
Note
This plugin is part of the oracle.oci collection (version 5.2.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_certificates_management_certificate_facts
.
New in version 2.9.0: of oracle.oci
Synopsis¶
Fetches details about one or multiple Certificate resources in Oracle Cloud Infrastructure
Lists all certificates that match the query parameters. Optionally, you can use the parameter FilterByCertificateIdQueryParam to limit the result set to a single item that matches the specified certificate.
If certificate_id is specified, the details of a single Certificate 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.
|
|
certificate_id
string
|
The OCID of the certificate.
Required to get a specific certificate.
aliases: id |
|
compartment_id
string
|
A filter that returns only resources that match the given compartment OCID.
|
|
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 . |
|
issuer_certificate_authority_id
string
|
The OCID of the certificate authority (CA). If the parameter is set to null, the service lists all CAs.
|
|
lifecycle_state
string
|
|
A filter that returns only resources that match the given lifecycle state. The state value is case-insensitive.
|
name
string
|
A filter that returns only resources that match the specified name.
|
|
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. You can specify only one sort order. The default order for `EXPIRATIONDATE` and 'TIMECREATED' is descending. The default order for `NAME` is ascending.
|
sort_order
string
|
|
The sort order to use, either ascending (`ASC`) or descending (`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 certificate
oci_certificates_management_certificate_facts:
# required
certificate_id: "ocid1.certificate.oc1..xxxxxxEXAMPLExxxxxx"
- name: List certificates
oci_certificates_management_certificate_facts:
# optional
compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
lifecycle_state: CREATING
name: name_example
sort_by: NAME
sort_order: ASC
issuer_certificate_authority_id: "ocid1.issuercertificateauthority.oc1..xxxxxxEXAMPLExxxxxx"
certificate_id: "ocid1.certificate.oc1..xxxxxxEXAMPLExxxxxx"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |||
---|---|---|---|---|---|
certificates
complex
|
on success |
List of Certificate resources
Sample:
[{'certificate_profile_type': 'TLS_SERVER_OR_CLIENT', 'certificate_revocation_list_details': {'custom_formatted_urls': [], 'object_storage_config': {'object_storage_bucket_name': 'object_storage_bucket_name_example', 'object_storage_namespace': 'object_storage_namespace_example', 'object_storage_object_name_format': 'object_storage_object_name_format_example'}}, 'certificate_rules': [{'advance_renewal_period': 'advance_renewal_period_example', 'renewal_interval': 'renewal_interval_example', 'rule_type': 'CERTIFICATE_RENEWAL_RULE'}], 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'config_type': 'ISSUED_BY_INTERNAL_CA', 'current_version': {'certificate_id': 'ocid1.certificate.oc1..xxxxxxEXAMPLExxxxxx', 'issuer_ca_version_number': 56, 'revocation_status': {'revocation_reason': 'UNSPECIFIED', 'time_of_revocation': '2013-10-20T19:20:30+01:00'}, 'serial_number': 'serial_number_example', 'stages': [], 'subject_alternative_names': [{'type': 'DNS', 'value': 'value_example'}], 'time_created': '2013-10-20T19:20:30+01:00', 'time_of_deletion': '2013-10-20T19:20:30+01:00', 'validity': {'time_of_validity_not_after': '2013-10-20T19:20:30+01:00', 'time_of_validity_not_before': '2013-10-20T19:20:30+01:00'}, 'version_name': 'version_name_example', 'version_number': 56}, 'current_version_summary': {'certificate_id': 'ocid1.certificate.oc1..xxxxxxEXAMPLExxxxxx', 'issuer_ca_version_number': 56, 'revocation_status': {'revocation_reason': 'UNSPECIFIED', 'time_of_revocation': '2013-10-20T19:20:30+01:00'}, 'serial_number': 'serial_number_example', 'stages': [], 'subject_alternative_names': [{'type': 'DNS', 'value': 'value_example'}], 'time_created': '2013-10-20T19:20:30+01:00', 'time_of_deletion': '2013-10-20T19:20:30+01:00', 'validity': {'time_of_validity_not_after': '2013-10-20T19:20:30+01:00', 'time_of_validity_not_before': '2013-10-20T19:20:30+01:00'}, 'version_name': 'version_name_example', 'version_number': 56}, 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'description': 'description_example', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'issuer_certificate_authority_id': 'ocid1.issuercertificateauthority.oc1..xxxxxxEXAMPLExxxxxx', 'key_algorithm': 'RSA2048', 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'CREATING', 'name': 'name_example', 'signature_algorithm': 'SHA256_WITH_RSA', 'subject': {'common_name': 'common_name_example', 'country': 'country_example', 'distinguished_name_qualifier': 'distinguished_name_qualifier_example', 'domain_component': 'domain_component_example', 'generation_qualifier': 'generation_qualifier_example', 'given_name': 'given_name_example', 'initials': 'initials_example', 'locality_name': 'locality_name_example', 'organization': 'organization_example', 'organizational_unit': 'organizational_unit_example', 'pseudonym': 'pseudonym_example', 'serial_number': 'serial_number_example', 'state_or_province_name': 'state_or_province_name_example', 'street': 'street_example', 'surname': 'surname_example', 'title': 'title_example', 'user_id': 'ocid1.user.oc1..xxxxxxEXAMPLExxxxxx'}, 'time_created': '2013-10-20T19:20:30+01:00', 'time_of_deletion': '2013-10-20T19:20:30+01:00'}]
|
|||
certificate_profile_type
string
|
on success |
The name of the profile used to create the certificate, which depends on the type of certificate you need.
Sample:
TLS_SERVER_OR_CLIENT
|
|||
certificate_revocation_list_details
complex
|
on success |
Returned for get operation
|
|||
custom_formatted_urls
list
/ elements=string
|
on success |
Optional CRL access points, expressed using a format where the version number of the issuing CA is inserted wherever you include a pair of curly braces. This versioning scheme helps avoid collisions when new CA versions are created. For example, myCrlFileIssuedFromCAVersion{}.crl becomes myCrlFileIssuedFromCAVersion2.crl for CA version 2.
|
|||
object_storage_config
complex
|
on success |
|
|||
object_storage_bucket_name
string
|
on success |
The name of the bucket where the CRL is stored.
Sample:
object_storage_bucket_name_example
|
|||
object_storage_namespace
string
|
on success |
The tenancy of the bucket where the CRL is stored.
Sample:
object_storage_namespace_example
|
|||
object_storage_object_name_format
string
|
on success |
The object name in the bucket where the CRL is stored, expressed using a format where the version number of the issuing CA is inserted as part of the Object Storage object name wherever you include a pair of curly braces. This versioning scheme helps avoid collisions when new CA versions are created. For example, myCrlFileIssuedFromCAVersion{}.crl becomes myCrlFileIssuedFromCAVersion2.crl for CA version 2.
Sample:
object_storage_object_name_format_example
|
|||
certificate_rules
complex
|
on success |
A list of rules that control how the certificate is used and managed.
|
|||
advance_renewal_period
string
|
on success |
A property specifying the period of time, in days, before the certificate's targeted renewal that the process should occur. Expressed in ISO 8601 format.
Sample:
advance_renewal_period_example
|
|||
renewal_interval
string
|
on success |
A property specifying how often, in days, a certificate should be renewed. Expressed in ISO 8601 format.
Sample:
renewal_interval_example
|
|||
rule_type
string
|
on success |
The type of rule.
Sample:
CERTIFICATE_RENEWAL_RULE
|
|||
compartment_id
string
|
on success |
The OCID of the compartment where you want to create the certificate.
Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
|
|||
config_type
string
|
on success |
The origin of the certificate.
Sample:
ISSUED_BY_INTERNAL_CA
|
|||
current_version
complex
|
on success |
Returned for get operation
|
|||
certificate_id
string
|
on success |
The OCID of the certificate.
Sample:
ocid1.certificate.oc1..xxxxxxEXAMPLExxxxxx
|
|||
issuer_ca_version_number
integer
|
on success |
The version number of the issuing certificate authority (CA).
Sample:
56
|
|||
revocation_status
complex
|
on success |
|
|||
revocation_reason
string
|
on success |
The reason the certificate or certificate authority (CA) was revoked.
Sample:
UNSPECIFIED
|
|||
time_of_revocation
string
|
on success |
The time when the entity was revoked, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
serial_number
string
|
on success |
A unique certificate identifier used in certificate revocation tracking, formatted as octets. Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF`
Sample:
serial_number_example
|
|||
stages
list
/ elements=string
|
on success |
A list of rotation states for this certificate version.
|
|||
subject_alternative_names
complex
|
on success |
A list of subject alternative names.
|
|||
type
string
|
on success |
The subject alternative name type. Currently only DNS domain or host names and IP addresses are supported.
Sample:
DNS
|
|||
value
string
|
on success |
The subject alternative name.
Sample:
value_example
|
|||
time_created
string
|
on success |
A optional property indicating the time when the certificate version was created, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
time_of_deletion
string
|
on success |
An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
validity
complex
|
on success |
|
|||
time_of_validity_not_after
string
|
on success |
The date on which the certificate validity period ends, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
time_of_validity_not_before
string
|
on success |
The date on which the certificate validity period begins, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
version_name
string
|
on success |
The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate.
Sample:
version_name_example
|
|||
version_number
integer
|
on success |
The version number of the certificate.
Sample:
56
|
|||
current_version_summary
complex
|
on success |
Returned for list operation
|
|||
certificate_id
string
|
on success |
The OCID of the certificate.
Sample:
ocid1.certificate.oc1..xxxxxxEXAMPLExxxxxx
|
|||
issuer_ca_version_number
integer
|
on success |
The version number of the issuing certificate authority (CA).
Sample:
56
|
|||
revocation_status
complex
|
on success |
|
|||
revocation_reason
string
|
on success |
The reason the certificate or certificate authority (CA) was revoked.
Sample:
UNSPECIFIED
|
|||
time_of_revocation
string
|
on success |
The time when the entity was revoked, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
serial_number
string
|
on success |
A unique certificate identifier used in certificate revocation tracking, formatted as octets. Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF`
Sample:
serial_number_example
|
|||
stages
list
/ elements=string
|
on success |
A list of rotation states for this certificate version.
|
|||
subject_alternative_names
complex
|
on success |
A list of subject alternative names.
|
|||
type
string
|
on success |
The subject alternative name type. Currently only DNS domain or host names and IP addresses are supported.
Sample:
DNS
|
|||
value
string
|
on success |
The subject alternative name.
Sample:
value_example
|
|||
time_created
string
|
on success |
A optional property indicating the time when the certificate version was created, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
time_of_deletion
string
|
on success |
An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
validity
complex
|
on success |
|
|||
time_of_validity_not_after
string
|
on success |
The date on which the certificate validity period ends, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
time_of_validity_not_before
string
|
on success |
The date on which the certificate validity period begins, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
version_name
string
|
on success |
The name of the certificate version. When the value is not null, a name is unique across versions of a given certificate.
Sample:
version_name_example
|
|||
version_number
integer
|
on success |
The version number of the certificate.
Sample:
56
|
|||
defined_tags
dictionary
|
on success |
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"Operations": {"CostCenter": "42"}}`
Sample:
{'Operations': {'CostCenter': 'US'}}
|
|||
description
string
|
on success |
A brief description of the certificate. Avoid entering confidential information.
Sample:
description_example
|
|||
freeform_tags
dictionary
|
on success |
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: `{"Department": "Finance"}`
Sample:
{'Department': 'Finance'}
|
|||
id
string
|
on success |
The OCID of the certificate.
Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
|
|||
issuer_certificate_authority_id
string
|
on success |
The OCID of the certificate authority (CA) that issued the certificate.
Sample:
ocid1.issuercertificateauthority.oc1..xxxxxxEXAMPLExxxxxx
|
|||
key_algorithm
string
|
on success |
The algorithm used to create key pairs.
Sample:
RSA2048
|
|||
lifecycle_details
string
|
on success |
Additional information about the current lifecycle state of the certificate.
Returned for get operation
Sample:
lifecycle_details_example
|
|||
lifecycle_state
string
|
on success |
The current lifecycle state of the certificate.
Sample:
CREATING
|
|||
name
string
|
on success |
A user-friendly name for the certificate. Names are unique within a compartment. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods.
Sample:
name_example
|
|||
signature_algorithm
string
|
on success |
The algorithm used to sign the public key certificate.
Sample:
SHA256_WITH_RSA
|
|||
subject
complex
|
on success |
|
|||
common_name
string
|
on success |
Common name or fully-qualified domain name (RDN CN).
Sample:
common_name_example
|
|||
country
string
|
on success |
Country name (RDN C).
Sample:
country_example
|
|||
distinguished_name_qualifier
string
|
on success |
Distinguished name qualifier(RDN DNQ).
Sample:
distinguished_name_qualifier_example
|
|||
domain_component
string
|
on success |
Domain component (RDN DC).
Sample:
domain_component_example
|
|||
generation_qualifier
string
|
on success |
Personal generational qualifier (for example, Sr., Jr. 3rd, or IV).
Sample:
generation_qualifier_example
|
|||
given_name
string
|
on success |
Personal given name (RDN G or GN).
Sample:
given_name_example
|
|||
initials
string
|
on success |
Personal initials.
Sample:
initials_example
|
|||
locality_name
string
|
on success |
Locality (RDN L).
Sample:
locality_name_example
|
|||
organization
string
|
on success |
Organization (RDN O).
Sample:
organization_example
|
|||
organizational_unit
string
|
on success |
Organizational unit (RDN OU).
Sample:
organizational_unit_example
|
|||
pseudonym
string
|
on success |
Subject pseudonym.
Sample:
pseudonym_example
|
|||
serial_number
string
|
on success |
Unique subject identifier, which is not the same as the certificate serial number (RDN SERIALNUMBER).
Sample:
serial_number_example
|
|||
state_or_province_name
string
|
on success |
State or province name (RDN ST or S).
Sample:
state_or_province_name_example
|
|||
street
string
|
on success |
Street address (RDN STREET).
Sample:
street_example
|
|||
surname
string
|
on success |
Personal surname (RDN SN).
Sample:
surname_example
|
|||
title
string
|
on success |
Title (RDN T or TITLE).
Sample:
title_example
|
|||
user_id
string
|
on success |
User ID (RDN UID).
Sample:
ocid1.user.oc1..xxxxxxEXAMPLExxxxxx
|
|||
time_created
string
|
on success |
A property indicating when the certificate was created, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
|||
time_of_deletion
string
|
on success |
An optional property indicating when to delete the certificate version, expressed in RFC 3339 timestamp format. Example: `2019-04-03T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
Authors¶
Oracle (@oracle)