phoenixnap / phoenixnap.bmc / 1.17.0 / module / reservation Create reservation on phoenixNAP Bare Metal Cloud. | "added in version" 1.0.0 of phoenixnap.bmc" Authors: Pavle Jojkic (@pajuga) <pavlej@phoenixnap.com>, Goran Jelenic (@goranje) <goranje@phoenixnap.com> preview | supported by certifiedphoenixnap.bmc.reservation (1.17.0) — module
Install with ansible-galaxy collection install phoenixnap.bmc:==1.17.0
collections: - name: phoenixnap.bmc version: 1.17.0
Creates new package reservation for authenticated account.
This module has a dependency on requests
# All the examples assume that you have file config.yaml with your 'clientId' and 'clientSecret' # in location: ~/.pnap/config.yaml - name: Create new reservation hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: Create a reservation phoenixnap.bmc.reservation: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" sku: XXX-XXX-XXX auto_renew: true state: present register: output - name: Print the reservation information ansible.builtin.debug: var: output.reservations
sku: description: The sku code of product pricing plan. required: true type: str state: choices: - present default: present description: Indicate desired state of the target. type: str convert: description: new SKU. All reservations with the given SKU will be converted to new ones. type: str client_id: description: Client ID (Application Management) type: str auto_renew: description: A flag indicating whether the reservation will auto-renew. ALL reservations with the given SKU will be affected. type: bool client_secret: description: Client Secret (Application Management) type: str
reservations: contains: assignedResourceId: description: The resource ID currently being assigned to Reservation. returned: always sample: 83604275-bdba-490a-b87a-978e8dffdb14 type: str autoRenew: description: A flag indicating whether the reservation will auto-renew returned: always sample: true type: bool endDateTime: description: The point in time (in UTC) when the reservation end. returned: always type: str id: description: The reservation identifier. returned: always sample: 83604275-bdba-490a-b87a-978e8dffdb14 type: str initialInvoiceModel: description: Reservations created with initial invoice model ON_CREATION will be invoiced on same date when reservation is created. returned: always sample: ON_CREATION type: str lastRenewalDateTime: description: The point in time (in UTC) when the reservation was renewed last. returned: always type: str location: description: The location code. returned: always sample: PHX type: str nextBillingDate: description: Next billing date for Reservation. returned: always sample: '2020-04-19' type: str nextRenewalDateTime: description: The point in time (in UTC) when the reservation will be renewed if auto renew is set to true. returned: always type: str price: description: Reservation price returned: always sample: 175 type: int priceUnit: description: The unit to which the price applies. returned: always sample: HOUR type: str productCategory: description: The product category. returned: always sample: server type: str productCode: description: The code identifying the product. This code has significant across all locations. returned: always sample: d1.tiny type: str reservationModel: description: The Reservation Model. returned: always sample: ONE_MONTH_RESERVATION type: str sku: description: The sku that will be applied to this reservation. It is useful to find out the price by querying the /product endpoint. returned: always sample: XXX-XXX-XXX type: str startDateTime: description: The point in time (in UTC) when the reservation starts.. returned: always type: str description: The reservations information as list returned: success type: complex