From 55d0660d892ad757c1dab5b8c2f0859406390b6b Mon Sep 17 00:00:00 2001 From: johnsom Date: Mon, 13 Feb 2017 15:28:29 -0800 Subject: [PATCH] Adds v2 load balancer API section This patch adds the load balancer section to the v2 API reference. Change-Id: Ibe5b6372ba859f47e6738e97ff14c66f58514e42 Partial-Bug: #1558385 --- api-ref/source/http-status.yaml | 53 +- api-ref/source/index.rst | 22 +- api-ref/source/parameters.yaml | 347 +++++++++++ .../v2/examples/loadbalancer-create-curl | 1 + .../examples/loadbalancer-create-request.json | 11 + .../loadbalancer-create-response.json | 20 + .../v2/examples/loadbalancer-delete-curl | 1 + .../loadbalancer-full-create-request.json | 87 +++ .../loadbalancer-full-create-response.json | 234 ++++++++ .../source/v2/examples/loadbalancer-show-curl | 1 + .../examples/loadbalancer-show-response.json | 20 + .../v2/examples/loadbalancer-stats-curl | 1 + .../examples/loadbalancer-stats-response.json | 9 + .../v2/examples/loadbalancer-status-curl | 1 + .../loadbalancer-status-response.json | 113 ++++ .../v2/examples/loadbalancer-update-curl | 1 + .../examples/loadbalancer-update-request.json | 7 + .../loadbalancer-update-response.json | 20 + .../v2/examples/loadbalancers-list-curl | 1 + .../examples/loadbalancers-list-response.json | 32 ++ api-ref/source/v2/general.inc | 10 +- api-ref/source/v2/index.rst | 1 + api-ref/source/v2/loadbalancer.inc | 542 ++++++++++++++++++ 23 files changed, 1520 insertions(+), 15 deletions(-) create mode 100644 api-ref/source/v2/examples/loadbalancer-create-curl create mode 100644 api-ref/source/v2/examples/loadbalancer-create-request.json create mode 100644 api-ref/source/v2/examples/loadbalancer-create-response.json create mode 100644 api-ref/source/v2/examples/loadbalancer-delete-curl create mode 100644 api-ref/source/v2/examples/loadbalancer-full-create-request.json create mode 100644 api-ref/source/v2/examples/loadbalancer-full-create-response.json create mode 100644 api-ref/source/v2/examples/loadbalancer-show-curl create mode 100644 api-ref/source/v2/examples/loadbalancer-show-response.json create mode 100644 api-ref/source/v2/examples/loadbalancer-stats-curl create mode 100644 api-ref/source/v2/examples/loadbalancer-stats-response.json create mode 100644 api-ref/source/v2/examples/loadbalancer-status-curl create mode 100644 api-ref/source/v2/examples/loadbalancer-status-response.json create mode 100644 api-ref/source/v2/examples/loadbalancer-update-curl create mode 100644 api-ref/source/v2/examples/loadbalancer-update-request.json create mode 100644 api-ref/source/v2/examples/loadbalancer-update-response.json create mode 100644 api-ref/source/v2/examples/loadbalancers-list-curl create mode 100644 api-ref/source/v2/examples/loadbalancers-list-response.json create mode 100644 api-ref/source/v2/loadbalancer.inc diff --git a/api-ref/source/http-status.yaml b/api-ref/source/http-status.yaml index 779763055e..f9ae08c372 100644 --- a/api-ref/source/http-status.yaml +++ b/api-ref/source/http-status.yaml @@ -1,6 +1,55 @@ 200: default: | - The synchronous request was successful. + Request was successful. +201: + default: | + Request has been fulfilled and new resource created. +202: + default: | + Request is accepted, but processing may take some time. +203: + default: | + Returned information is not full set, but a subset. +204: + default: | + Request fulfilled but service does not return anything. +300: + default: | + The resource corresponds to more than one representation. +400: + default: | + Some content in the request was invalid. +401: + default: | + Access is denied due to invalid credentials. +403: + default: | + Policy does not allow current user to do this operation. +404: + default: | + The requested resource could not be found. +405: + default: | + Method is not valid for this endpoint and resource. +409: + default: | + This resource has an action in progress that would conflict with this + request. +413: + default: | + This operation cannot be completed. +415: + default: | + The entity of the request is in a format not supported by the requested + resource for the method. 500: default: | - The request encountered an unexpected failure. + Something went wrong with the service which prevents it from fulfilling + the request. +501: + default: | + The service does not have the functionality required to fulfill this + request. +503: + default: | + The service cannot handle the request right now. diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst index 40226e9746..22ff0534dd 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -35,6 +35,17 @@ List All Major Versions This fetches all the information about all known major API versions in the deployment. +Response codes +-------------- + +.. rest_status_code:: success http-status.yaml + + - 200 + +.. rest_status_code:: error http-status.yaml + + - 500 + Response -------- @@ -53,14 +64,3 @@ Response Example .. note:: This is just an example output and does not represent the current API versions available. - -Response codes --------------- - -.. rest_status_code:: success http-status.yaml - - - 200 - -.. rest_status_code:: error http-status.yaml - - - 500 diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 532857a111..f827e98245 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -1,3 +1,82 @@ +############################################################################### +# Path fields +############################################################################### +path-loadbalancer-id: + description: | + The ID of the load balancer to query. + in: path + required: true + type: string +############################################################################### +# Query fields +############################################################################### +fields: + description: | + The fields that you want the server to return. + If no ``fields`` query parameter is specified, + the octavia API returns all attributes allowed by the policy settings. + By using the ``fields`` parameter, the API returns only the requested set + of attributes. The ``fields`` parameter can be specified multiple times. + For example, if you specify ``fields=id&fields=name`` in the request URL, + only the ``id`` and ``name`` attributes will be returned. + in: query + required: false + type: string +project_id_query: + description: | + The ID of the project to query. + in: query + required: false + type: string +tenant_id_query: + description: | + The ID of the project to query. (deprecated) + in: query + required: false + type: string + +############################################################################### +# Body fields +############################################################################### +action: + description: | + The action associated with the resource. + in: body + required: true + type: string +active_connections: + description: | + The currently active connections. + in: body + required: true + type: integer +address: + description: | + The IP address of the resource. + in: body + required: true + type: string +admin_state_up: + description: | + The administrative state of the resource, which is + up (``true``) or down (``false``). + in: body + required: true + type: boolean +admin_state_up-default-optional: + description: | + The administrative state of the resource, which is + up (``true``) or down (``false``). Default is ``true``. + in: body + required: false + type: boolean +admin_state_up-optional: + description: | + The administrative state of the resource, which is + up (``true``) or down (``false``). + in: body + required: false + type: boolean api_links: description: | Links to the resources in question. @@ -21,9 +100,277 @@ api_version_status: in: body required: true type: string +bytes_in: + description: | + The total bytes received. + in: body + required: true + type: integer +bytes_out: + description: | + The total bytes sent. + in: body + required: true + type: integer +created_at: + description: | + The UTC date and timestamp when the resource was created. + in: body + required: true + type: string +description: + description: | + A human-readable description for the resource. + in: body + required: true + type: string +description-optional: + description: | + A human-readable description for the resource. + in: body + required: false + type: string +flavor-id: + description: | + The ID of the flavor. + in: body + required: true + type: string +flavor-id-optional: + description: | + The ID of the flavor. + in: body + required: false + type: string +healthmonitor-status: + description: | + The associated healthmonitor status object. + in: body + required: true + type: object +id: + description: | + The ID of the resource. + in: body + required: true + type: string +l7policies-status-object-list: + description: | + A list of L7 policy status objects. + in: body + required: true + type: array +l7rules-status-object-list: + description: | + A list of L7 rule status objects. + in: body + required: true + type: array +listeners: + description: | + The associated listener IDs, if any. + in: body + required: true + type: array +listeners-optional: + description: | + The associated listener IDs, if any. + in: body + required: false + type: array +listeners-status-object-list: + description: | + A list of listener status objects. + in: body + required: true + type: array +loadbalancer: + description: | + A load balancer object. + in: body + required: true + type: object +loadbalancer-id: + description: | + The ID of the load balancer. + in: body + required: true + type: string +loadbalancer-status: + description: | + A load balancer status object. + in: body + required: true + type: object +loadbalancers: + description: | + A list of ``loadbalancer`` objects. + in: body + required: true + type: array +members-status-object-list: + description: | + A list of members status objects. + in: body + required: true + type: array +name: + description: | + Human-readable name of the resource. + in: body + required: true + type: string +name-optional: + description: | + Human-readable name of the resource. + in: body + required: false + type: string +operating_status: + description: | + The operating status of the resource. See :ref:`op_status`. + in: body + required: true + type: string +pools-status-list: + description: | + The list of pools status objects. + in: body + required: true + type: array +pools_ids: + description: | + The associated pool IDs, if any. + in: body + required: true + type: array +project_id: + description: | + The ID of the project owning this resource. + in: body + required: true + type: string +project_id-optional: + description: | + The ID of the project owning this resource. + in: body + required: false + type: string +protocol_port: + description: | + The protocol port number for the resource. + in: body + required: true + type: integer +provider: + description: | + Provider name for the load balancer. + in: body + required: true + type: string +provider-optional: + description: | + Provider name for the load balancer. Default is ``octavia``. + in: body + required: false + type: string +provisioning_status: + description: | + The provisioning status of the resource. See :ref:`prov_status`. + in: body + required: true + type: string +request_errors: + description: | + The total requests that were unable to be fulfilled. + in: body + required: true + type: integer +stats: + description: | + A statistics object. + in: body + required: true + type: object +statuses: + description: | + The status tree of a load balancer object contains all provisioning and + operating statuses for its children. + in: body + required: true + type: object +tenant_id: + description: | + The ID of the project that owns the resource. (deprecated) + in: body + required: false + type: string +total_connections: + description: | + The total connections handled. + in: body + required: true + type: integer +type: + description: | + The type associated with the resource. + in: body + required: true + type: string updated_at: description: | The UTC date and timestamp when the resource was last updated. in: body required: true type: string +vip_address: + description: | + The IP address of the Virtual IP (VIP). + in: body + required: true + type: string +vip_address-optional: + description: | + The IP address of the Virtual IP (VIP). + in: body + required: false + type: string +vip_network_id: + description: | + The ID of the network for the Virtual IP (VIP). + in: body + required: true + type: string +vip_network_id-optional: + description: | + The ID of the network for the Virtual IP (VIP). One of ``vip_network_id``, + ``vip_port_id``, or ``vip_subnet_id`` must be specified. + in: body + required: false + type: string +vip_port_id: + description: | + The ID of the Virtual IP (VIP) port. + in: body + required: true + type: string +vip_port_id-optional: + description: | + The ID of the Virtual IP (VIP) port. One of ``vip_network_id``, + ``vip_port_id``, or ``vip_subnet_id`` must be specified. + in: body + required: false + type: string +vip_subnet_id: + description: | + The ID of the subnet for the Virtual IP (VIP). + in: body + required: true + type: string +vip_subnet_id-optional: + description: | + The ID of the subnet for the Virtual IP (VIP). One of ``vip_network_id``, + ``vip_port_id``, or ``vip_subnet_id`` must be specified. + in: body + required: false + type: string diff --git a/api-ref/source/v2/examples/loadbalancer-create-curl b/api-ref/source/v2/examples/loadbalancer-create-curl new file mode 100644 index 0000000000..8247da247f --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-create-curl @@ -0,0 +1 @@ +curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: " -d '{"loadbalancer": {"description": "My favorite load balancer", "admin_state_up": true, "project_id": "e3cd678b11784734bc366148aa37580e", "flavor": "a7ae5d5a-d855-4f9a-b187-af66b53f4d04", "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", "vip_address": "203.0.113.50", "provider": "octavia", "name": "best_load_balancer"}}' http://198.51.100.10:9876/v2.0/lbaas/loadbalancers diff --git a/api-ref/source/v2/examples/loadbalancer-create-request.json b/api-ref/source/v2/examples/loadbalancer-create-request.json new file mode 100644 index 0000000000..e13e995023 --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-create-request.json @@ -0,0 +1,11 @@ +{ + "loadbalancer": { + "description": "My favorite load balancer", + "admin_state_up": true, + "project_id": "e3cd678b11784734bc366148aa37580e", + "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", + "vip_address": "203.0.113.50", + "provider": "octavia", + "name": "best_load_balancer" + } +} diff --git a/api-ref/source/v2/examples/loadbalancer-create-response.json b/api-ref/source/v2/examples/loadbalancer-create-response.json new file mode 100644 index 0000000000..b43fbbd85a --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-create-response.json @@ -0,0 +1,20 @@ +{ + "loadbalancer": { + "description": "My favorite load balancer", + "admin_state_up": true, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "provisioning_status": "PENDING_CREATE", + "flavor": "", + "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", + "vip_address": "203.0.113.50", + "vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709", + "vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342", + "provider": "octavia", + "created_at": "2017-02-28T00:41:44", + "updated_at": "2017-02-28T00:43:30", + "id": "607226db-27ef-4d41-ae89-f2a800e9c2db", + "operating_status": "ONLINE", + "name": "best_load_balancer" + } +} diff --git a/api-ref/source/v2/examples/loadbalancer-delete-curl b/api-ref/source/v2/examples/loadbalancer-delete-curl new file mode 100644 index 0000000000..5f1c8218ce --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-delete-curl @@ -0,0 +1 @@ +curl -X DELETE -H "X-Auth-Token: " http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/4b9b652c-537a-44bf-bbe8-85a690625597 diff --git a/api-ref/source/v2/examples/loadbalancer-full-create-request.json b/api-ref/source/v2/examples/loadbalancer-full-create-request.json new file mode 100644 index 0000000000..39b57f3c59 --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-full-create-request.json @@ -0,0 +1,87 @@ +{ + "loadbalancer": { + "description": "My favorite load balancer", + "admin_state_up": true, + "project_id": "e3cd678b11784734bc366148aa37580e", + "flavor": "", + "listeners": [ + { + "name": "http_listener", + "protocol": "HTTP", + "protocol_port": 80, + "default_pool": { + "name": "rr_pool", + "protocol": "HTTP", + "lb_algorithm": "ROUND_ROBIN", + "health_monitor": { + "type": "HTTP", + "delay": "3", + "expected_codes": "200,201,202", + "http_method": "GET", + "max_retries": 2, + "timeout": 1, + "url_path": "/index.html" + }, + "members": [ + { + "ip_address": "'192.0.2.16'", + "protocol_port": 80 + }, + { + "ip_address": "'192.0.2.19'", + "protocol_port": 80 + } + ] + } + }, + { + "name": "https_listener", + "protocol": "HTTPS", + "protocol_port": 443, + "default_pool": { + "name": "https_pool" + } + }, + { + "name": "redirect_listener", + "protocol": "HTTP", + "protocol_port": 8080, + "l7policies": [ + { + "action": "REDIRECT_TO_URL", + "name": "redirect_policy", + "redirect_url": "https://www.example.com/", + "admin_state_up": true + } + ] + } + ], + "pools": [ + { + "name": "https_pool", + "protocol": "HTTPS", + "lb_algorithm": "ROUND_ROBIN", + "health_monitor": { + "type": "HTTPS", + "delay": "3", + "max_retries": 2, + "timeout": 1 + }, + "members": [ + { + "ip_address": "'192.0.2.16'", + "protocol_port": 80 + }, + { + "ip_address": "'192.0.2.19'", + "protocol_port": 80 + } + ] + } + ], + "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", + "vip_address": "203.0.113.50", + "provider": "octavia", + "name": "best_load_balancer" + } +} diff --git a/api-ref/source/v2/examples/loadbalancer-full-create-response.json b/api-ref/source/v2/examples/loadbalancer-full-create-response.json new file mode 100644 index 0000000000..41cbe343a7 --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-full-create-response.json @@ -0,0 +1,234 @@ +{ + "loadbalancer": { + "description": "My favorite load balancer", + "admin_state_up": true, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "provisioning_status": "ACTIVE", + "flavor": "", + "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", + "listeners": [ + { + "l7policies": [], + "protocol": "HTTP", + "description": "", + "default_tls_container_ref": null, + "admin_state_up": true, + "default_pool": { + "lb_algorithm": "ROUND_ROBIN", + "protocol": "HTTP", + "description": "", + "admin_state_up": true, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "session_persistence": null, + "healthmonitor": { + "name": "", + "admin_state_up": true, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "delay": 3, + "expected_codes": "200,201,202", + "max_retries": 2, + "http_method": "GET", + "timeout": 1, + "max_retries_down": 3, + "url_path": "/index.html", + "type": "HTTP", + "id": "a8a2aa3f-d099-4752-8265-e6472f8147f9" + }, + "members": [ + { + "name": "", + "weight": 1, + "admin_state_up": true, + "subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "address": "192.0.2.16", + "protocol_port": 80, + "id": "7d19ad6c-d549-453e-a5cd-05382c6be96a" + }, + { + "name": "", + "weight": 1, + "admin_state_up": true, + "subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "address": "192.0.2.19", + "protocol_port": 80, + "id": "a167402b-caa6-41d5-b4d4-bde7f2cbfa5e" + } + ], + "id": "c8cec227-410a-4a5b-af13-ecf38c2b0abb", + "name": "rr_pool" + }, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "default_tls_container_id": null, + "connection_limit": -1, + "sni_container_refs": [], + "protocol_port": 80, + "id": "a99995c6-4f04-4ed3-a37f-ae58f6e7e5e1", + "name": "http_listener" + }, + { + "l7policies": [], + "protocol": "HTTPS", + "description": "", + "default_tls_container_ref": null, + "admin_state_up": true, + "default_pool": { + "lb_algorithm": "ROUND_ROBIN", + "protocol": "HTTPS", + "description": "", + "admin_state_up": true, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "session_persistence": null, + "healthmonitor": { + "name": "", + "admin_state_up": true, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "delay": 3, + "expected_codes": "200,201,202", + "max_retries": 2, + "http_method": "GET", + "timeout": 1, + "max_retries_down": 3, + "url_path": "/index.html", + "type": "HTTPS", + "id": "d5bb7712-26b7-4809-8c14-3b407c0cb00d" + }, + "members": [ + { + "name": "", + "weight": 1, + "admin_state_up": true, + "subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "address": "192.0.2.16", + "protocol_port": 80, + "id": "f83832d5-1f22-45fa-866a-4abea36e0886" + }, + { + "name": "", + "weight": 1, + "admin_state_up": true, + "subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "address": "192.0.2.19", + "protocol_port": 80, + "id": "f83832d5-1f22-45fa-866a-4abea36e0886" + } + ], + "id": "b0577aff-c1f9-40c6-9a3b-7b1d2a669136", + "name": "https_pool" + }, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "default_tls_container_id": null, + "connection_limit": -1, + "sni_container_refs": [], + "protocol_port": 443, + "id": "73c6c564-f215-48e9-91d6-f10bb3454954", + "name": "https_listener" + }, + { + "l7policies": [ + { + "description": "", + "admin_state_up": true, + "rules": [], + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "listener_id": "95de30ec-67f4-437b-b3f3-22c5d9ef9828", + "redirect_url": "https://www.example.com/", + "action": "REDIRECT_TO_URL", + "position": 1, + "id": "d0553837-f890-4981-b99a-f7cbd6a76577", + "name": "redirect_policy" + } + ], + "protocol": "HTTP", + "description": "", + "default_tls_container_ref": null, + "admin_state_up": true, + "default_pool": null, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "default_tls_container_id": null, + "connection_limit": -1, + "sni_container_refs": [], + "protocol_port": 8080, + "id": "95de30ec-67f4-437b-b3f3-22c5d9ef9828", + "name": "redirect_listener" + } + ], + "vip_address": "203.0.113.50", + "vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709", + "vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342", + "provider": "octavia", + "pools": [ + { + "lb_algorithm": "ROUND_ROBIN", + "protocol": "HTTPS", + "description": "", + "admin_state_up": true, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "session_persistence": null, + "healthmonitor": { + "name": "", + "admin_state_up": true, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "delay": 3, + "expected_codes": "200,201,202", + "max_retries": 2, + "http_method": "GET", + "timeout": 1, + "max_retries_down": 3, + "url_path": "/index.html", + "type": "HTTPS", + "id": "d5bb7712-26b7-4809-8c14-3b407c0cb00d" + }, + "members": [ + { + "name": "", + "weight": 1, + "admin_state_up": true, + "subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "address": "192.0.2.16", + "protocol_port": 80, + "id": "f83832d5-1f22-45fa-866a-4abea36e0886" + }, + { + "name": "", + "weight": 1, + "admin_state_up": true, + "subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa", + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "address": "192.0.2.19", + "protocol_port": 80, + "id": "f83832d5-1f22-45fa-866a-4abea36e0886" + } + ], + "id": "b0577aff-c1f9-40c6-9a3b-7b1d2a669136", + "name": "https_pool" + } + ], + "created_at": "2017-02-28T00:41:44", + "updated_at": "2017-02-28T00:43:30", + "id": "607226db-27ef-4d41-ae89-f2a800e9c2db", + "operating_status": "ONLINE", + "name": "best_load_balancer" + } +} diff --git a/api-ref/source/v2/examples/loadbalancer-show-curl b/api-ref/source/v2/examples/loadbalancer-show-curl new file mode 100644 index 0000000000..4c54dcb89b --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-show-curl @@ -0,0 +1 @@ +curl -X GET -H "X-Auth-Token: " http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/8a562351-f0fb-424c-a0af-513461424ea5 diff --git a/api-ref/source/v2/examples/loadbalancer-show-response.json b/api-ref/source/v2/examples/loadbalancer-show-response.json new file mode 100644 index 0000000000..3496551e40 --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-show-response.json @@ -0,0 +1,20 @@ +{ + "loadbalancer": { + "description": "My favorite load balancer", + "admin_state_up": true, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "provisioning_status": "PENDING_CREATE", + "flavor": "", + "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", + "vip_address": "203.0.113.50", + "vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709", + "vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342", + "provider": "octavia", + "created_at": "2017-02-28T00:41:44", + "updated_at": "2017-02-28T00:43:30", + "id": "8a562351-f0fb-424c-a0af-513461424ea5", + "operating_status": "ONLINE", + "name": "best_load_balancer" + } +} diff --git a/api-ref/source/v2/examples/loadbalancer-stats-curl b/api-ref/source/v2/examples/loadbalancer-stats-curl new file mode 100644 index 0000000000..6b6751d1fa --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-stats-curl @@ -0,0 +1 @@ +curl -X GET -H "X-Auth-Token: " http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/4a13c573-623c-4d23-8a9c-581dc17ceb1f/stats diff --git a/api-ref/source/v2/examples/loadbalancer-stats-response.json b/api-ref/source/v2/examples/loadbalancer-stats-response.json new file mode 100644 index 0000000000..68c0f6710c --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-stats-response.json @@ -0,0 +1,9 @@ +{ + "stats": { + "bytes_in": 131342840, + "total_connections": 52378345, + "active_connections": 97258, + "bytes_out": 1549542372, + "request_errors": 0 + } +} diff --git a/api-ref/source/v2/examples/loadbalancer-status-curl b/api-ref/source/v2/examples/loadbalancer-status-curl new file mode 100644 index 0000000000..11a954487b --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-status-curl @@ -0,0 +1 @@ +curl -X GET -H "X-Auth-Token: " http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/bda6f032-80d3-414a-b395-e79c374e3929/status diff --git a/api-ref/source/v2/examples/loadbalancer-status-response.json b/api-ref/source/v2/examples/loadbalancer-status-response.json new file mode 100644 index 0000000000..bef8af469b --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-status-response.json @@ -0,0 +1,113 @@ +{ + "statuses": { + "loadbalancer": { + "name": "excellent_load_balancer", + "provisioning_status": "ACTIVE", + "listeners": [ + { + "name": "HTTP_listener", + "provisioning_status": "ACTIVE", + "pools": [ + { + "name": "HTTP_pool", + "provisioning_status": "ACTIVE", + "healthmonitor": { + "type": "HTTP", + "id": "0b608787-ea2d-48c7-89a1-8b8c24fa3b17", + "name": "HTTP_health_monitor", + "provisioning_status": "ACTIVE" + }, + "members": [ + { + "name": "", + "provisioning_status": "ACTIVE", + "address": "192.0.2.20", + "protocol_port": 80, + "id": "3c6857f4-057a-405a-9134-bdeaa8796c8a", + "operating_status": "ERROR" + }, + { + "name": "", + "provisioning_status": "ACTIVE", + "address": "192.0.2.21", + "protocol_port": 80, + "id": "f7495909-1706-4c91-83b4-641dab6962ac", + "operating_status": "ONLINE" + } + ], + "id": "89a47f78-cf81-480b-ad74-bba4177eeb81", + "operating_status": "DEGRADED" + } + ], + "l7policies": [], + "id": "78febaf6-1e63-47c6-af5f-7b5e23fd7094", + "operating_status": "DEGRADED" + }, + { + "name": "redirect_listener", + "provisioning_status": "ACTIVE", + "pools": [], + "l7policies": [ + { + "action": "REDIRECT_TO_URL", + "rules": [ + { + "type": "PATH", + "id": "27f3007a-a1cb-4e17-9696-0e578d617715", + "provisioning_status": "ACTIVE" + } + ], + "id": "2e8f3139-0673-43f9-aae4-c7a9460e3233", + "name": "redirect_policy", + "provisioning_status": "ACTIVE" + } + ], + "id": "1341fbaf-ad4f-4cfe-a943-ad5e14e664cb", + "operating_status": "ONLINE" + } + ], + "pools": [ + { + "name": "HTTP_pool", + "provisioning_status": "ACTIVE", + "healthmonitor": { + "type": "HTTP", + "id": "0b608787-ea2d-48c7-89a1-8b8c24fa3b17", + "name": "HTTP_health_monitor", + "provisioning_status": "ACTIVE" + }, + "members": [ + { + "name": "", + "provisioning_status": "ACTIVE", + "address": "192.0.2.20", + "protocol_port": 80, + "id": "3c6857f4-057a-405a-9134-bdeaa8796c8a", + "operating_status": "ERROR" + }, + { + "name": "", + "provisioning_status": "ACTIVE", + "address": "192.0.2.21", + "protocol_port": 80, + "id": "f7495909-1706-4c91-83b4-641dab6962ac", + "operating_status": "ONLINE" + } + ], + "id": "89a47f78-cf81-480b-ad74-bba4177eeb81", + "operating_status": "DEGRADED" + }, + { + "name": "source_ip_pool", + "provisioning_status": "ACTIVE", + "healthmonitor": {}, + "members": [], + "id": "8189d6a9-646e-4d23-b742-548dab991951", + "operating_status": "ONLINE" + } + ], + "id": "84faceee-cb97-48d0-93df-9e41d40d4cb4", + "operating_status": "DEGRADED" + } + } +} diff --git a/api-ref/source/v2/examples/loadbalancer-update-curl b/api-ref/source/v2/examples/loadbalancer-update-curl new file mode 100644 index 0000000000..67ca39297c --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-update-curl @@ -0,0 +1 @@ +curl -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: " -d '{"loadbalancer": {"description": "Temporarily disabled load balancer", "admin_state_up": false, "name": "disabled_load_balancer"}' http://198.51.100.10:9876/v2.0/lbaas/loadbalancers/8b6fc468-07d5-4d8b-a0b9-695060e72c31 diff --git a/api-ref/source/v2/examples/loadbalancer-update-request.json b/api-ref/source/v2/examples/loadbalancer-update-request.json new file mode 100644 index 0000000000..eae4567bc8 --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-update-request.json @@ -0,0 +1,7 @@ +{ + "loadbalancer": { + "description": "Temporarily disabled load balancer", + "admin_state_up": false, + "name": "disabled_load_balancer" + } +} diff --git a/api-ref/source/v2/examples/loadbalancer-update-response.json b/api-ref/source/v2/examples/loadbalancer-update-response.json new file mode 100644 index 0000000000..e6c7cb78c7 --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancer-update-response.json @@ -0,0 +1,20 @@ +{ + "loadbalancer": { + "description": "Temporarily disabled load balancer", + "admin_state_up": false, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "provisioning_status": "PENDING_UPDATE", + "flavor": "", + "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", + "vip_address": "203.0.113.50", + "vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709", + "vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342", + "provider": "octavia", + "created_at": "2017-02-28T00:41:44", + "updated_at": "2017-02-28T00:43:30", + "id": "8b6fc468-07d5-4d8b-a0b9-695060e72c31", + "operating_status": "ONLINE", + "name": "disabled_load_balancer" + } +} diff --git a/api-ref/source/v2/examples/loadbalancers-list-curl b/api-ref/source/v2/examples/loadbalancers-list-curl new file mode 100644 index 0000000000..79a83e9c7d --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancers-list-curl @@ -0,0 +1 @@ +curl -X GET -H "X-Auth-Token: " http://198.51.100.10:9876/v2.0/lbaas/loadbalancers?project_id=e3cd678b11784734bc366148aa37580e diff --git a/api-ref/source/v2/examples/loadbalancers-list-response.json b/api-ref/source/v2/examples/loadbalancers-list-response.json new file mode 100644 index 0000000000..67c2a0c6a3 --- /dev/null +++ b/api-ref/source/v2/examples/loadbalancers-list-response.json @@ -0,0 +1,32 @@ +{ + "loadbalancers": [ + { + "description": "My favorite load balancer", + "admin_state_up": true, + "tenant_id": "e3cd678b11784734bc366148aa37580e", + "project_id": "e3cd678b11784734bc366148aa37580e", + "provisioning_status": "ACTIVE", + "flavor": "a7ae5d5a-d855-4f9a-b187-af66b53f4d04", + "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a", + "listeners": [ + { + "id": "023f2e34-7806-443b-bfae-16c324569a3d" + } + ], + "vip_address": "203.0.113.50", + "vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709", + "vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342", + "provider": "octavia", + "pools": [ + { + "id": "9aa16cdc-8d18-47b9-aba9-ec044531a79f" + } + ], + "created_at": "2017-02-28T00:41:44", + "updated_at": "2017-02-28T00:43:30", + "id": "607226db-27ef-4d41-ae89-f2a800e9c2db", + "operating_status": "ONLINE", + "name": "best_load_balancer" + } + ] +} diff --git a/api-ref/source/v2/general.inc b/api-ref/source/v2/general.inc index f09144adcf..9ec9b90a41 100644 --- a/api-ref/source/v2/general.inc +++ b/api-ref/source/v2/general.inc @@ -445,7 +445,8 @@ the client. | Code | Description | +======+================================================================+ | 400 | - Bad request | -| | - Malformed request URI or body requested admin state invalid | +| | - Malformed request URI or body requested | +| | - The request could not be understood | | | - Invalid values entered | | | - Bulk operations disallowed | | | - Validation failed | @@ -454,7 +455,8 @@ the client. +------+----------------------------------------------------------------+ | 401 | - Unauthorized: Access is denied due to invalid credentials | +------+----------------------------------------------------------------+ -| 403 | - The project is over quota for the request | +| 403 | - Policy does not allow current user to do this operation | +| | - The project is over quota for the request | +------+----------------------------------------------------------------+ | 404 | - Not Found | | | - Non existent URI | @@ -483,6 +485,8 @@ update operation is occuring on this member and it is in an immutable state but it is healthy and able to service requests. This situation could occur if the user made a request to update the weight of the member. +.. _op_status: + Operating Status Codes ---------------------- @@ -504,6 +508,8 @@ Operating Status Codes | | status is unknown | +------------+--------------------------------------------------------------+ +.. _prov_status: + Provisioning Status Codes ------------------------- diff --git a/api-ref/source/v2/index.rst b/api-ref/source/v2/index.rst index 2efdb1cbd4..3331ca2bb9 100644 --- a/api-ref/source/v2/index.rst +++ b/api-ref/source/v2/index.rst @@ -14,3 +14,4 @@ General API Overview -------------- Load Balancers -------------- +.. include:: loadbalancer.inc diff --git a/api-ref/source/v2/loadbalancer.inc b/api-ref/source/v2/loadbalancer.inc new file mode 100644 index 0000000000..f74ea35919 --- /dev/null +++ b/api-ref/source/v2/loadbalancer.inc @@ -0,0 +1,542 @@ +.. -*- rst -*- + +List load balancers +=================== + +.. rest_method:: GET /v2.0/lbaas/loadbalancers + +Lists all load balancers for the project. + +Use the ``fields`` query parameter to control which fields are +returned in the response body. Additionally, you can filter results +by using query string parameters. For information, see :ref:`filtering`. + +Administrative users can specify a project ID that is different than their own +to list load balancers for other projects. + +The list might be empty. + +.. rest_status_code:: success ../http-status.yaml + + - 200 + +.. rest_status_code:: error ../http-status.yaml + + - 400 + - 401 + - 500 + +Request +------- + +.. rest_parameters:: ../parameters.yaml + + - fields: fields + - project_id: project_id_query + - tenant_id: tenant_id_query + +Curl Example +------------ + +.. literalinclude:: examples/loadbalancers-list-curl + :language: bash + +Response Parameters +------------------- + +.. rest_parameters:: ../parameters.yaml + + - admin_state_up: admin_state_up + - created_at: created_at + - description: description + - flavor: flavor-id + - id: loadbalancer-id + - listeners: listeners + - loadbalancers: loadbalancers + - name: name + - operating_status: operating_status + - pools: pools_ids + - project_id: project_id + - provider: provider + - provisioning_status: provisioning_status + - tenant_id: tenant_id + - vip_address: vip_address + - vip_network_id: vip_network_id + - vip_port_id: vip_port_id + - vip_subnet_id: vip_subnet_id + +Response Example +---------------- + +.. literalinclude:: examples/loadbalancers-list-response.json + :language: javascript + +Create a load balancer +====================== + +.. rest_method:: POST /v2.0/lbaas/loadbalancers + +Creates a load balancer. + +This operation provisions a new load balancer by using the +configuration that you define in the request object. After the API +validates the request and starts the provisioning process, the API +returns a response object that contains a unique ID and the status +of provisioning the load balancer. + +In the response, the load balancer :ref:`provisioning status` is +``ACTIVE``, ``PENDING_CREATE``, or ``ERROR``. + +If the status is ``PENDING_CREATE``, issue GET +``/v2.0/lbaas/loadbalancers/{loadbalancer_id}`` to view the progress of +the provisioning operation. When the load balancer status changes +to ``ACTIVE``, the load balancer is successfully provisioned and +is ready for further configuration. + +If the API cannot fulfill the request due to insufficient data or +data that is not valid, the service returns the HTTP ``Bad Request +(400)`` response code with information about the failure in the +response body. Validation errors require that you correct the error +and submit the request again. + +Administrative users can specify a project ID that is different than +their own to create load balancers for other projects. + +There are three ways to specify a Virtual IP (VIP) network for the load +balancer: provide a ``vip_port_id``, supply a ``vip_subnet_id``, or provide a +``vip_network_id``. Providing a neutron port ID for the ``vip_port_id`` tells +octavia to use this port for the VIP. Some port settings may be changed or +removed as required by octavia, but the IP address will be retained. +Specifying a neutron subnet ID will tell octavia to create a neutron port +on this subnet and allocate an IP address from the subnet if the +``vip_address`` was not specified. If ``vip_address`` was specified, octavia +will attempt to allocate the ``vip_address`` from the subnet for the VIP +address. Finally, when a ``vip_network_ip`` is specified octavia will select +a subnet from the network, preferring IPv4 over IPv6 subnets. + +An optional ``flavor`` attribute can be used to create the load balancer +using a pre-configured octavia flavor. Flavors are created by the operator +to allow custom load balancer configurations, such as allocating more +memory for the load balancer. + +You can also specify the ``provider`` attribute when you create a +load balancer. The ``provider`` attribute specifies which backend should +be used to create the load balancer. This could be the default provider +(``octavia``) or a vendor supplied ``provider`` if one has been installed. +Setting both a flavor and a provider will result in a conflict error. + +.. rest_status_code:: success ../http-status.yaml + + - 201 + +.. rest_status_code:: error ../http-status.yaml + + - 400 + - 401 + - 403 + - 404 + - 500 + - 503 + +Request +------- + +.. rest_parameters:: ../parameters.yaml + + - admin_state_up: admin_state_up-default-optional + - description: description-optional + - flavor: flavor-id-optional + - listeners: listeners-optional + - loadbalancer: loadbalancer + - name: name-optional + - project_id: project_id-optional + - provider: provider-optional + - tenant_id: tenant_id + - vip_address: vip_address-optional + - vip_network_id: vip_network_id-optional + - vip_port_id: vip_port_id-optional + - vip_subnet_id: vip_subnet_id-optional + +Request Example +---------------- + +.. literalinclude:: examples/loadbalancer-create-request.json + :language: javascript + +Curl Example +------------ + +.. literalinclude:: examples/loadbalancer-create-curl + :language: bash + +Response Parameters +------------------- + +.. rest_parameters:: ../parameters.yaml + + - admin_state_up: admin_state_up + - created_at: created_at + - description: description + - flavor: flavor-id + - id: loadbalancer-id + - listeners: listeners + - loadbalancer: loadbalancer + - name: name + - operating_status: operating_status + - pools: pools_ids + - project_id: project_id + - provider: provider + - provisioning_status: provisioning_status + - tenant_id: tenant_id + - vip_address: vip_address + - vip_network_id: vip_network_id + - vip_port_id: vip_port_id + - vip_subnet_id: vip_subnet_id + +Response Example +---------------- + +.. literalinclude:: examples/loadbalancer-create-response.json + :language: javascript + +Creating a Fully Populated Load Balancer +---------------------------------------- + +You can configure all documented features of the load balancer at +creation time by specifying the additional elements or attributes +in the request. + +Request Example +--------------- + +.. literalinclude:: examples/loadbalancer-full-create-request.json + :language: javascript + +Response Example +---------------- + +.. literalinclude:: examples/loadbalancer-full-create-response.json + :language: javascript + +Show load balancer details +========================== + +.. rest_method:: GET /v2.0/lbaas/loadbalancers/{loadbalancer_id} + +Shows the details of a load balancer. + +If you are not an administrative user and the load balancer object does not +belong to your project, the service returns the HTTP ``Forbidden (403)`` +response code. + +This operation does not require a request body. + +.. rest_status_code:: success ../http-status.yaml + + - 200 + +.. rest_status_code:: error ../http-status.yaml + + - 401 + - 403 + - 404 + - 500 + +Request +------- + +.. rest_parameters:: ../parameters.yaml + + - loadbalancer_id: path-loadbalancer-id + +Curl Example +------------ + +.. literalinclude:: examples/loadbalancer-show-curl + :language: bash + +Response Parameters +------------------- + +.. rest_parameters:: ../parameters.yaml + + - admin_state_up: admin_state_up + - created_at: created_at + - description: description + - flavor: flavor-id + - id: loadbalancer-id + - loadbalancer: loadbalancer + - listeners: listeners + - name: name + - operating_status: operating_status + - pools: pools_ids + - project_id: project_id + - provider: provider + - provisioning_status: provisioning_status + - tenant_id: tenant_id + - vip_address: vip_address + - vip_network_id: vip_network_id + - vip_port_id: vip_port_id + - vip_subnet_id: vip_subnet_id + +Response Example +---------------- + +.. literalinclude:: examples/loadbalancer-show-response.json + :language: javascript + +Update a load balancer +====================== + +.. rest_method:: PUT /v2.0/lbaas/loadbalancers/{loadbalancer_id} + +Updates a load balancer. + +If the request is valid, the service returns the ``Accepted (202)`` +response code. To confirm the update, check that the load balancer +provisioning status is ``ACTIVE``. If the status is +``PENDING_UPDATE``, use a GET operation to poll the load balancer +object for changes. + +This operation returns the updated load balancer object with the +``ACTIVE``, ``PENDING_UPDATE``, or ``ERROR`` provisioning status. + +.. rest_status_code:: success ../http-status.yaml + + - 202 + +.. rest_status_code:: error ../http-status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 + - 500 + +Request +------- + +.. rest_parameters:: ../parameters.yaml + + - admin_state_up: admin_state_up-optional + - description: description-optional + - loadbalancer: loadbalancer + - loadbalancer_id: path-loadbalancer-id + - name: name-optional + +Request Example +--------------- + +.. literalinclude:: examples/loadbalancer-update-request.json + :language: javascript + +Curl Example +------------ + +.. literalinclude:: examples/loadbalancer-update-curl + :language: bash + +Response Parameters +------------------- + +.. rest_parameters:: ../parameters.yaml + + - admin_state_up: admin_state_up + - created_at: created_at + - description: description + - flavor: flavor-id + - id: loadbalancer-id + - listeners: listeners + - loadbalancer: loadbalancer + - name: name + - operating_status: operating_status + - pools: pools_ids + - project_id: project_id + - provider: provider + - provisioning_status: provisioning_status + - tenant_id: tenant_id + - vip_address: vip_address + - vip_network_id: vip_network_id + - vip_port_id: vip_port_id + - vip_subnet_id: vip_subnet_id + +Response Example +---------------- + +.. literalinclude:: examples/loadbalancer-update-response.json + :language: javascript + +Remove a load balancer +====================== + +.. rest_method:: DELETE /v2.0/lbaas/loadbalancers/{loadbalancer_id} + +Removes a load balancer and its associated configuration from the project. + +The API immediately purges any and all configuration data, depending on the +configuration settings.. You cannot recover it. + +.. rest_status_code:: success ../http-status.yaml + + - 204 + +.. rest_status_code:: error ../http-status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 + - 500 + +Request +------- + +.. rest_parameters:: ../parameters.yaml + + - loadbalancer_id: path-loadbalancer-id + +Curl Example +------------ + +.. literalinclude:: examples/loadbalancer-delete-curl + :language: bash + +Response +-------- + +There is no body content for the response of a successful DELETE request. + +Get load balancer statistics +============================ + +.. rest_method:: GET /v2.0/lbaas/loadbalancers/{loadbalancer_id}/stats + +Shows the current statistics for a load balancer. + +This operation returns the statistics of a load balancer object identified +by loadbalancer_id. + +If you are not an administrative user and the load balancer object does not +belong to your project, the service returns the HTTP ``Forbidden (403)`` +response code. + +This operation does not require a request body. + +.. rest_status_code:: success ../http-status.yaml + + - 200 + +.. rest_status_code:: error ../http-status.yaml + + - 401 + - 403 + - 404 + - 500 + +Request +------- + +.. rest_parameters:: ../parameters.yaml + + - loadbalancer_id: path-loadbalancer-id + +Curl Example +------------ + +.. literalinclude:: examples/loadbalancer-stats-curl + :language: bash + +Response Parameters +------------------- + +.. rest_parameters:: ../parameters.yaml + + - stats: stats + - active_connections: active_connections + - bytes_in: bytes_in + - bytes_out: bytes_out + - request_errors: request_errors + - total_connections: total_connections + +Response Example +---------------- + +.. literalinclude:: examples/loadbalancer-stats-response.json + :language: javascript + +Get the load balancer status tree +================================= + +.. rest_method:: GET /v2.0/lbaas/loadbalancers/{loadbalancer_id}/status + +Shows the status tree for a load balancer. + +This operation returns a status tree for a load balancer object, by load +balancer ID. + +``provisioning_status`` is the status associated with lifecycle of the resource. +See :ref:`prov_status` for descriptions of the status codes. + +``operating_status`` is the observed status of the resource. +See :ref:`op_status` for descriptions of the status codes. + +If you are not an administrative user and the load balancer object does not +belong to your project, the service returns the HTTP ``Forbidden (403)`` +response code. + +If the operation succeeds, the returned element is a status tree that contains +the load balancer and all provisioning and operating statuses for its children. + +.. rest_status_code:: success ../http-status.yaml + + - 200 + +.. rest_status_code:: error ../http-status.yaml + + - 401 + - 403 + - 404 + - 500 + +Request +------- + +.. rest_parameters:: ../parameters.yaml + + - loadbalancer_id: path-loadbalancer-id + +Curl Example +------------ + +.. literalinclude:: examples/loadbalancer-status-curl + :language: bash + +Response Parameters +------------------- + +.. rest_parameters:: ../parameters.yaml + + - action: action + - address: address + - healthmonitor: healthmonitor-status + - id: id + - l7policies: l7policies-status-object-list + - l7rules: l7rules-status-object-list + - listeners: listeners-status-object-list + - loadbalancer: loadbalancer-status + - members: members-status-object-list + - name: name + - operating_status: operating_status + - pools: pools-status-list + - protocol_port: protocol_port + - provisioning_status: provisioning_status + - statuses: statuses + - type: type + +Response Example +---------------- + +.. literalinclude:: examples/loadbalancer-status-response.json + :language: javascript