oracle.oci.oci_certificates_management_certificate_authority_facts – Fetches details about one or multiple CertificateAuthority resources in Oracle Cloud Infrastructure¶
Note
This plugin is part of the oracle.oci collection (version 5.0.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_authority_facts
.
New in version 2.9.0: of oracle.oci
Synopsis¶
Fetches details about one or multiple CertificateAuthority resources in Oracle Cloud Infrastructure
Lists all certificate authorities (CAs) in the specified compartment. Optionally, you can use the parameter FilterByCertificateAuthorityIdQueryParam to limit the results to a single item that matches the specified CA.
If certificate_authority_id is specified, the details of a single CertificateAuthority 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_authority_id
string
|
The OCID of the certificate authority (CA).
Required to get a specific certificate_authority.
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_authority
oci_certificates_management_certificate_authority_facts:
# required
certificate_authority_id: "ocid1.certificateauthority.oc1..xxxxxxEXAMPLExxxxxx"
- name: List certificate_authorities
oci_certificates_management_certificate_authority_facts:
# optional
compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
lifecycle_state: CREATING
name: name_example
issuer_certificate_authority_id: "ocid1.issuercertificateauthority.oc1..xxxxxxEXAMPLExxxxxx"
certificate_authority_id: "ocid1.certificateauthority.oc1..xxxxxxEXAMPLExxxxxx"
sort_by: NAME
sort_order: ASC
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |||
---|---|---|---|---|---|
certificate_authorities
complex
|
on success |
List of CertificateAuthority resources
Sample:
[{'certificate_authority_rules': [{'certificate_authority_max_validity_duration': 'certificate_authority_max_validity_duration_example', 'leaf_certificate_max_validity_duration': 'leaf_certificate_max_validity_duration_example', 'rule_type': 'CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE'}], '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'}}, 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'config_type': 'ROOT_CA_GENERATED_INTERNALLY', 'current_version': {'certificate_authority_id': 'ocid1.certificateauthority.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': [], '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_authority_id': 'ocid1.certificateauthority.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': [], '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', 'kms_key_id': 'ocid1.kmskey.oc1..xxxxxxEXAMPLExxxxxx', 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'CREATING', 'name': 'name_example', 'signing_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_authority_rules
complex
|
on success |
An optional list of rules that control how the CA is used and managed.
|
|||
certificate_authority_max_validity_duration
string
|
on success |
A property indicating the maximum validity duration, in days, of subordinate CA's issued by this CA. Expressed in ISO 8601 format.
Sample:
certificate_authority_max_validity_duration_example
|
|||
leaf_certificate_max_validity_duration
string
|
on success |
A property indicating the maximum validity duration, in days, of leaf certificates issued by this CA. Expressed in ISO 8601 format.
Sample:
leaf_certificate_max_validity_duration_example
|
|||
rule_type
string
|
on success |
The type of rule, whether a renewal rule regarding when to renew the CA or an issuance expiry rule that governs how long the certificates and CAs issued by the CA are valid. (For internal use only) An internal issuance rule defines the number and type of certificates that the CA can issue.
Sample:
CERTIFICATE_AUTHORITY_ISSUANCE_EXPIRY_RULE
|
|||
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
|
|||
compartment_id
string
|
on success |
The OCID of the compartment under which the CA is created.
Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
|
|||
config_type
string
|
on success |
The origin of the CA.
Sample:
ROOT_CA_GENERATED_INTERNALLY
|
|||
current_version
complex
|
on success |
Returned for get operation
|
|||
certificate_authority_id
string
|
on success |
The OCID of the CA.
Sample:
ocid1.certificateauthority.oc1..xxxxxxEXAMPLExxxxxx
|
|||
issuer_ca_version_number
integer
|
on success |
The version number of the issuing 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 CA version.
|
|||
time_created
string
|
on success |
A optional property indicating when the CA 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 CA 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 CA version. When this value is not null, the name is unique across CA versions for a given CA.
Sample:
version_name_example
|
|||
version_number
integer
|
on success |
The version number of the CA.
Sample:
56
|
|||
current_version_summary
complex
|
on success |
Returned for list operation
|
|||
certificate_authority_id
string
|
on success |
The OCID of the CA.
Sample:
ocid1.certificateauthority.oc1..xxxxxxEXAMPLExxxxxx
|
|||
issuer_ca_version_number
integer
|
on success |
The version number of the issuing 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 CA version.
|
|||
time_created
string
|
on success |
A optional property indicating when the CA 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 CA 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 CA version. When this value is not null, the name is unique across CA versions for a given CA.
Sample:
version_name_example
|
|||
version_number
integer
|
on success |
The version number of the CA.
Sample:
56
|
|||
defined_tags
dictionary
|
on success |
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{"foo-namespace": {"bar-key": "value"}}`
Sample:
{'Operations': {'CostCenter': 'US'}}
|
|||
description
string
|
on success |
A brief description of the CA.
Sample:
description_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 |
The OCID of the CA.
Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
|
|||
issuer_certificate_authority_id
string
|
on success |
The OCID of the parent CA that issued this CA. If this is the root CA, then this value is null.
Sample:
ocid1.issuercertificateauthority.oc1..xxxxxxEXAMPLExxxxxx
|
|||
kms_key_id
string
|
on success |
The OCID of the Oracle Cloud Infrastructure Vault key used to encrypt the CA.
Sample:
ocid1.kmskey.oc1..xxxxxxEXAMPLExxxxxx
|
|||
lifecycle_details
string
|
on success |
Additional information about the current CA lifecycle state.
Returned for get operation
Sample:
lifecycle_details_example
|
|||
lifecycle_state
string
|
on success |
The current lifecycle state of the certificate authority.
Sample:
CREATING
|
|||
name
string
|
on success |
A user-friendly name for the CA. Names are unique within a compartment. Avoid entering confidential information. Valid characters include uppercase or lowercase letters, numbers, hyphens, underscores, and periods.
Sample:
name_example
|
|||
signing_algorithm
string
|
on success |
The algorithm used to sign public key certificates that the CA issues.
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 CA 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 CA 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)