oracle.oci.oci_osp_gateway_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 4.14.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_osp_gateway_subscription_facts.

New in version 2.9.0: of oracle.oci

Synopsis

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

  • Get the subscription data for the compartment

  • 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
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 / required
The OCID of the 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.
osp_home_region
string / required
The home region's public name of the logged in user.
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:
  • INVOICE_NO
  • REF_NO
  • STATUS
  • TYPE
  • INVOICE_DATE
  • DUE_DATE
  • PAYM_REF
  • TOTAL_AMOUNT
  • BALANCE_DUE
The field to sort by. Only one field can be selected for sorting.
sort_order
string
    Choices:
  • ASC
  • DESC
The sort order to use (ascending or descending).
subscription_id
string
Subscription id(OCID).
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_osp_gateway_subscription_facts:
    # required
    subscription_id: "ocid1.subscription.oc1..xxxxxxEXAMPLExxxxxx"
    osp_home_region: us-phoenix-1
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"

- name: List subscriptions
  oci_osp_gateway_subscription_facts:
    # required
    osp_home_region: us-phoenix-1
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    sort_by: INVOICE_NO
    sort_order: ASC

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:
[{'bill_to_cust_account_id': 'ocid1.billtocustaccount.oc1..xxxxxxEXAMPLExxxxxx', 'billing_address': {'address_key': 'address_key_example', 'city': 'city_example', 'company_name': 'company_name_example', 'country': 'country_example', 'email_address': 'email_address_example', 'first_name': 'first_name_example', 'last_name': 'last_name_example', 'line1': 'line1_example', 'line2': 'line2_example', 'postal_code': 'postal_code_example', 'state': 'state_example'}, 'currency_code': 'currency_code_example', 'gsi_org_code': 'gsi_org_code_example', 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_intent_to_pay': True, 'language_code': 'language_code_example', 'organization_id': 'ocid1.organization.oc1..xxxxxxEXAMPLExxxxxx', 'payment_gateway': {'merchant_defined_data': {'cloud_account_name': 'cloud_account_name_example', 'promo_type': 'promo_type_example'}}, 'payment_options': [{'credit_card_type': 'VISA', 'email_address': 'email_address_example', 'ext_billing_agreement_id': 'ocid1.extbillingagreement.oc1..xxxxxxEXAMPLExxxxxx', 'first_name': 'first_name_example', 'last_digits': 'last_digits_example', 'last_name': 'last_name_example', 'name_on_card': 'name_on_card_example', 'payment_method': 'CREDIT_CARD', 'time_expiration': '2013-10-20T19:20:30+01:00', 'wallet_instrument_id': 'ocid1.walletinstrument.oc1..xxxxxxEXAMPLExxxxxx', 'wallet_transaction_id': 'ocid1.wallettransaction.oc1..xxxxxxEXAMPLExxxxxx'}], 'plan_type': 'FREE_TIER', 'ship_to_cust_acct_role_id': 'ocid1.shiptocustacctrole.oc1..xxxxxxEXAMPLExxxxxx', 'ship_to_cust_acct_site_id': 'ocid1.shiptocustacctsite.oc1..xxxxxxEXAMPLExxxxxx', 'subscription_plan_number': 'subscription_plan_number_example', 'tax_info': {'no_tax_reason_code': 'no_tax_reason_code_example', 'no_tax_reason_code_details': 'no_tax_reason_code_details_example', 'tax_cnpj': 'tax_cnpj_example', 'tax_payer_id': 'ocid1.taxpayer.oc1..xxxxxxEXAMPLExxxxxx', 'tax_reg_number': 'tax_reg_number_example'}, 'time_plan_upgrade': '2013-10-20T19:20:30+01:00', 'time_start': '2013-10-20T19:20:30+01:00', 'upgrade_state': 'PROMO', 'upgrade_state_details': 'TAX_ERROR'}]
 
bill_to_cust_account_id
string
on success
Bill to customer Account id.

Sample:
ocid1.billtocustaccount.oc1..xxxxxxEXAMPLExxxxxx
 
billing_address
complex
on success

   
address_key
string
on success
Address identifier.

Sample:
address_key_example
   
city
string
on success
Name of the city.

Sample:
city_example
   
company_name
string
on success
Name of the customer company.

Sample:
company_name_example
   
country
string
on success
Country of the address.

Sample:
country_example
   
email_address
string
on success
Contact person email address.

Sample:
email_address_example
   
first_name
string
on success
First name of the contact person.

Sample:
first_name_example
   
last_name
string
on success
Last name of the contact person.

Sample:
last_name_example
   
line1
string
on success
Address line 1.

Sample:
line1_example
   
line2
string
on success
Address line 2.

Sample:
line2_example
   
postal_code
string
on success
Post code of the address.

Sample:
postal_code_example
   
state
string
on success
State of the address.

Sample:
state_example
 
currency_code
string
on success
Currency code

Sample:
currency_code_example
 
gsi_org_code
string
on success
GSI Subscription external code.

Sample:
gsi_org_code_example
 
id
string
on success
Subscription id identifier (OCID).

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
is_intent_to_pay
boolean
on success
Payment intension.

Sample:
True
 
language_code
string
on success
Language short code (en, de, hu, etc)

Sample:
language_code_example
 
organization_id
string
on success
GSI organization external identifier.

Sample:
ocid1.organization.oc1..xxxxxxEXAMPLExxxxxx
 
payment_gateway
complex
on success

   
merchant_defined_data
complex
on success

     
cloud_account_name
string
on success
Cloud account name.

Sample:
cloud_account_name_example
     
promo_type
string
on success
Promotion type code.

Sample:
promo_type_example
 
payment_options
complex
on success
Payment option list of a subscription.

   
credit_card_type
string
on success
Credit card type.

Sample:
VISA
   
email_address
string
on success
The email address of the paypal user.

Sample:
email_address_example
   
ext_billing_agreement_id
string
on success
Agreement id for the paypal account.

Sample:
ocid1.extbillingagreement.oc1..xxxxxxEXAMPLExxxxxx
   
first_name
string
on success
First name of the paypal user.

Sample:
first_name_example
   
last_digits
string
on success
Last four digits of the card.

Sample:
last_digits_example
   
last_name
string
on success
Last name of the paypal user.

Sample:
last_name_example
   
name_on_card
string
on success
Name on the credit card.

Sample:
name_on_card_example
   
payment_method
string
on success
Payment method

Sample:
CREDIT_CARD
   
time_expiration
string
on success
Expired date of the credit card.

Sample:
2013-10-20T19:20:30+01:00
   
wallet_instrument_id
string
on success
Wallet instrument internal id.

Sample:
ocid1.walletinstrument.oc1..xxxxxxEXAMPLExxxxxx
   
wallet_transaction_id
string
on success
Wallet transaction id.

Sample:
ocid1.wallettransaction.oc1..xxxxxxEXAMPLExxxxxx
 
plan_type
string
on success
Subscription plan type.

Sample:
FREE_TIER
 
ship_to_cust_acct_role_id
string
on success
Ship to customer account role.

Sample:
ocid1.shiptocustacctrole.oc1..xxxxxxEXAMPLExxxxxx
 
ship_to_cust_acct_site_id
string
on success
Ship to customer account site address id.

Sample:
ocid1.shiptocustacctsite.oc1..xxxxxxEXAMPLExxxxxx
 
subscription_plan_number
string
on success
Subscription plan number.

Sample:
subscription_plan_number_example
 
tax_info
complex
on success

   
no_tax_reason_code
string
on success
Tax exemption reason code.

Sample:
no_tax_reason_code_example
   
no_tax_reason_code_details
string
on success
Tax exemption reason description.

Sample:
no_tax_reason_code_details_example
   
tax_cnpj
string
on success
Brazilian companies' CNPJ number.

Sample:
tax_cnpj_example
   
tax_payer_id
string
on success
Tay payer identifier.

Sample:
ocid1.taxpayer.oc1..xxxxxxEXAMPLExxxxxx
   
tax_reg_number
string
on success
Tax registration number.

Sample:
tax_reg_number_example
 
time_plan_upgrade
string
on success
Date of upgrade/conversion when planType changed from FREE_TIER to PAYG

Sample:
2013-10-20T19:20:30+01:00
 
time_start
string
on success
Start date of the subscription.

Sample:
2013-10-20T19:20:30+01:00
 
upgrade_state
string
on success
Status of the upgrade.

Sample:
PROMO
 
upgrade_state_details
string
on success
This field is used to describe the Upgrade State in case of error (E.g. Upgrade failure caused by interfacing Tax details- TaxError)

Sample:
TAX_ERROR


Authors

  • Oracle (@oracle)