Files

173 lines
19 KiB
C++

/**
* Hanzo Cloud API
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* DnsApi.h
*
*
*/
#ifndef HANZO_API_DnsApi_H_
#define HANZO_API_DnsApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class DnsApi
{
public:
explicit DnsApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~DnsApi();
/// <summary>
/// Delete a DNS zone
/// </summary>
/// <remarks>
/// Removes one of the calling org&#39;s zones, and the records in it, from the DNS control plane. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
/// <param name="zone"></param>
pplx::task<void> deleteDnsZonesByZone(
utility::string_t zone
) const;
/// <summary>
/// Delete a DNS record
/// </summary>
/// <remarks>
/// Removes one record from one zone. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
/// <param name="zone"></param>
/// <param name="record"></param>
pplx::task<void> deleteDnsZonesByZoneRecordsByRecord(
utility::string_t zone,
utility::string_t record
) const;
/// <summary>
/// Check the DNS control plane
/// </summary>
/// <remarks>
/// Reports whether the DNS control plane is answering. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
pplx::task<void> getDnsHealth(
) const;
/// <summary>
/// List your org&#39;s DNS zones
/// </summary>
/// <remarks>
/// Lists every DNS zone the calling org holds, authoritative and provider-backed alike. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
pplx::task<void> getDnsZones(
) const;
/// <summary>
/// Read one DNS zone
/// </summary>
/// <remarks>
/// Reads one of the calling org&#39;s zones by name. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
/// <param name="zone"></param>
pplx::task<void> getDnsZonesByZone(
utility::string_t zone
) const;
/// <summary>
/// List a zone&#39;s DNS records
/// </summary>
/// <remarks>
/// Lists the records in one zone. A provider-backed zone is read from the provider, which is its source of truth. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
/// <param name="zone"></param>
pplx::task<void> getDnsZonesByZoneRecords(
utility::string_t zone
) const;
/// <summary>
/// Read one DNS record
/// </summary>
/// <remarks>
/// Reads one record of one zone by its id. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
/// <param name="zone"></param>
/// <param name="record"></param>
pplx::task<void> getDnsZonesByZoneRecordsByRecord(
utility::string_t zone,
utility::string_t record
) const;
/// <summary>
/// Amend a DNS record
/// </summary>
/// <remarks>
/// Amends one record of one zone. Only the fields the body carries change; the rest keep the values they hold at the plane. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
/// <param name="zone"></param>
/// <param name="record"></param>
pplx::task<void> patchDnsZonesByZoneRecordsByRecord(
utility::string_t zone,
utility::string_t record
) const;
/// <summary>
/// Push a set of zones and records in one call
/// </summary>
/// <remarks>
/// Replaces the calling org&#39;s zones and their records in bulk. The owning org is the caller&#39;s own validated claim, never the body, so a sync reaches nobody else&#39;s zones. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
pplx::task<void> postDnsSync(
) const;
/// <summary>
/// Create a DNS zone
/// </summary>
/// <remarks>
/// Creates a zone for the calling org — authoritative, or backed by a DNS provider the org has connected. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
pplx::task<void> postDnsZones(
) const;
/// <summary>
/// Create a DNS record
/// </summary>
/// <remarks>
/// Creates a record in one zone. A provider-backed zone is written at the provider first, then mirrored locally so the resolver serves it. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
/// <param name="zone"></param>
pplx::task<void> postDnsZonesByZoneRecords(
utility::string_t zone
) const;
/// <summary>
/// Amend a DNS record
/// </summary>
/// <remarks>
/// Amends one record of one zone. Only the fields the body carries change; this is the same partial update PATCH performs, not a replacement of the whole record. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane&#39;s own, relayed verbatim, and the plane&#39;s answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows. It travels under the CALLER&#39;S OWN identity and substitutes no service credential, which would collapse tenants: the caller&#39;s validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org&#39;s zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host. Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a &#x60;..&#x60; after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
/// </remarks>
/// <param name="zone"></param>
/// <param name="record"></param>
pplx::task<void> putDnsZonesByZoneRecordsByRecord(
utility::string_t zone,
utility::string_t record
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_DnsApi_H_ */