oracle.oci.oci_tenant_manager_control_plane_subscription_facts – Fetches details about one or multiple Subscription 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_tenant_manager_control_plane_subscription_facts.

New in version 2.9.0: of oracle.oci

Synopsis

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

  • List the subscriptions that a compartment owns. Only the root compartment is allowed.

  • If subscription_id is specified, the details of a single Subscription 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.
compartment_id
string
The ID of the compartment in which to list resources.
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.
entity_version
string
    Choices:
  • V1
  • V2
The version of the subscription entity.
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.
sort_by
string
    Choices:
  • timeCreated
  • displayName
The field to sort by. Only one sort order can be provided. * The default order for timeCreated is descending. * The default order for displayName is ascending. * If no value is specified, timeCreated is the default.
sort_order
string
    Choices:
  • ASC
  • DESC
The sort order to use, whether 'asc' or 'desc'.
subscription_id
string
OCID of the subscription.
Required to get a specific subscription.

aliases: id
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 subscription
  oci_tenant_manager_control_plane_subscription_facts:
    # required
    subscription_id: "ocid1.subscription.oc1..xxxxxxEXAMPLExxxxxx"

- name: List subscriptions
  oci_tenant_manager_control_plane_subscription_facts:

    # optional
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    subscription_id: "ocid1.subscription.oc1..xxxxxxEXAMPLExxxxxx"
    sort_order: ASC
    sort_by: timeCreated
    entity_version: V1

Return Values

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

Key Returned Description
subscriptions
complex
on success
List of Subscription resources

Sample:
[{'classic_subscription_id': 'ocid1.classicsubscription.oc1..xxxxxxEXAMPLExxxxxx', 'cloud_amount_currency': 'cloud_amount_currency_example', 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'csi_number': 'csi_number_example', 'currency_code': 'currency_code_example', 'customer_country_code': 'customer_country_code_example', 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'end_date': '2013-10-20T19:20:30+01:00', 'entity_version': 'V1', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_classic_subscription': True, 'is_government_subscription': True, 'lifecycle_state': 'CREATING', 'payment_model': 'payment_model_example', 'program_type': 'program_type_example', 'promotion': [{'amount': 3.4, 'currency_unit': 'currency_unit_example', 'duration': 56, 'duration_unit': 'duration_unit_example', 'is_intent_to_pay': True, 'status': 'INITIALIZED', 'time_expired': '2013-10-20T19:20:30+01:00', 'time_started': '2013-10-20T19:20:30+01:00'}], 'purchase_entitlement_id': 'ocid1.purchaseentitlement.oc1..xxxxxxEXAMPLExxxxxx', 'region_assignment': 'region_assignment_example', 'service_name': 'service_name_example', 'skus': [{'description': 'description_example', 'end_date': '2013-10-20T19:20:30+01:00', 'gsi_order_line_id': 'ocid1.gsiorderline.oc1..xxxxxxEXAMPLExxxxxx', 'is_additional_instance': True, 'is_base_service_component': True, 'license_part_description': 'license_part_description_example', 'metric_name': 'metric_name_example', 'quantity': 56, 'sku': 'sku_example', 'start_date': '2013-10-20T19:20:30+01:00'}], 'start_date': '2013-10-20T19:20:30+01:00', 'subscription_number': 'subscription_number_example', 'subscription_tier': 'subscription_tier_example', 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00'}]
 
classic_subscription_id
string
on success
Classic subscription ID.
Returned for get operation

Sample:
ocid1.classicsubscription.oc1..xxxxxxEXAMPLExxxxxx
 
cloud_amount_currency
string
on success
The currency code for the customer associated with the subscription.
Returned for get operation

Sample:
cloud_amount_currency_example
 
compartment_id
string
on success
The Oracle ID (OCID) of the owning compartment. Always a tenancy OCID.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
csi_number
string
on success
Customer service identifier for the customer associated with the subscription.
Returned for get operation

Sample:
csi_number_example
 
currency_code
string
on success
Currency code. For example USD, MXN.
Returned for get operation

Sample:
currency_code_example
 
customer_country_code
string
on success
The country code for the customer associated with the subscription.
Returned for get operation

Sample:
customer_country_code_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'}}
 
end_date
string
on success
Subscription end time.
Returned for get operation

Sample:
2013-10-20T19:20:30+01:00
 
entity_version
string
on success
The entity version of the subscription, whether V1 (the legacy schema version), or V2 (the latest 20230401 API version).

Sample:
V1
 
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 Oracle ID (OCID) of the subscription.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
is_classic_subscription
boolean
on success
Specifies whether or not the subscription is from classic systems.
Returned for get operation

Sample:
True
 
is_government_subscription
boolean
on success
Specifies whether or not the subscription is a government subscription.
Returned for get operation

Sample:
True
 
lifecycle_state
string
on success
Lifecycle state of the subscription.
Returned for get operation

Sample:
CREATING
 
payment_model
string
on success
The pay model of the subscription, such as 'Pay as you go' or 'Monthly'.
Returned for get operation

Sample:
payment_model_example
 
program_type
string
on success
Specifies any program that is associated with the subscription.
Returned for get operation

Sample:
program_type_example
 
promotion
complex
on success
List of promotions related to the subscription.
Returned for get operation

   
amount
float
on success
If a subscription is present, indicates the total amount of promotional subscription credits.

Sample:
3.4
   
currency_unit
string
on success
Currency unit associated with the promotion.

Sample:
currency_unit_example
   
duration
integer
on success
Specifies how long the promotion related to the subscription, if any, is valid in duration units.

Sample:
56
   
duration_unit
string
on success
Unit for the duration.

Sample:
duration_unit_example
   
is_intent_to_pay
boolean
on success
Speficies whether or not the customer intends to pay after the promotion has expired.

Sample:
True
   
status
string
on success
If a subscription is present, indicates the current status of the subscription promotion.

Sample:
INITIALIZED
   
time_expired
string
on success
Date and time when the promotion ends.

Sample:
2013-10-20T19:20:30+01:00
   
time_started
string
on success
Date and time when the promotion starts.

Sample:
2013-10-20T19:20:30+01:00
 
purchase_entitlement_id
string
on success
Purchase entitlement ID associated with the subscription.
Returned for get operation

Sample:
ocid1.purchaseentitlement.oc1..xxxxxxEXAMPLExxxxxx
 
region_assignment
string
on success
Region for the subscription.
Returned for get operation

Sample:
region_assignment_example
 
service_name
string
on success
The type of subscription, such as 'UCM', 'SAAS', 'ERP', 'CRM'.

Sample:
service_name_example
 
skus
complex
on success
List of SKUs linked to this subscription.
Returned for get operation

   
description
string
on success
Description of the stock units.

Sample:
description_example
   
end_date
string
on success
Date and time when the SKU ended.

Sample:
2013-10-20T19:20:30+01:00
   
gsi_order_line_id
string
on success
Sales order line identifier.

Sample:
ocid1.gsiorderline.oc1..xxxxxxEXAMPLExxxxxx
   
is_additional_instance
boolean
on success
Specifies if an additional test instance can be provisioned by the SaaS application.

Sample:
True
   
is_base_service_component
boolean
on success
Specifies if the SKU is considered as a parent or child.

Sample:
True
   
license_part_description
string
on success
Description of the covered product belonging to this SKU.

Sample:
license_part_description_example
   
metric_name
string
on success
Base metric for billing the service.

Sample:
metric_name_example
   
quantity
integer
on success
Quantity of the stock units.

Sample:
56
   
sku
string
on success
Stock Keeping Unit (SKU) ID.

Sample:
sku_example
   
start_date
string
on success
Date and time when the SKU was created.

Sample:
2013-10-20T19:20:30+01:00
 
start_date
string
on success
Subscription start time.
Returned for get operation

Sample:
2013-10-20T19:20:30+01:00
 
subscription_number
string
on success
Unique Oracle Cloud Subscriptions identifier that is immutable on creation.
Returned for get operation

Sample:
subscription_number_example
 
subscription_tier
string
on success
Tier for the subscription, whether a free promotion subscription or a paid subscription.
Returned for get operation

Sample:
subscription_tier_example
 
time_created
string
on success
The date and time of creation, as described in RFC 3339, section 14.29.

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
The date and time of update, as described in RFC 3339, section 14.29.

Sample:
2013-10-20T19:20:30+01:00


Authors

  • Oracle (@oracle)