oracle.oci.oci_tenant_manager_control_plane_assigned_subscription_facts – Fetches details about one or multiple AssignedSubscription resources in Oracle Cloud Infrastructure

Note

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

New in version 2.9.0: of oracle.oci

Synopsis

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

  • Lists subscriptions that are consumed by the compartment. Only the root compartment is allowed.

  • If assigned_subscription_id is specified, the details of a single AssignedSubscription 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).
assigned_subscription_id
string
OCID of the assigned subscription.
Required to get a specific assigned_subscription.

aliases: id
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
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.
Required to list multiple assigned_subscriptions.
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.
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
The ID of the subscription to which the tenancy is associated.
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 assigned_subscription
  oci_tenant_manager_control_plane_assigned_subscription_facts:
    # required
    assigned_subscription_id: "ocid1.assignedsubscription.oc1..xxxxxxEXAMPLExxxxxx"

- name: List assigned_subscriptions
  oci_tenant_manager_control_plane_assigned_subscription_facts:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    subscription_id: "ocid1.subscription.oc1..xxxxxxEXAMPLExxxxxx"
    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
assigned_subscriptions
complex
on success
List of AssignedSubscription 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', 'customer_country_code': 'customer_country_code_example', 'end_date': '2013-10-20T19:20:30+01:00', 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_classic_subscription': True, 'is_government_subscription': True, 'lifecycle_state': 'CREATING', 'order_ids': [], '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_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
Subscription ID.

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
OCID of the 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
 
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
 
end_date
string
on success
Subscription end time.

Sample:
2013-10-20T19:20:30+01:00
 
id
string
on success
OCID of the subscription.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
is_classic_subscription
boolean
on success
Denotes if the subscription is legacy or not.

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

Sample:
True
 
lifecycle_state
string
on success
Lifecycle state of the subscription.

Sample:
CREATING
 
order_ids
list / elements=string
on success
List of subscription order OCIDs that contributed to this subscription.
Returned for get operation

 
program_type
string
on success
Denotes 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
Total amount of credit for the promotion related to the subscription if there is one.

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

Sample:
currency_unit_example
   
duration
integer
on success
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
Whether or not customer intends to pay once the promotion is done.

Sample:
True
   
status
string
on success
Current status of the promotion related to the subscription if there is one.

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

Sample:
2013-10-20T19:20:30+01:00
   
time_started
string
on success
Date-time for 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.

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

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

   
description
string
on success
Description of the stock units.

Sample:
description_example
   
end_date
string
on success
Date-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
Denotes if an additional test instance can be provisioned by the SAAS application.

Sample:
True
   
is_base_service_component
boolean
on success
Denotes 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 ID.

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

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

Sample:
2013-10-20T19:20:30+01:00
 
subscription_tier
string
on success
Tier for the subscription, such as if it is a free promotion subscription or a paid subscription.
Returned for get operation

Sample:
subscription_tier_example
 
time_created
string
on success
Date-time when subscription is created.

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
Date-time when subscription is updated.

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


Authors

  • Oracle (@oracle)