oracle.oci.oci_apm_config_config – Manage a Config resource in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 5.3.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_apm_config_config.

New in version 2.9.0: of oracle.oci

Synopsis

  • This module allows the user to create, update and delete a Config resource in Oracle Cloud Infrastructure

  • For state=present, creates a new configuration item.

Requirements

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

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).
apm_domain_id
string / required
The APM Domain ID the request is intended for.
auth_purpose
string
    Choices:
  • service_principal
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
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
  • security_token
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.
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_id
string
The OCID of the configuration item.
Required for update using state=present when environment variable OCI_USE_NAME_AS_IDENTIFIER is not set.
Required for delete using state=absent when environment variable OCI_USE_NAME_AS_IDENTIFIER is not set.

aliases: id
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.
config_type
string
    Choices:
  • SPAN_FILTER
  • METRIC_GROUP
  • OPTIONS
  • APDEX
The type of configuration item.
Required for create using state=present, update using state=present with config_id present.
defined_tags
dictionary
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace": {"bar-key": "value"}}`
This parameter is updatable.
description
string
An optional string that describes what the filter is intended or used for.
This parameter is updatable.
Applicable when config_type is one of ['OPTIONS', 'SPAN_FILTER']
dimensions
list / elements=dictionary
A list of dimensions for the metric. This variable should not be used.
This parameter is updatable.
Applicable when config_type is 'METRIC_GROUP'
name
string / required
The name of the dimension.
Required when config_type is 'METRIC_GROUP'
value_source
string
The source to populate the dimension. This must not be specified.
Applicable when config_type is 'METRIC_GROUP'
display_name
string
The name by which a configuration entity is displayed to the end user.
Required for create, update, delete when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
This parameter is updatable when OCI_USE_NAME_AS_IDENTIFIER is not set.
Applicable when config_type is one of ['APDEX', 'METRIC_GROUP', 'OPTIONS', 'SPAN_FILTER']
Required when config_type is one of ['APDEX', 'METRIC_GROUP', 'SPAN_FILTER']

aliases: name
filter_id
string
The OCID of a Span Filter. The filterId is mandatory for the creation of MetricGroups. A filterId is generated when a Span Filter is created.
This parameter is updatable.
Applicable when config_type is 'METRIC_GROUP'
Required when config_type is 'METRIC_GROUP'
filter_text
string
The string that defines the Span Filter expression.
This parameter is updatable.
Applicable when config_type is 'SPAN_FILTER'
Required when config_type is 'SPAN_FILTER'
force_create
boolean
    Choices:
  • no ←
  • yes
Whether to attempt non-idempotent creation of a resource. By default, create resource is an idempotent operation, and doesn't create the resource if it already exists. Setting this option to true, forcefully creates a copy of the resource, even if it already exists.This option is mutually exclusive with key_by.
freeform_tags
dictionary
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
This parameter is updatable.
group
string
A string that specifies the group that an OPTIONS item belongs to.
This parameter is updatable.
Applicable when config_type is 'OPTIONS'
key_by
list / elements=string
The list of attributes of this resource which should be used to uniquely identify an instance of the resource. By default, all the attributes of a resource are used to uniquely identify a resource.
metrics
list / elements=dictionary
The list of metrics in this group.
This parameter is updatable.
Applicable when config_type is 'METRIC_GROUP'
Required when config_type is 'METRIC_GROUP'
description
string
A description of the metric.
Applicable when config_type is 'METRIC_GROUP'
name
string / required
The name of the metric. This must be a known metric name.
Required when config_type is 'METRIC_GROUP'
unit
string
The unit of the metric.
Applicable when config_type is 'METRIC_GROUP'
value_source
string
This must not be set.
Applicable when config_type is 'METRIC_GROUP'
namespace
string
The namespace to which the metrics are published. It must be one of several predefined namespaces.
This parameter is updatable.
Applicable when config_type is 'METRIC_GROUP'
opc_dry_run
string
Indicates that the request is a dry run, if set to "true". A dry run request does not modify the configuration item details and is used only to perform validation on the submitted data.
This parameter is updatable.
options
dictionary
The options are stored here as JSON.
This parameter is updatable.
Applicable when config_type is 'OPTIONS'
realm_specific_endpoint_template_enabled
boolean
    Choices:
  • no
  • yes
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.
rules
list / elements=dictionary
This parameter is updatable.
Required when config_type is 'APDEX'
display_name
string
The name by which a configuration entity is displayed to the end user.
Applicable when config_type is 'APDEX'

aliases: name
filter_text
string / required
The string that defines the Span Filter expression.
Required when config_type is 'APDEX'
is_apply_to_error_spans
boolean
    Choices:
  • no
  • yes
Specifies whether an Apdex score should be computed for error spans. Setting it to "true" means that the Apdex score is computed in the usual way. Setting it to "false" skips the Apdex computation and sets the Apdex score to "frustrating" regardless of the configured thresholds. The default is "false".
Applicable when config_type is 'APDEX'
is_enabled
boolean
    Choices:
  • no
  • yes
Specifies whether the Apdex score should be computed for spans matching the rule. This can be used to disable Apdex score for spans that do not need or require it. The default is "true".
Applicable when config_type is 'APDEX'
priority
integer / required
The priority controls the order in which multiple rules in a rule set are applied. Lower values indicate higher priorities. Rules with higher priority are applied first, and once a match is found, the rest of the rules are ignored. Rules within the same rule set cannot have the same priority.
Required when config_type is 'APDEX'
satisfied_response_time
integer
The maximum response time in milliseconds that is considered "satisfactory" for the end user.
Applicable when config_type is 'APDEX'
tolerating_response_time
integer
The maximum response time in milliseconds that is considered "tolerable" for the end user. A response time beyond this threshold is considered "frustrating". This value cannot be lower than "satisfiedResponseTime".
Applicable when config_type is 'APDEX'
state
string
    Choices:
  • present ←
  • absent
The state of the Config.
Use state=present to create or update a Config.
Use state=absent to delete a Config.
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

Examples

- name: Create config with config_type = SPAN_FILTER
  oci_apm_config_config:
    # required
    config_type: SPAN_FILTER

    # optional
    filter_text: filter_text_example
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example
    description: description_example

- name: Create config with config_type = METRIC_GROUP
  oci_apm_config_config:
    # required
    config_type: METRIC_GROUP

    # optional
    filter_id: "ocid1.filter.oc1..xxxxxxEXAMPLExxxxxx"
    namespace: namespace_example
    dimensions:
    - # required
      name: name_example

      # optional
      value_source: value_source_example
    metrics:
    - # required
      name: name_example

      # optional
      value_source: value_source_example
      unit: unit_example
      description: description_example
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example

- name: Create config with config_type = OPTIONS
  oci_apm_config_config:
    # required
    config_type: OPTIONS

    # optional
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example
    options: null
    group: group_example
    description: description_example

- name: Create config with config_type = APDEX
  oci_apm_config_config:
    # required
    rules:
    - # required
      filter_text: filter_text_example
      priority: 56

      # optional
      is_enabled: true
      satisfied_response_time: 56
      tolerating_response_time: 56
      is_apply_to_error_spans: true
      display_name: display_name_example
    config_type: APDEX

    # optional
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example

- name: Update config with config_type = SPAN_FILTER
  oci_apm_config_config:
    # required
    config_type: SPAN_FILTER

    # optional
    filter_text: filter_text_example
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example
    description: description_example

- name: Update config with config_type = METRIC_GROUP
  oci_apm_config_config:
    # required
    config_type: METRIC_GROUP

    # optional
    filter_id: "ocid1.filter.oc1..xxxxxxEXAMPLExxxxxx"
    namespace: namespace_example
    dimensions:
    - # required
      name: name_example

      # optional
      value_source: value_source_example
    metrics:
    - # required
      name: name_example

      # optional
      value_source: value_source_example
      unit: unit_example
      description: description_example
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example

- name: Update config with config_type = OPTIONS
  oci_apm_config_config:
    # required
    config_type: OPTIONS

    # optional
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example
    options: null
    group: group_example
    description: description_example

- name: Update config with config_type = APDEX
  oci_apm_config_config:
    # required
    rules:
    - # required
      filter_text: filter_text_example
      priority: 56

      # optional
      is_enabled: true
      satisfied_response_time: 56
      tolerating_response_time: 56
      is_apply_to_error_spans: true
      display_name: display_name_example
    config_type: APDEX

    # optional
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example

- name: Update config using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set) with config_type = SPAN_FILTER
  oci_apm_config_config:
    # required
    config_type: SPAN_FILTER

    # optional
    filter_text: filter_text_example
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example
    description: description_example

- name: Update config using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set) with config_type = METRIC_GROUP
  oci_apm_config_config:
    # required
    config_type: METRIC_GROUP

    # optional
    filter_id: "ocid1.filter.oc1..xxxxxxEXAMPLExxxxxx"
    namespace: namespace_example
    dimensions:
    - # required
      name: name_example

      # optional
      value_source: value_source_example
    metrics:
    - # required
      name: name_example

      # optional
      value_source: value_source_example
      unit: unit_example
      description: description_example
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example

- name: Update config using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set) with config_type = OPTIONS
  oci_apm_config_config:
    # required
    config_type: OPTIONS

    # optional
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example
    options: null
    group: group_example
    description: description_example

- name: Update config using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set) with config_type = APDEX
  oci_apm_config_config:
    # required
    rules:
    - # required
      filter_text: filter_text_example
      priority: 56

      # optional
      is_enabled: true
      satisfied_response_time: 56
      tolerating_response_time: 56
      is_apply_to_error_spans: true
      display_name: display_name_example
    config_type: APDEX

    # optional
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    display_name: display_name_example

- name: Delete config
  oci_apm_config_config:
    # required
    apm_domain_id: "ocid1.apmdomain.oc1..xxxxxxEXAMPLExxxxxx"
    config_id: "ocid1.config.oc1..xxxxxxEXAMPLExxxxxx"
    state: absent

- name: Delete config using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
  oci_apm_config_config:
    # required
    display_name: display_name_example
    apm_domain_id: "ocid1.apmdomain.oc1..xxxxxxEXAMPLExxxxxx"
    state: absent

Return Values

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

Key Returned Description
config
complex
on success
Details of the Config resource acted upon by the current operation

Sample:
{'config_type': 'SPAN_FILTER', 'created_by': 'created_by_example', 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'description': 'description_example', 'dimensions': [{'name': 'name_example', 'value_source': 'value_source_example'}], 'display_name': 'display_name_example', 'etag': 'etag_example', 'filter_id': 'ocid1.filter.oc1..xxxxxxEXAMPLExxxxxx', 'filter_text': 'filter_text_example', 'freeform_tags': {'Department': 'Finance'}, 'group': 'group_example', 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'in_use_by': [{'config_type': 'SPAN_FILTER', 'display_name': 'display_name_example', 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'options_group': 'options_group_example'}], 'metrics': [{'description': 'description_example', 'name': 'name_example', 'unit': 'unit_example', 'value_source': 'value_source_example'}], 'namespace': 'namespace_example', 'options': {}, 'rules': [{'display_name': 'display_name_example', 'filter_text': 'filter_text_example', 'is_apply_to_error_spans': True, 'is_enabled': True, 'priority': 56, 'satisfied_response_time': 56, 'tolerating_response_time': 56}], 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00', 'updated_by': 'updated_by_example'}
 
config_type
string
on success
The type of configuration item.

Sample:
SPAN_FILTER
 
created_by
string
on success
The OCID of a user.

Sample:
created_by_example
 
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
An optional string that describes what the options are intended or used for.

Sample:
description_example
 
dimensions
complex
on success
A list of dimensions for the metric. This variable should not be used.

   
name
string
on success
The name of the dimension.

Sample:
name_example
   
value_source
string
on success
The source to populate the dimension. This must not be specified.

Sample:
value_source_example
 
display_name
string
on success
The name by which a configuration entity is displayed to the end user.

Sample:
display_name_example
 
etag
string
on success
For optimistic concurrency control. See `if-match`.

Sample:
etag_example
 
filter_id
string
on success
The OCID of a Span Filter. The filterId is mandatory for the creation of MetricGroups. A filterId is generated when a Span Filter is created.

Sample:
ocid1.filter.oc1..xxxxxxEXAMPLExxxxxx
 
filter_text
string
on success
The string that defines the Span Filter expression.

Sample:
filter_text_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'}
 
group
string
on success
A string that specifies the group that an OPTIONS item belongs to.

Sample:
group_example
 
id
string
on success
The OCID of the configuration item. An OCID is generated when the item is created.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
in_use_by
complex
on success
The list of configuration items that reference the span filter.

   
config_type
string
on success
The type of configuration item.

Sample:
SPAN_FILTER
   
display_name
string
on success
The name by which a configuration entity is displayed to the end user.

Sample:
display_name_example
   
id
string
on success
The OCID of the configuration item. An OCID is generated when the item is created.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
   
options_group
string
on success
A string that specifies the group that an OPTIONS item belongs to.

Sample:
options_group_example
 
metrics
complex
on success
The list of metrics in this group.

   
description
string
on success
A description of the metric.

Sample:
description_example
   
name
string
on success
The name of the metric. This must be a known metric name.

Sample:
name_example
   
unit
string
on success
The unit of the metric.

Sample:
unit_example
   
value_source
string
on success
This must not be set.

Sample:
value_source_example
 
namespace
string
on success
The namespace to which the metrics are published. It must be one of several predefined namespaces.

Sample:
namespace_example
 
options
dictionary
on success
The options are stored here as JSON.

 
rules
complex
on success

   
display_name
string
on success
The name by which a configuration entity is displayed to the end user.

Sample:
display_name_example
   
filter_text
string
on success
The string that defines the Span Filter expression.

Sample:
filter_text_example
   
is_apply_to_error_spans
boolean
on success
Specifies whether an Apdex score should be computed for error spans. Setting it to "true" means that the Apdex score is computed in the usual way. Setting it to "false" skips the Apdex computation and sets the Apdex score to "frustrating" regardless of the configured thresholds. The default is "false".

Sample:
True
   
is_enabled
boolean
on success
Specifies whether the Apdex score should be computed for spans matching the rule. This can be used to disable Apdex score for spans that do not need or require it. The default is "true".

Sample:
True
   
priority
integer
on success
The priority controls the order in which multiple rules in a rule set are applied. Lower values indicate higher priorities. Rules with higher priority are applied first, and once a match is found, the rest of the rules are ignored. Rules within the same rule set cannot have the same priority.

Sample:
56
   
satisfied_response_time
integer
on success
The maximum response time in milliseconds that is considered "satisfactory" for the end user.

Sample:
56
   
tolerating_response_time
integer
on success
The maximum response time in milliseconds that is considered "tolerable" for the end user. A response time beyond this threshold is considered "frustrating". This value cannot be lower than "satisfiedResponseTime".

Sample:
56
 
time_created
string
on success
The time the resource was created, expressed in RFC 3339 timestamp format. Example: `2020-02-12T22:47:12.613Z`

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
The time the resource was updated, expressed in RFC 3339 timestamp format. Example: `2020-02-13T22:47:12.613Z`

Sample:
2013-10-20T19:20:30+01:00
 
updated_by
string
on success
The OCID of a user.

Sample:
updated_by_example


Authors

  • Oracle (@oracle)