oracle.oci.oci_onesubscription_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.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_onesubscription_subscription_facts.

New in version 2.9.0: of oracle.oci

Synopsis

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

  • This list API returns all subscriptions for a given plan number or subscription id or buyer email and provides additional parameters to include ratecard and commitment details. This API expects exactly one of the above mentioned parameters as input. If more than one parameters are provided the API will throw a 400 - invalid parameters exception and if no parameters are provided it will throw a 400 - missing parameter exception

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.
buyer_email
string
Buyer Email Id
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 / required
The OCID of the root compartment.
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.
is_commit_info_required
boolean
    Choices:
  • no
  • yes
Boolean value to decide whether commitment services will be shown
plan_number
string
The Plan Number
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:
  • ORDERNUMBER
  • TIMEINVOICING
The field to sort by. You can provide one sort order ('sortOrder').
sort_order
string
    Choices:
  • ASC
  • DESC
The sort order to use, either ascending ('ASC') or descending ('DESC').
subscription_id
string
Line level Subscription 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: List subscriptions
  oci_onesubscription_subscription_facts:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    plan_number: plan_number_example
    subscription_id: "ocid1.subscription.oc1..xxxxxxEXAMPLExxxxxx"
    buyer_email: buyer_email_example
    is_commit_info_required: true
    sort_order: ASC
    sort_by: ORDERNUMBER

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:
[{'currency': {'iso_code': 'iso_code_example', 'name': 'name_example', 'std_precision': 56}, 'hold_reason': 'hold_reason_example', 'service_name': 'service_name_example', 'status': 'status_example', 'subscribed_services': [{'available_amount': 'available_amount_example', 'booking_opty_number': 'booking_opty_number_example', 'commitment_services': [{'available_amount': 'available_amount_example', 'funded_allocation_value': 'funded_allocation_value_example', 'line_net_amount': 'line_net_amount_example', 'quantity': 'quantity_example', 'time_end': '2013-10-20T19:20:30+01:00', 'time_start': '2013-10-20T19:20:30+01:00'}], 'csi': 56, 'data_center_region': 'us-phoenix-1', 'funded_allocation_value': 'funded_allocation_value_example', 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_intent_to_pay': True, 'net_unit_price': 'net_unit_price_example', 'operation_type': 'operation_type_example', 'order_number': 56, 'original_promo_amount': 'original_promo_amount_example', 'partner_transaction_type': 'partner_transaction_type_example', 'pricing_model': 'pricing_model_example', 'product': {'name': 'name_example', 'part_number': 'part_number_example', 'provisioning_group': 'provisioning_group_example', 'unit_of_measure': 'unit_of_measure_example'}, 'program_type': 'program_type_example', 'promo_type': 'promo_type_example', 'quantity': 'quantity_example', 'status': 'status_example', 'term_value': 56, 'term_value_uom': 'term_value_uom_example', 'time_end': '2013-10-20T19:20:30+01:00', 'time_start': '2013-10-20T19:20:30+01:00', 'total_value': 'total_value_example', 'used_amount': 'used_amount_example'}], 'time_end': '2013-10-20T19:20:30+01:00', 'time_hold_release_eta': '2013-10-20T19:20:30+01:00', 'time_start': '2013-10-20T19:20:30+01:00'}]
 
currency
complex
on success

   
iso_code
string
on success
Currency Code

Sample:
iso_code_example
   
name
string
on success
Currency name

Sample:
name_example
   
std_precision
integer
on success
Standard Precision of the Currency

Sample:
56
 
hold_reason
string
on success
Hold reason of the plan

Sample:
hold_reason_example
 
service_name
string
on success
Customer friendly service name provided by PRG

Sample:
service_name_example
 
status
string
on success
Status of the plan

Sample:
status_example
 
subscribed_services
complex
on success
List of Subscribed Services of the plan

   
available_amount
string
on success
Subscribed sercice available or remaining amount

Sample:
available_amount_example
   
booking_opty_number
string
on success
Booking Opportunity Number of Subscribed Service

Sample:
booking_opty_number_example
   
commitment_services
complex
on success
List of Commitment services of a line

     
available_amount
string
on success
Commitment available amount

Sample:
available_amount_example
     
funded_allocation_value
string
on success
Funded Allocation line value

Sample:
funded_allocation_value_example
     
line_net_amount
string
on success
Commitment line net amount

Sample:
line_net_amount_example
     
quantity
string
on success
Commitment quantity

Sample:
quantity_example
     
time_end
string
on success
Commitment end date

Sample:
2013-10-20T19:20:30+01:00
     
time_start
string
on success
Commitment start date

Sample:
2013-10-20T19:20:30+01:00
   
csi
integer
on success
Subscribed service CSI number

Sample:
56
   
data_center_region
string
on success
Subscribed service data center region

Sample:
us-phoenix-1
   
funded_allocation_value
string
on success
Funded Allocation line value example: 12000.00

Sample:
funded_allocation_value_example
   
id
string
on success
SPM internal Subscribed Service ID

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
   
is_intent_to_pay
boolean
on success
Subscribed service intent to pay flag

Sample:
True
   
net_unit_price
string
on success
Subscribed service net unit price

Sample:
net_unit_price_example
   
operation_type
string
on success
Subscribed service operation type

Sample:
operation_type_example
   
order_number
integer
on success
Sales Order Number associated to the subscribed service

Sample:
56
   
original_promo_amount
string
on success
Subscribed service Promotion Amount

Sample:
original_promo_amount_example
   
partner_transaction_type
string
on success
This field contains the name of the partner to which the subscription belongs - depending on which the invoicing may differ

Sample:
partner_transaction_type_example
   
pricing_model
string
on success
Subscribed service pricing model

Sample:
pricing_model_example
   
product
complex
on success

     
name
string
on success
Product name

Sample:
name_example
     
part_number
string
on success
Product part numner

Sample:
part_number_example
     
provisioning_group
string
on success
Product provisioning group

Sample:
provisioning_group_example
     
unit_of_measure
string
on success
Unit of measure

Sample:
unit_of_measure_example
   
program_type
string
on success
Subscribed service program type

Sample:
program_type_example
   
promo_type
string
on success
Subscribed service promotion type

Sample:
promo_type_example
   
quantity
string
on success
Subscribed service quantity

Sample:
quantity_example
   
status
string
on success
Subscribed service status

Sample:
status_example
   
term_value
integer
on success
Term value in Months

Sample:
56
   
term_value_uom
string
on success
Term value UOM

Sample:
term_value_uom_example
   
time_end
string
on success
Subscribed service end date

Sample:
2013-10-20T19:20:30+01:00
   
time_start
string
on success
Subscribed service start date

Sample:
2013-10-20T19:20:30+01:00
   
total_value
string
on success
Subscribed service total value

Sample:
total_value_example
   
used_amount
string
on success
Subscribed service used amount

Sample:
used_amount_example
 
time_end
string
on success
Represents the date when the last service of the subscription ends

Sample:
2013-10-20T19:20:30+01:00
 
time_hold_release_eta
string
on success
Represents the date of the hold release

Sample:
2013-10-20T19:20:30+01:00
 
time_start
string
on success
Represents the date when the first service of the subscription was activated

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


Authors

  • Oracle (@oracle)