oracle.oci.oci_osp_gateway_subscription – Manage a Subscription resource in Oracle Cloud Infrastructure

Note

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

New in version 2.9.0: of oracle.oci

Synopsis

  • This module allows the user to update a Subscription resource in Oracle Cloud Infrastructure

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.
email
string / required
User email
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.
state
string
    Choices:
  • present ←
The state of the Subscription.
Use state=present to update an existing a Subscription.
subscription
dictionary / required
bill_to_cust_account_id
string
Bill to customer Account id.
This parameter is updatable.
billing_address
dictionary
address_key
string
Address identifier.
This parameter is updatable.
city
string
Name of the city.
This parameter is updatable.
company_name
string
Name of the customer company.
This parameter is updatable.
country
string
Country of the address.
This parameter is updatable.
email_address
string
Contact person email address.
This parameter is updatable.
first_name
string
First name of the contact person.
This parameter is updatable.
last_name
string
Last name of the contact person.
This parameter is updatable.
line1
string
Address line 1.
This parameter is updatable.
line2
string
Address line 2.
This parameter is updatable.
postal_code
string
Post code of the address.
This parameter is updatable.
state
string
State of the address.
This parameter is updatable.
currency_code
string
Currency code
This parameter is updatable.
gsi_org_code
string
GSI Subscription external code.
This parameter is updatable.
id
string
Subscription id identifier (OCID).
This parameter is updatable.
is_intent_to_pay
boolean
    Choices:
  • no
  • yes
Payment intension.
This parameter is updatable.
language_code
string
Language short code (en, de, hu, etc)
This parameter is updatable.
organization_id
string
GSI organization external identifier.
This parameter is updatable.
payment_gateway
dictionary
merchant_defined_data
dictionary
cloud_account_name
string
Cloud account name.
This parameter is updatable.
promo_type
string
Promotion type code.
This parameter is updatable.
payment_options
list / elements=dictionary
Payment option list of a subscription.
credit_card_type
string
    Choices:
  • VISA
  • AMEX
  • MASTERCARD
  • DISCOVER
  • JCB
  • DINER
  • ELO
Credit card type.
This parameter is updatable.
Applicable when payment_method is 'CREDIT_CARD'
email_address
string
The email address of the paypal user.
This parameter is updatable.
Applicable when payment_method is 'PAYPAL'
ext_billing_agreement_id
string
Agreement id for the paypal account.
This parameter is updatable.
Applicable when payment_method is 'PAYPAL'
first_name
string
First name of the paypal user.
This parameter is updatable.
Applicable when payment_method is 'PAYPAL'
last_digits
string
Last four digits of the card.
This parameter is updatable.
Applicable when payment_method is 'CREDIT_CARD'
last_name
string
Last name of the paypal user.
This parameter is updatable.
Applicable when payment_method is 'PAYPAL'
name_on_card
string
Name on the credit card.
This parameter is updatable.
Applicable when payment_method is 'CREDIT_CARD'
payment_method
string / required
    Choices:
  • CREDIT_CARD
  • PAYPAL
Payment method
This parameter is updatable.
time_expiration
string
Expired date of the credit card.
This parameter is updatable.
Applicable when payment_method is 'CREDIT_CARD'
wallet_instrument_id
string
Wallet instrument internal id.
This parameter is updatable.
wallet_transaction_id
string
Wallet transaction id.
This parameter is updatable.
plan_type
string
    Choices:
  • FREE_TIER
  • PAYG
Subscription plan type.
This parameter is updatable.
ship_to_cust_acct_role_id
string
Ship to customer account role.
This parameter is updatable.
ship_to_cust_acct_site_id
string
Ship to customer account site address id.
This parameter is updatable.
subscription_plan_number
string / required
Subscription plan number.
This parameter is updatable.
tax_info
dictionary
no_tax_reason_code
string
Tax exemption reason code.
This parameter is updatable.
no_tax_reason_code_details
string
Tax exemption reason description.
This parameter is updatable.
tax_cnpj
string
Brazilian companies' CNPJ number.
This parameter is updatable.
tax_payer_id
string
Tay payer identifier.
This parameter is updatable.
tax_reg_number
string
Tax registration number.
This parameter is updatable.
time_plan_upgrade
string
Date of upgrade/conversion when planType changed from FREE_TIER to PAYG
This parameter is updatable.
time_start
string
Start date of the subscription.
This parameter is updatable.
upgrade_state
string
    Choices:
  • PROMO
  • SUBMITTED
  • ERROR
  • UPGRADED
Status of the upgrade.
This parameter is updatable.
upgrade_state_details
string
    Choices:
  • TAX_ERROR
  • UPGRADE_ERROR
This field is used to describe the Upgrade State in case of error (E.g. Upgrade failure caused by interfacing Tax details- TaxError)
This parameter is updatable.
subscription_id
string / required
Subscription id(OCID).

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: Update subscription
  oci_osp_gateway_subscription:
    # required
    subscription_id: "ocid1.subscription.oc1..xxxxxxEXAMPLExxxxxx"
    osp_home_region: us-phoenix-1
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    subscription:
      # required
      subscription_plan_number: subscription_plan_number_example

      # optional
      id: "ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx"
      plan_type: FREE_TIER
      time_start: time_start_example
      ship_to_cust_acct_site_id: "ocid1.shiptocustacctsite.oc1..xxxxxxEXAMPLExxxxxx"
      ship_to_cust_acct_role_id: "ocid1.shiptocustacctrole.oc1..xxxxxxEXAMPLExxxxxx"
      bill_to_cust_account_id: "ocid1.billtocustaccount.oc1..xxxxxxEXAMPLExxxxxx"
      is_intent_to_pay: true
      currency_code: currency_code_example
      gsi_org_code: gsi_org_code_example
      language_code: language_code_example
      organization_id: "ocid1.organization.oc1..xxxxxxEXAMPLExxxxxx"
      upgrade_state: PROMO
      upgrade_state_details: TAX_ERROR
      tax_info:
        # optional
        tax_payer_id: "ocid1.taxpayer.oc1..xxxxxxEXAMPLExxxxxx"
        tax_reg_number: tax_reg_number_example
        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
      payment_options:
      - # required
        payment_method: CREDIT_CARD

        # optional
        credit_card_type: VISA
        last_digits: last_digits_example
        name_on_card: name_on_card_example
        time_expiration: time_expiration_example
        wallet_instrument_id: "ocid1.walletinstrument.oc1..xxxxxxEXAMPLExxxxxx"
        wallet_transaction_id: "ocid1.wallettransaction.oc1..xxxxxxEXAMPLExxxxxx"
      payment_gateway:
        # optional
        merchant_defined_data:
          # optional
          promo_type: promo_type_example
          cloud_account_name: cloud_account_name_example
      billing_address:
        # optional
        address_key: address_key_example
        line1: line1_example
        line2: line2_example
        city: city_example
        country: country_example
        postal_code: postal_code_example
        state: state_example
        email_address: email_address_example
        company_name: company_name_example
        first_name: first_name_example
        last_name: last_name_example
      time_plan_upgrade: time_plan_upgrade_example
    email: email_example

Return Values

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

Key Returned Description
subscription
complex
on success
Details of the Subscription resource acted upon by the current operation

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)