phoenixnap / phoenixnap.bmc / 1.17.0 / module / product_availability_info Gather information about products availability | "added in version" 1.3.0 of phoenixnap.bmc" Authors: Pavle Jojkic (@pajuga) <pavlej@phoenixnap.com>, Goran Jelenic (@goranje) <goranje@phoenixnap.com> preview | supported by certifiedphoenixnap.bmc.product_availability_info (1.17.0) — module
Install with ansible-galaxy collection install phoenixnap.bmc:==1.17.0
collections: - name: phoenixnap.bmc version: 1.17.0
Gather information about products availability.
This module has a dependency on requests
API is documented at U(https://developers.phoenixnap.com/docs/bmc-billing/1/routes/product-availability/get).
# All the examples assume that you have file config.yaml with your 'clientId' and 'clientSecret' # in location: ~/.pnap/config.yaml - name: Information about all products hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: Information about all available products phoenixnap.bmc.product_availability_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" register: output - name: Print the gathered infos ansible.builtin.debug: var: output.product_availabilities
- name: Information about all server products at the Phoenix location hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: Information about all available server products at a specific location phoenixnap.bmc.product_availability_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" product_category: - SERVER location: - PHX register: output - name: Print the gathered infos ansible.builtin.debug: var: output.product_availabilities
location: description: The location code. elements: str type: list solution: description: solution elements: str type: list client_id: description: Client ID (Application Management) type: str min_quantity: description: Minimal quantity of product needed. Minimum, maximum and default values might differ for different products. type: int product_code: description: Product code. elements: str type: list client_secret: description: Client Secret (Application Management) type: str product_category: description: Product category. elements: str type: list show_only_min_quantity_available: description: - Show only locations where product with requested quantity is available or all locations where product is offered. - Default value is true type: bool
products: contains: locationAvailabilityDetails: contains: availableQuantity: description: Total available quantity of product in specific location. Max value is 10. sample: 5 type: int location: description: The location code. sample: PHX type: list minQuantityAvailable: description: Is product available in specific location for requested quantity. sample: true type: bool minQuantityRequested: description: Requested quantity. sample: 2 type: int solutions: description: Solutions supported in specific location for a product. type: list description: Info about location, solutions and availability for a product. returned: always type: list productCategory: description: The product category. returned: always sample: server type: str productCode: description: Product code. returned: always sample: d1.c1.small type: str description: The products information as list returned: success type: list