oracle.oci.oci_sch_service_connector_facts – Fetches details about one or multiple ServiceConnector resources in Oracle Cloud Infrastructure¶
Note
This plugin is part of the oracle.oci collection (version 5.1.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_sch_service_connector_facts
.
New in version 2.9.0: of oracle.oci
Synopsis¶
Fetches details about one or multiple ServiceConnector resources in Oracle Cloud Infrastructure
Lists service connectors in the specified compartment.
If service_connector_id is specified, the details of a single ServiceConnector 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 OCID of the compartment for this request.
Required to list multiple service_connectors.
|
|
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 . |
|
display_name
string
|
A filter to return only resources that match the given display name exactly.
Example: `example_service_connector`
aliases: name |
|
lifecycle_state
string
|
|
A filter to return only resources that match the given lifecycle state.
Example: `ACTIVE`
|
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. |
|
service_connector_id
string
|
The OCID of the service connector.
Required to get a specific service_connector.
aliases: id |
|
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. If no value is specified `timeCreated` is default.
|
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 service_connector
oci_sch_service_connector_facts:
# required
service_connector_id: "ocid1.serviceconnector.oc1..xxxxxxEXAMPLExxxxxx"
- name: List service_connectors
oci_sch_service_connector_facts:
# required
compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
# optional
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 | ||||||
---|---|---|---|---|---|---|---|---|
service_connectors
complex
|
on success |
List of ServiceConnector resources
Sample:
[{'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'description': 'description_example', 'display_name': 'display_name_example', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'CREATING', 'lifecyle_details': 'lifecyle_details_example', 'source': {'cursor': {'kind': 'LATEST'}, 'kind': 'logging', 'log_sources': [{'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'log_group_id': 'ocid1.loggroup.oc1..xxxxxxEXAMPLExxxxxx', 'log_id': 'ocid1.log.oc1..xxxxxxEXAMPLExxxxxx'}], 'monitoring_sources': [{'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'namespace_details': {'kind': 'selected', 'namespaces': [{'metrics': {'kind': 'all'}, 'namespace': 'namespace_example'}]}}], 'stream_id': 'ocid1.stream.oc1..xxxxxxEXAMPLExxxxxx'}, 'system_tags': {}, 'target': {'batch_rollover_size_in_mbs': 56, 'batch_rollover_time_in_ms': 56, 'bucket_name': 'bucket_name_example', 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'dimensions': [{'dimension_value': {'kind': 'jmesPath', 'path': 'path_example', 'value': 'value_example'}, 'name': 'name_example'}], 'enable_formatted_messaging': True, 'function_id': 'ocid1.function.oc1..xxxxxxEXAMPLExxxxxx', 'kind': 'functions', 'log_group_id': 'ocid1.loggroup.oc1..xxxxxxEXAMPLExxxxxx', 'log_source_identifier': 'log_source_identifier_example', 'metric': 'metric_example', 'metric_namespace': 'metric_namespace_example', 'namespace': 'namespace_example', 'object_name_prefix': 'object_name_prefix_example', 'stream_id': 'ocid1.stream.oc1..xxxxxxEXAMPLExxxxxx', 'topic_id': 'ocid1.topic.oc1..xxxxxxEXAMPLExxxxxx'}, 'tasks': [{'batch_size_in_kbs': 56, 'batch_time_in_sec': 56, 'condition': 'condition_example', 'function_id': 'ocid1.function.oc1..xxxxxxEXAMPLExxxxxx', 'kind': 'function'}], 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00'}]
|
||||||
compartment_id
string
|
on success |
The OCID of the compartment containing the service connector.
Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
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 |
The description of the resource. Avoid entering confidential information.
Sample:
description_example
|
||||||
display_name
string
|
on success |
A user-friendly name. It does not have to be unique, and it is changeable. 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 |
The OCID of the service connector.
Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
lifecycle_details
string
|
on success |
A message describing the current state in more detail. For example, the message might provide actionable information for a resource in a `FAILED` state.
Returned for list operation
Sample:
lifecycle_details_example
|
||||||
lifecycle_state
string
|
on success |
The current state of the service connector.
Sample:
CREATING
|
||||||
lifecyle_details
string
|
on success |
A message describing the current state in more detail. For example, the message might provide actionable information for a resource in a `FAILED` state.
Returned for get operation
Sample:
lifecyle_details_example
|
||||||
source
complex
|
on success |
Returned for get operation
|
||||||
cursor
complex
|
on success |
|
||||||
kind
string
|
on success |
The type descriminator.
Sample:
LATEST
|
||||||
kind
string
|
on success |
The type descriminator.
Sample:
logging
|
||||||
log_sources
complex
|
on success |
The logs for this Logging source.
|
||||||
compartment_id
string
|
on success |
The OCID of the compartment containing the log source.
Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
log_group_id
string
|
on success |
The OCID of the log group.
Sample:
ocid1.loggroup.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
log_id
string
|
on success |
The OCID of the log.
Sample:
ocid1.log.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
monitoring_sources
complex
|
on success |
The list of metric namespaces to retrieve data from.
|
||||||
compartment_id
string
|
on success |
The OCID of the compartment containing the metric namespaces you want to use for the Monitoring source.
Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
namespace_details
complex
|
on success |
|
||||||
kind
string
|
on success |
The type discriminator.
Sample:
selected
|
||||||
namespaces
complex
|
on success |
The namespaces for the compartment-specific list.
|
||||||
metrics
complex
|
on success |
|
||||||
kind
string
|
on success |
The type descriminator.
Sample:
all
|
||||||
namespace
string
|
on success |
The source service or application to use when querying for metric data points. Must begin with `oci_`.
Example: `oci_computeagent`
Sample:
namespace_example
|
||||||
stream_id
string
|
on success |
The OCID of the stream.
Sample:
ocid1.stream.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
system_tags
dictionary
|
on success |
The system tags associated with this resource, if any. The system tags are set by Oracle Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: `{orcl-cloud: {free-tier-retain: true}}`
|
||||||
target
complex
|
on success |
Returned for get operation
|
||||||
batch_rollover_size_in_mbs
integer
|
on success |
The batch rollover size in megabytes.
Sample:
56
|
||||||
batch_rollover_time_in_ms
integer
|
on success |
The batch rollover time in milliseconds.
Sample:
56
|
||||||
bucket_name
string
|
on success |
The name of the bucket. Avoid entering confidential information.
Sample:
bucket_name_example
|
||||||
compartment_id
string
|
on success |
The OCID of the compartment containing the metric.
Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
dimensions
complex
|
on success |
List of dimension names and values.
|
||||||
dimension_value
complex
|
on success |
|
||||||
kind
string
|
on success |
The type of dimension value: static or evaluated.
Sample:
jmesPath
|
||||||
path
string
|
on success |
The location to use for deriving the dimension value (evaluated). The path must start with `logContent` in an acceptable notation style with supported JMESPath selectors: expression with dot and index operator (`.` and `L(]`). Example with dot notation: `logContent.data` Example with index notation: `logContent.data[0].content` For information on valid dimension keys and values, see [MetricDataDetails Reference,https://docs.cloud.oracle.com/en- us/iaas/api/#/en/monitoring/latest/datatypes/MetricDataDetails). The returned value depends on the results of evaluation. If the evaluated value is valid, then the evaluated value is returned without double quotes. (Any front or trailing double quotes are trimmed before returning the value. For example, the evaluated value `"compartmentId"` is returned as `compartmentId`.) If the evaluated value is invalid, then the returned value is `SCH_EVAL_INVALID_VALUE`. If the evaluated value is empty, then the returned value is `SCH_EVAL_VALUE_EMPTY`.
Sample:
path_example
|
||||||
value
string
|
on success |
The data extracted from the specified dimension value (passed as-is). Unicode characters only. For information on valid dimension keys and values, see MetricDataDetails Reference.
Sample:
value_example
|
||||||
name
string
|
on success |
Dimension key. A valid dimension key includes only printable ASCII, excluding periods (.) and spaces. Custom dimension keys are acceptable. Avoid entering confidential information. Due to use by Service Connector Hub, the following dimension names are reserved: `connectorId`, `connectorName`, `connectorSourceType`. For information on valid dimension keys and values, see MetricDataDetails Reference. Example: `type`
Sample:
name_example
|
||||||
enable_formatted_messaging
boolean
|
on success |
Whether to apply a simplified, user-friendly format to the message. Applies only when friendly formatting is supported by the service connector source and the subscription protocol.
Example: `true`
Sample:
True
|
||||||
function_id
string
|
on success |
The OCID of the function.
Sample:
ocid1.function.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
kind
string
|
on success |
The type descriminator.
Sample:
functions
|
||||||
log_group_id
string
|
on success |
The OCID of the Logging Analytics log group.
Sample:
ocid1.loggroup.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
log_source_identifier
string
|
on success |
Identifier of the log source that you want to use for processing data received from the service connector source. Applies to `StreamingSource` only. Equivalent to `name` at LogAnalyticsSource.
Sample:
log_source_identifier_example
|
||||||
metric
string
|
on success |
The name of the metric.
Example: `CpuUtilization`
Sample:
metric_example
|
||||||
metric_namespace
string
|
on success |
The namespace of the metric.
Example: `oci_computeagent`
Sample:
metric_namespace_example
|
||||||
namespace
string
|
on success |
The namespace.
Sample:
namespace_example
|
||||||
object_name_prefix
string
|
on success |
The prefix of the objects. Avoid entering confidential information.
Sample:
object_name_prefix_example
|
||||||
stream_id
string
|
on success |
The OCID of the stream.
Sample:
ocid1.stream.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
topic_id
string
|
on success |
The OCID of the topic.
Sample:
ocid1.topic.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
tasks
complex
|
on success |
The list of tasks.
Returned for get operation
|
||||||
batch_size_in_kbs
integer
|
on success |
Size limit (kilobytes) for batch sent to invoke the function.
Sample:
56
|
||||||
batch_time_in_sec
integer
|
on success |
Time limit (seconds) for batch sent to invoke the function.
Sample:
56
|
||||||
condition
string
|
on success |
A filter or mask to limit the source used in the flow defined by the service connector.
Sample:
condition_example
|
||||||
function_id
string
|
on success |
The OCID of the function to be used as a task.
Sample:
ocid1.function.oc1..xxxxxxEXAMPLExxxxxx
|
||||||
kind
string
|
on success |
The type descriminator.
Sample:
function
|
||||||
time_created
string
|
on success |
The date and time when the service connector was created. Format is defined by RFC3339. Example: `2020-01-25T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
||||||
time_updated
string
|
on success |
The date and time when the service connector was updated. Format is defined by RFC3339. Example: `2020-01-25T21:10:29.600Z`
Sample:
2013-10-20T19:20:30+01:00
|
Authors¶
Oracle (@oracle)