Waldur Azure ============ Waldur Azure /api/azure/ ----------- Supported actions and methods: .. topic:: ``/api/azure/`` Methods: ``GET``, ``POST`` Supported fields for creation: * project -- ``link to /api/projects//`` * **customer** -- ``link to /api/customers//`` * **settings** -- ``link to /api/service-settings//`` * **username** -- ``string`` (In the format of GUID) * **certificate** -- ``file`` (X509 certificate in .PEM format) * available_for_all -- ``boolean`` (Service will be automatically added to all customers projects if it is available for all) * scope -- ``link to any: /api/azure-virtualmachines//`` (VM that contains service) * **cloud_service_name** -- ``string`` (Cloud service group to assign all connected SPLs to) * location -- ``choice('Central US', 'East Asia', 'East US 2', 'Japan West', 'North Europe', 'South Central US', 'Southeast Asia')`` (Azure region where to provision resources (default: "Central US")) * images_regex -- ``string`` (Regular expression to limit images list) To list all services without regard to its type, run **GET** against */api/services/* as an authenticated user. To list services of specific type issue **GET** to specific endpoint from a list above as a customer owner. Individual endpoint used for every service type. To create a service, issue a **POST** to specific endpoint from a list above as a customer owner. Individual endpoint used for every service type. You can create service based on shared service settings. Example: .. code-block:: http POST /api/digitalocean/ HTTP/1.1 Content-Type: application/json Accept: application/json Authorization: Token c84d653b9ec92c6cbac41c706593e66f567a7fa4 Host: example.com { "name": "Common DigitalOcean", "customer": "http://example.com/api/customers/1040561ca9e046d2b74268600c7e1105/", "settings": "http://example.com/api/service-settings/93ba615d6111466ebe3f792669059cb4/" } Or provide your own credentials. Example: .. code-block:: http POST /api/oracle/ HTTP/1.1 Content-Type: application/json Accept: application/json Authorization: Token c84d653b9ec92c6cbac41c706593e66f567a7fa4 Host: example.com { "name": "My Oracle", "customer": "http://example.com/api/customers/1040561ca9e046d2b74268600c7e1105/", "backend_url": "https://oracle.example.com:7802/em", "username": "admin", "password": "secret" } .. topic:: ``/api/azure//`` Methods: ``GET``, ``PUT``, ``PATCH``, ``DELETE`` Supported fields for update: * available_for_all -- ``boolean`` (Service will be automatically added to all customers projects if it is available for all) .. topic:: ``/api/azure//link/`` Methods: ``GET``, ``POST`` To get a list of resources available for import, run **GET** against *//link/* as an authenticated user. Optionally project_uuid parameter can be supplied for services requiring it like OpenStack. To import (link with Waldur) resource issue **POST** against the same endpoint with resource id. .. code-block:: http POST /api/openstack/08039f01c9794efc912f1689f4530cf0/link/ HTTP/1.1 Content-Type: application/json Accept: application/json Authorization: Token c84d653b9ec92c6cbac41c706593e66f567a7fa4 Host: example.com { "backend_id": "bd5ec24d-9164-440b-a9f2-1b3c807c5df3", "project": "http://example.com/api/projects/e5f973af2eb14d2d8c38d62bcbaccb33/" } .. topic:: ``/api/azure//managed_resources/`` Methods: ``GET`` .. topic:: ``/api/azure//unlink/`` Methods: ``POST`` Unlink all related resources, service project link and service itself. /api/azure-virtualmachines/ --------------------------- Supported actions and methods: .. topic:: ``/api/azure-virtualmachines/`` Methods: ``GET``, ``POST`` Supported fields for creation: * **name** -- ``string`` * description -- ``string`` * tags -- ``TagListSerializerField`` * **service_project_link** -- ``link to /api/azure-service-project-link//`` * **image** -- ``link to /api/azure-images//`` * **size** -- ``link to /api/azure-sizes//`` * **user_username** -- ``string`` * **user_password** -- ``string`` * user_data -- ``string`` (Additional data that will be added to instance on provisioning) .. topic:: ``/api/azure-virtualmachines//`` Methods: ``GET``, ``PUT``, ``PATCH``, ``DELETE`` Supported fields for update: * **name** -- ``string`` * description -- ``string`` * tags -- ``TagListSerializerField`` .. topic:: ``/api/azure-virtualmachines//pull/`` Methods: ``POST`` .. topic:: ``/api/azure-virtualmachines//rdp/`` Methods: ``GET`` .. topic:: ``/api/azure-virtualmachines//restart/`` Methods: ``POST`` .. topic:: ``/api/azure-virtualmachines//start/`` Methods: ``POST`` .. topic:: ``/api/azure-virtualmachines//stop/`` Methods: ``POST`` /api/azure-sizes/ ----------------- Supported actions and methods: .. topic:: ``/api/azure-sizes/`` Methods: ``GET`` .. topic:: ``/api/azure-sizes//`` Methods: ``GET`` /api/azure-service-project-link/ -------------------------------- Supported actions and methods: .. topic:: ``/api/azure-service-project-link/`` Methods: ``GET``, ``POST`` Supported fields for creation: * **project** -- ``link to /api/projects//`` * **service** -- ``link to /api/azure//`` To get a list of connections between a project and an service, run **GET** against service_project_link_url as authenticated user. Note that a user can only see connections of a project where a user has a role. If service has `available_for_all` flag, project-service connections are created automatically. Otherwise, in order to be able to provision resources, service must first be linked to a project. To do that, **POST** a connection between project and a service to service_project_link_url as stuff user or customer owner. .. topic:: ``/api/azure-service-project-link//`` Methods: ``GET``, ``PUT``, ``PATCH``, ``DELETE`` Supported fields for update: * **project** -- ``link to /api/projects//`` * **service** -- ``link to /api/azure//`` To remove a link, issue **DELETE** to URL of the corresponding connection as stuff user or customer owner. /api/azure-images/ ------------------ Supported actions and methods: .. topic:: ``/api/azure-images/`` Methods: ``GET`` .. topic:: ``/api/azure-images//`` Methods: ``GET``