oracle.oci.oci_oda_package_facts – Fetches details about one or multiple Package resources 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_oda_package_facts.

New in version 2.9.0: of oracle.oci

Synopsis

  • Fetches details about one or multiple Package resources in Oracle Cloud Infrastructure

  • Returns a page of summaries for packages that are available for import. The optional odaInstanceId query parameter can be used to filter packages that are available for import by a specific instance. If odaInstanceId query parameter is not provided, the returned list will include packages available within the region indicated by the request URL. The optional resourceType query param may be specified to filter packages that contain the indicated resource type. If no resourceType query param is given, packages containing all resource types will be returned. The optional name query parameter can be used to limit the list to packages whose name matches the given name. The optional displayName query parameter can be used to limit the list to packages whose displayName matches the given name. The optional isLatestVersionOnly query parameter can be used to limit the returned list to include only the latest version of any given package. If not specified, all versions of any otherwise matching package will be returned.

  • If the opc-next-page header appears in the response, then there are more items to retrieve. To get the next page in the subsequent GET request, include the header’s value as the page query parameter.

  • If package_id is specified, the details of a single Package will be returned.

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).
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_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
List only the information for the Digital Assistant instance with this user-friendly name. These names don't have to be unique and may change.
Example: `My new resource`
is_latest_skill_only
boolean
    Choices:
  • no
  • yes
Should we return only the latest version of a package (instead of all versions)?
name
string
List only the information for the package with this name. Package names are unique to a publisher and may not change.
Example: `My Package`
oda_instance_id
string
Unique Digital Assistant instance identifier.
Required to get a specific package.
package_id
string
Unique Digital Assistant package identifier.
Required to get a specific package.

aliases: id
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.
resource_type
string
Resource type identifier. Used to limit query results to the items which are applicable to the given type.
sort_by
string
    Choices:
  • TIMECREATED
  • DISPLAYNAME
Sort on this field. You can specify one sort order only. The default sort field is `TIMECREATED`.
The default sort order for `TIMECREATED` is descending, and the default sort order for `DISPLAYNAME` is ascending.
sort_order
string
    Choices:
  • ASC
  • DESC
Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending).
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: Get a specific package
  oci_oda_package_facts:
    # required
    package_id: "ocid1.package.oc1..xxxxxxEXAMPLExxxxxx"
    oda_instance_id: "ocid1.odainstance.oc1..xxxxxxEXAMPLExxxxxx"

- name: List packages
  oci_oda_package_facts:

    # optional
    oda_instance_id: "ocid1.odainstance.oc1..xxxxxxEXAMPLExxxxxx"
    resource_type: resource_type_example
    name: name_example
    display_name: display_name_example
    is_latest_skill_only: true
    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
packages
complex
on success
List of Package resources

Sample:
[{'default_parameter_values': {'resource_types_default_parameter_values': [{'parameter_values': {}, 'resource_type': 'resource_type_example'}]}, 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'description': 'description_example', 'display_name': 'display_name_example', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'import_contract': {'import_contract': [{'parameters': [{'default_value': 'default_value_example', 'description': 'description_example', 'direction': 'INPUT', 'is_required': True, 'is_sensitive': True, 'max_length': 56, 'min_length': 56, 'name': 'name_example', 'pattern': 'pattern_example', 'resource_type_metadata': {}, 'type': 'STRING', 'ui_placement_hint': 'ui_placement_hint_example'}], 'resource_type': 'resource_type_example'}]}, 'name': 'name_example', 'publisher_id': 'ocid1.publisher.oc1..xxxxxxEXAMPLExxxxxx', 'publisher_metadata': [{'name': 'name_example', 'value': 'value_example'}], 'resource_types': [], 'resource_types_metadata': [{'properties': [{'name': 'name_example', 'value': 'value_example'}], 'resource_type': 'resource_type_example'}], 'time_published': '2013-10-20T19:20:30+01:00', 'time_uploaded': '2013-10-20T19:20:30+01:00', 'version': 'version_example'}]
 
default_parameter_values
complex
on success
Returned for get operation

   
resource_types_default_parameter_values
complex
on success
A list of resource type specific default parameter values, one set for each resource type listed in the package definition.

     
parameter_values
dictionary
on success
A list of parameter values used to import the package.

     
resource_type
string
on success
The type of resource to which these resourceType-specific parameter values apply

Sample:
resource_type_example
 
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
Description of the package.

Sample:
description_example
 
display_name
string
on success
Display name for the package (displayed in UI and user-facing applications).

Sample:
display_name_example
 
freeform_tags
dictionary
on success
Simple key-value pair that is applied without any predefined name, type, or scope. Example: `{"bar-key": "value"}`

Sample:
{'Department': 'Finance'}
 
id
string
on success
Unique immutable identifier that was assigned when the Package was registered.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
import_contract
complex
on success
Returned for get operation

   
import_contract
complex
on success
A list of resource type specific import contracts, one for each resource type listed in the package definition.

     
parameters
complex
on success
A list of definitions for parameters that are required to import this package into a target instance.

       
default_value
string
on success
Default value for the parameter.

Sample:
default_value_example
       
description
string
on success
Description of the parameter.

Sample:
description_example
       
direction
string
on success
Is this parameter an input parameter, output parameter, or both?

Sample:
INPUT
       
is_required
boolean
on success
Is this parameter required. Ignored for parameters with direction = OUTPUT.

Sample:
True
       
is_sensitive
boolean
on success
Is the data for this parameter sensitive (e.g. should the data be hidden in UI, encrypted if stored, etc.)

Sample:
True
       
max_length
integer
on success
Used for character string types such as STRING to constrain the length of the value

Sample:
56
       
min_length
integer
on success
Used for character string types such as STRING to constrain the length of the value

Sample:
56
       
name
string
on success
The name of the parameter

Sample:
name_example
       
pattern
string
on success
Regular expression used to validate the value of a string type such as STRING

Sample:
pattern_example
       
resource_type_metadata
dictionary
on success
Any configuration needed to help the resource type process this parameter (e.g. link to manifest, etc.).

       
type
string
on success
Enumerated parameter type.

Sample:
STRING
       
ui_placement_hint
string
on success
A forward-slash-delimited 'path' in an imaginary hierarchy, at which this parameter's UI widgets should be placed

Sample:
ui_placement_hint_example
     
resource_type
string
on success
The type of resource to which this resourceType-specific contract applies

Sample:
resource_type_example
 
name
string
on success
Name of package.

Sample:
name_example
 
publisher_id
string
on success
ID of the publisher providing the package.

Sample:
ocid1.publisher.oc1..xxxxxxEXAMPLExxxxxx
 
publisher_metadata
complex
on success
A map of metadata key/value pairs that further describes the publisher and the platform in which the package might be used.

   
name
string
on success
Name of property.

Sample:
name_example
   
value
string
on success
Value for the property.

Sample:
value_example
 
resource_types
list / elements=string
on success
A list of resource types describing the content of the package.

 
resource_types_metadata
complex
on success
A map of resource type to metadata key/value map that further describes the content for the resource types in this package.. Keys are resource type names, values are a map of name/value pairs per resource type.

   
properties
complex
on success
Any properties needed to describe the content and its usage for this resource type, and within the containing package.

     
name
string
on success
Name of property.

Sample:
name_example
     
value
string
on success
Value for the property.

Sample:
value_example
   
resource_type
string
on success
The type of the resource described by this metadata object.

Sample:
resource_type_example
 
time_published
string
on success
When the package was last published. A date-time string as described in RFC 3339, section 14.29.

Sample:
2013-10-20T19:20:30+01:00
 
time_uploaded
string
on success
When the package was uploaded. A date-time string as described in RFC 3339, section 14.29.
Returned for get operation

Sample:
2013-10-20T19:20:30+01:00
 
version
string
on success
Version of the package.

Sample:
version_example


Authors

  • Oracle (@oracle)