<spanid="vmware-vmc-draas-api-client-module"></span><h2>vmware.vmc.draas.api_client module<aclass="headerlink"href="#module-vmware.vmc.draas.api_client"title="Permalink to this headline">¶</a></h2>
<p>VMC DRaaS APIs</p>
<ulclass="simple">
<li><p>All VMware Cloud APIs require a valid authentication token; which can be obtained by issuing a <cite>POST</cite>: <codeclass="docutils literal notranslate"><spanclass="pre">`</span>  <spanclass="pre">curl</span><spanclass="pre">-s</span><spanclass="pre">-X</span><spanclass="pre">POST</span><spanclass="pre">\</span>      <spanclass="pre">-d</span><spanclass="pre">"refresh_token=${REFRESH_TOKEN}"</span><spanclass="pre">\</span>      <spanclass="pre">https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize</span><spanclass="pre">|</span><spanclass="pre">jq</span><spanclass="pre">-r</span><spanclass="pre">.access_token</span>  <spanclass="pre">`</span></code> * This CSP API is defined at: <aclass="reference external"href="https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST">https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST</a> * The <cite>refresh_token</cite> used to get a valid authentication token can be obtained after successful login to following URL via a web browser: <aclass="reference external"href="https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens">https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens</a>. * Most VMware Cloud APIs require an org identifier. This can be obtained by issuing a <cite>GET</cite> on <cite>/vmc/api/orgs</cite> and extracting the <cite>id</cite> field * Most VMC DRaaS APIs require a sddc identifier. This can be obtained by issuing a <cite>GET</cite> on <cite>/vmc/api/orgs/{org}/sddcs</cite> and extracting the <cite>id</cite> field # noqa: E501</p></li>
<codeclass="sig-name descname">close</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.close"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">deserialize</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">response</span></em>, <emclass="sig-param"><spanclass="n">response_type</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.deserialize"title="Permalink to this definition">¶</a></dt>
<dd><p>Deserializes response into an object.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>response</strong>– RESTResponse object to be deserialized.</p></li>
<li><p><strong>response_type</strong>– class literal for
deserialized object, or string of class name.</p></li>
<codeclass="sig-name descname">files_parameters</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">files</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.files_parameters"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">parameters_to_tuples</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">params</span></em>, <emclass="sig-param"><spanclass="n">collection_formats</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.parameters_to_tuples"title="Permalink to this definition">¶</a></dt>
<dd><p>Get parameters as list of tuples, formatting collections.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>params</strong>– Parameters as dict or list of two-tuples</p></li>
<emclass="property">property </em><codeclass="sig-name descname">pool</code><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.pool"title="Permalink to this definition">¶</a></dt>
<dd><p>Create thread pool on first request
avoids instantiating unused threadpool for blocking clients.</p>
<codeclass="sig-name descname">sanitize_for_serialization</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">obj</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.sanitize_for_serialization"title="Permalink to this definition">¶</a></dt>
<dd><p>Builds a JSON POST object.</p>
<p>If obj is None, return None.
If obj is str, int, long, float, bool, return directly.
If obj is datetime.datetime, datetime.date</p>
<blockquote>
<div><p>convert to string in iso8601 format.</p>
</div></blockquote>
<p>If obj is list, sanitize each element in the list.
If obj is dict, return the dict.
If obj is OpenAPI model, return the properties dict.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>obj</strong>– The data to serialize.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The serialized form of data.</p>
<codeclass="sig-name descname">select_header_accept</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">accepts</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.select_header_accept"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <cite>Accept</cite> based on an array of accepts provided.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>accepts</strong>– List of headers.</p>
<codeclass="sig-name descname">select_header_content_type</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">content_types</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.select_header_content_type"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <cite>Content-Type</cite> based on an array of content_types provided.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>content_types</strong>– List of content-types.</p>
<codeclass="sig-name descname">set_default_header</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">header_name</span></em>, <emclass="sig-param"><spanclass="n">header_value</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.set_default_header"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">update_params_for_auth</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">headers</span></em>, <emclass="sig-param"><spanclass="n">querys</span></em>, <emclass="sig-param"><spanclass="n">auth_settings</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.update_params_for_auth"title="Permalink to this definition">¶</a></dt>
<dd><p>Updates header and query params based on authentication setting.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>headers</strong>– Header parameters dict to be updated.</p></li>
<li><p><strong>querys</strong>– Query parameters tuple list to be updated.</p></li>
<emclass="property">property </em><codeclass="sig-name descname">user_agent</code><aclass="headerlink"href="#vmware.vmc.draas.api_client.ApiClient.user_agent"title="Permalink to this definition">¶</a></dt>
<spanid="vmware-vmc-draas-configuration-module"></span><h2>vmware.vmc.draas.configuration module<aclass="headerlink"href="#module-vmware.vmc.draas.configuration"title="Permalink to this headline">¶</a></h2>
<p>VMC DRaaS APIs</p>
<ulclass="simple">
<li><p>All VMware Cloud APIs require a valid authentication token; which can be obtained by issuing a <cite>POST</cite>: <codeclass="docutils literal notranslate"><spanclass="pre">`</span>  <spanclass="pre">curl</span><spanclass="pre">-s</span><spanclass="pre">-X</span><spanclass="pre">POST</span><spanclass="pre">\</span>      <spanclass="pre">-d</span><spanclass="pre">"refresh_token=${REFRESH_TOKEN}"</span><spanclass="pre">\</span>      <spanclass="pre">https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize</span><spanclass="pre">|</span><spanclass="pre">jq</span><spanclass="pre">-r</span><spanclass="pre">.access_token</span>  <spanclass="pre">`</span></code> * This CSP API is defined at: <aclass="reference external"href="https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST">https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST</a> * The <cite>refresh_token</cite> used to get a valid authentication token can be obtained after successful login to following URL via a web browser: <aclass="reference external"href="https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens">https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens</a>. * Most VMware Cloud APIs require an org identifier. This can be obtained by issuing a <cite>GET</cite> on <cite>/vmc/api/orgs</cite> and extracting the <cite>id</cite> field * Most VMC DRaaS APIs require a sddc identifier. This can be obtained by issuing a <cite>GET</cite> on <cite>/vmc/api/orgs/{org}/sddcs</cite> and extracting the <cite>id</cite> field # noqa: E501</p></li>
<codeclass="sig-name descname">assert_hostname</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.assert_hostname"title="Permalink to this definition">¶</a></dt>
<dd><p>Set this to True/False to enable/disable SSL hostname verification.</p>
<codeclass="sig-name descname">auth_settings</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.auth_settings"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets Auth Settings dict for api client.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The Auth Settings information dict.</p>
<codeclass="sig-name descname">cert_file</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.cert_file"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">connection_pool_maxsize</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.connection_pool_maxsize"title="Permalink to this definition">¶</a></dt>
<dd><p>urllib3 connection pool’s maximum number of connections saved
per pool. urllib3 uses 1 connection as default value, but this is
not the best value when you are making a lot of possibly parallel
requests to the same host, which is often the case here.
cpu_count * 5 is used as default value to increase performance.</p>
<emclass="property">property </em><codeclass="sig-name descname">debug</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.debug"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">get_api_key_with_prefix</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">identifier</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.get_api_key_with_prefix"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets API key (with prefix if set).</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>identifier</strong>– The identifier of apiKey.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The token for api key authentication.</p>
<codeclass="sig-name descname">get_basic_auth_token</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.get_basic_auth_token"title="Permalink to this definition">¶</a></dt>
<emclass="property">classmethod </em><codeclass="sig-name descname">get_default_copy</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.get_default_copy"title="Permalink to this definition">¶</a></dt>
<dd><p>Return new instance of configuration.</p>
<p>This method returns newly created, based on default constructor,
object of Configuration class or returns a copy of default
configuration passed by the set_default method.</p>
<codeclass="sig-name descname">get_host_from_settings</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">index</span></em>, <emclass="sig-param"><spanclass="n">variables</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.get_host_from_settings"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets host URL based on the index and variables
:param index: array index of the host settings
:param variables: hash of variable and the corresponding value
<codeclass="sig-name descname">get_host_settings</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.get_host_settings"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an array of host settings</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>An array of host settings</p>
<codeclass="sig-name descname">host</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.host"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key_file</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.key_file"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">logger</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.logger"title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="sig-name descname">logger_file</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.logger_file"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">logger_file_handler</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.logger_file_handler"title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="sig-name descname">logger_format</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.logger_format"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">logger_stream_handler</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.logger_stream_handler"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">password</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.password"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">proxy</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.proxy"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">proxy_headers</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.proxy_headers"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">refresh_api_key_hook</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.refresh_api_key_hook"title="Permalink to this definition">¶</a></dt>
<dd><p>function hook to refresh API key if expired</p>
<codeclass="sig-name descname">retries</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.retries"title="Permalink to this definition">¶</a></dt>
<dd><p>Adding retries to override urllib3 default value 3</p>
<codeclass="sig-name descname">safe_chars_for_path_param</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.safe_chars_for_path_param"title="Permalink to this definition">¶</a></dt>
<emclass="property">classmethod </em><codeclass="sig-name descname">set_default</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">default</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.set_default"title="Permalink to this definition">¶</a></dt>
<dd><p>Set default instance of configuration.</p>
<p>It stores default configuration, which can be
returned by get_default_copy method.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>default</strong>– object of Configuration</p>
<codeclass="sig-name descname">ssl_ca_cert</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.ssl_ca_cert"title="Permalink to this definition">¶</a></dt>
<dd><p>Set this to customize the certificate file to verify the peer.</p>
<codeclass="sig-name descname">temp_folder_path</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.temp_folder_path"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">to_debug_report</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.to_debug_report"title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the essential information for debugging.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The report for debugging.</p>
<codeclass="sig-name descname">username</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.username"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">verify_ssl</code><aclass="headerlink"href="#vmware.vmc.draas.configuration.Configuration.verify_ssl"title="Permalink to this definition">¶</a></dt>
<dd><p>SSL/TLS verification
Set this to false to skip verifying SSL certificate when calling API
<spanid="vmware-vmc-draas-exceptions-module"></span><h2>vmware.vmc.draas.exceptions module<aclass="headerlink"href="#module-vmware.vmc.draas.exceptions"title="Permalink to this headline">¶</a></h2>
<p>VMC DRaaS APIs</p>
<ulclass="simple">
<li><p>All VMware Cloud APIs require a valid authentication token; which can be obtained by issuing a <cite>POST</cite>: <codeclass="docutils literal notranslate"><spanclass="pre">`</span>  <spanclass="pre">curl</span><spanclass="pre">-s</span><spanclass="pre">-X</span><spanclass="pre">POST</span><spanclass="pre">\</span>      <spanclass="pre">-d</span><spanclass="pre">"refresh_token=${REFRESH_TOKEN}"</span><spanclass="pre">\</span>      <spanclass="pre">https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize</span><spanclass="pre">|</span><spanclass="pre">jq</span><spanclass="pre">-r</span><spanclass="pre">.access_token</span>  <spanclass="pre">`</span></code> * This CSP API is defined at: <aclass="reference external"href="https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST">https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST</a> * The <cite>refresh_token</cite> used to get a valid authentication token can be obtained after successful login to following URL via a web browser: <aclass="reference external"href="https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens">https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens</a>. * Most VMware Cloud APIs require an org identifier. This can be obtained by issuing a <cite>GET</cite> on <cite>/vmc/api/orgs</cite> and extracting the <cite>id</cite> field * Most VMC DRaaS APIs require a sddc identifier. This can be obtained by issuing a <cite>GET</cite> on <cite>/vmc/api/orgs/{org}/sddcs</cite> and extracting the <cite>id</cite> field # noqa: E501</p></li>
<emclass="property">exception </em><codeclass="sig-prename descclassname">vmware.vmc.draas.exceptions.</code><codeclass="sig-name descname">ApiException</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">status</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">reason</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">http_resp</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.exceptions.ApiException"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="sig-prename descclassname">vmware.vmc.draas.exceptions.</code><codeclass="sig-name descname">ApiKeyError</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">msg</span></em>, <emclass="sig-param"><spanclass="n">path_to_item</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.exceptions.ApiKeyError"title="Permalink to this definition">¶</a></dt>
<dt>Args:</dt><dd><p>msg (str): the exception message</p>
</dd>
<dt>Keyword Args:</dt><dd><dlclass="simple">
<dt>path_to_item (None/list) the path to the exception in the</dt><dd><p>received_data dict</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dlclass="py exception">
<dtid="vmware.vmc.draas.exceptions.ApiTypeError">
<emclass="property">exception </em><codeclass="sig-prename descclassname">vmware.vmc.draas.exceptions.</code><codeclass="sig-name descname">ApiTypeError</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">msg</span></em>, <emclass="sig-param"><spanclass="n">path_to_item</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">valid_classes</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">key_type</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.exceptions.ApiTypeError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="sig-prename descclassname">vmware.vmc.draas.exceptions.</code><codeclass="sig-name descname">ApiValueError</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">msg</span></em>, <emclass="sig-param"><spanclass="n">path_to_item</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.exceptions.ApiValueError"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="sig-prename descclassname">vmware.vmc.draas.exceptions.</code><codeclass="sig-name descname">OpenApiException</code><aclass="headerlink"href="#vmware.vmc.draas.exceptions.OpenApiException"title="Permalink to this definition">¶</a></dt>
<p>The base exception class for all OpenAPIExceptions</p>
</dd></dl>
<dlclass="py function">
<dtid="vmware.vmc.draas.exceptions.render_path">
<codeclass="sig-prename descclassname">vmware.vmc.draas.exceptions.</code><codeclass="sig-name descname">render_path</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">path_to_item</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.exceptions.render_path"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a string representation of a path</p>
<spanid="vmware-vmc-draas-rest-module"></span><h2>vmware.vmc.draas.rest module<aclass="headerlink"href="#module-vmware.vmc.draas.rest"title="Permalink to this headline">¶</a></h2>
<p>VMC DRaaS APIs</p>
<ulclass="simple">
<li><p>All VMware Cloud APIs require a valid authentication token; which can be obtained by issuing a <cite>POST</cite>: <codeclass="docutils literal notranslate"><spanclass="pre">`</span>  <spanclass="pre">curl</span><spanclass="pre">-s</span><spanclass="pre">-X</span><spanclass="pre">POST</span><spanclass="pre">\</span>      <spanclass="pre">-d</span><spanclass="pre">"refresh_token=${REFRESH_TOKEN}"</span><spanclass="pre">\</span>      <spanclass="pre">https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize</span><spanclass="pre">|</span><spanclass="pre">jq</span><spanclass="pre">-r</span><spanclass="pre">.access_token</span>  <spanclass="pre">`</span></code> * This CSP API is defined at: <aclass="reference external"href="https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST">https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST</a> * The <cite>refresh_token</cite> used to get a valid authentication token can be obtained after successful login to following URL via a web browser: <aclass="reference external"href="https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens">https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens</a>. * Most VMware Cloud APIs require an org identifier. This can be obtained by issuing a <cite>GET</cite> on <cite>/vmc/api/orgs</cite> and extracting the <cite>id</cite> field * Most VMC DRaaS APIs require a sddc identifier. This can be obtained by issuing a <cite>GET</cite> on <cite>/vmc/api/orgs/{org}/sddcs</cite> and extracting the <cite>id</cite> field # noqa: E501</p></li>
<emclass="property">class </em><codeclass="sig-prename descclassname">vmware.vmc.draas.rest.</code><codeclass="sig-name descname">RESTClientObject</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">configuration</span></em>, <emclass="sig-param"><spanclass="n">pools_size</span><spanclass="o">=</span><spanclass="default_value">4</span></em>, <emclass="sig-param"><spanclass="n">maxsize</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.rest.RESTClientObject"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">DELETE</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">url</span></em>, <emclass="sig-param"><spanclass="n">headers</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">query_params</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">body</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">_preload_content</span><spanclass="o">=</span><spanclass="default_value">True</span></em>, <emclass="sig-param"><spanclass="n">_request_timeout</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.rest.RESTClientObject.DELETE"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">GET</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">url</span></em>, <emclass="sig-param"><spanclass="n">headers</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">query_params</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">_preload_content</span><spanclass="o">=</span><spanclass="default_value">True</span></em>, <emclass="sig-param"><spanclass="n">_request_timeout</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.rest.RESTClientObject.GET"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">HEAD</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">url</span></em>, <emclass="sig-param"><spanclass="n">headers</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">query_params</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">_preload_content</span><spanclass="o">=</span><spanclass="default_value">True</span></em>, <emclass="sig-param"><spanclass="n">_request_timeout</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.rest.RESTClientObject.HEAD"title="Permalink to this definition">¶</a></dt>
<li><p><strong>body</strong>– request json body, for <cite>application/json</cite></p></li>
<li><p><strong>post_params</strong>– request post parameters,
<cite>application/x-www-form-urlencoded</cite>
and <cite>multipart/form-data</cite></p></li>
<li><p><strong>_preload_content</strong>– if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.</p></li>
<li><p><strong>_request_timeout</strong>– timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="vmware.vmc.draas.rest.RESTResponse">
<emclass="property">class </em><codeclass="sig-prename descclassname">vmware.vmc.draas.rest.</code><codeclass="sig-name descname">RESTResponse</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">resp</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.rest.RESTResponse"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">getheader</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">name</span></em>, <emclass="sig-param"><spanclass="n">default</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.rest.RESTResponse.getheader"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">getheaders</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vmc.draas.rest.RESTResponse.getheaders"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a dictionary of the response headers.</p>
<spanid="module-contents"></span><h2>Module contents<aclass="headerlink"href="#module-vmware.vmc.draas"title="Permalink to this headline">¶</a></h2>
<p>VMC DRaaS APIs</p>
<ulclass="simple">
<li><p>All VMware Cloud APIs require a valid authentication token; which can be obtained by issuing a <cite>POST</cite>: <codeclass="docutils literal notranslate"><spanclass="pre">`</span>  <spanclass="pre">curl</span><spanclass="pre">-s</span><spanclass="pre">-X</span><spanclass="pre">POST</span><spanclass="pre">\</span>      <spanclass="pre">-d</span><spanclass="pre">"refresh_token=${REFRESH_TOKEN}"</span><spanclass="pre">\</span>      <spanclass="pre">https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize</span><spanclass="pre">|</span><spanclass="pre">jq</span><spanclass="pre">-r</span><spanclass="pre">.access_token</span>  <spanclass="pre">`</span></code> * This CSP API is defined at: <aclass="reference external"href="https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST">https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST</a> * The <cite>refresh_token</cite> used to get a valid authentication token can be obtained after successful login to following URL via a web browser: <aclass="reference external"href="https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens">https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens</a>. * Most VMware Cloud APIs require an org identifier. This can be obtained by issuing a <cite>GET</cite> on <cite>/vmc/api/orgs</cite> and extracting the <cite>id</cite> field * Most VMC DRaaS APIs require a sddc identifier. This can be obtained by issuing a <cite>GET</cite> on <cite>/vmc/api/orgs/{org}/sddcs</cite> and extracting the <cite>id</cite> field # noqa: E501</p></li>