<spanid="com-vmware-nsx-vmc-app-client-module"></span><h2>com.vmware.nsx_vmc_app_client module<aclass="headerlink"href="#module-com.vmware.nsx_vmc_app_client"title="Permalink to this headline">¶</a></h2>
<emclass="property">class </em><codeclass="descclassname">com.vmware.nsx_vmc_app_client.</code><codeclass="descname">StubFactory</code><spanclass="sig-paren">(</span><em>stub_config</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.nsx_vmc_app_client.StubFactory"title="Permalink to this definition">¶</a></dt>
<spanid="com-vmware-nsx-vmc-app-client-for-vmc-module"></span><h2>com.vmware.nsx_vmc_app_client_for_vmc module<aclass="headerlink"href="#module-com.vmware.nsx_vmc_app_client_for_vmc"title="Permalink to this headline">¶</a></h2>
<p>Convenience methods to get API clients for NSX APIs in VMC</p>
<emclass="property">class </em><codeclass="descclassname">com.vmware.nsx_vmc_app_client_for_vmc.</code><codeclass="descname">CSPSecurityContextFilter</code><spanclass="sig-paren">(</span><em>session</em>, <em>refresh_token</em>, <em>refresh_url</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.nsx_vmc_app_client_for_vmc.CSPSecurityContextFilter"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>session</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">requests.Session</span></code>) – Requests Session object to use for making HTTP calls</li>
<li><strong>refresh_token</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Refresh token to use for obtaining an access
token</li>
<li><strong>refresh_url</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – URL that allows exchanging a refresh token for an
<codeclass="descname">get_max_retries</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.nsx_vmc_app_client_for_vmc.CSPSecurityContextFilter.get_max_retries"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_security_context</code><spanclass="sig-paren">(</span><em>on_error</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.nsx_vmc_app_client_for_vmc.CSPSecurityContextFilter.get_security_context"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve security context. If this method is called after an error
occured, then a new access token is obtained using the refresh
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>on_error</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">bool</span></code>) – Whether this method is called after getting an error</td>
<codeclass="descname">should_retry</code><spanclass="sig-paren">(</span><em>error_value</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.nsx_vmc_app_client_for_vmc.CSPSecurityContextFilter.should_retry"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns whether the request should be retried or not based on the error
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>stub_factory_class</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">type</span></code>) – Which stub factory class to use</li>
<li><strong>vmc_url</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – URL of the VMC service</li>
<li><strong>csp_url</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – URL of the CSP service</li>
<li><strong>org_id</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – ID of the VMC organization</li>
<li><strong>sddc_id</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – ID of the VMC Software-Defined Data Center (SDDC)</li>
<codeclass="descclassname">com.vmware.nsx_vmc_app_client_for_vmc.</code><codeclass="descname">create_nsx_vmc_app_client_for_vmc</code><spanclass="sig-paren">(</span><em>refresh_token</em>, <em>org_id</em>, <em>sddc_id</em>, <em>session=None</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.nsx_vmc_app_client_for_vmc.create_nsx_vmc_app_client_for_vmc"title="Permalink to this definition">¶</a></dt>
<dd><p>Helper method to create an instance of the VMC NSX VMC app API client</p>
<li><strong>org_id</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – ID of the VMC organization</li>
<li><strong>sddc_id</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – ID of the VMC Software-Defined Data Center (SDDC)</li>
<li><strong>session</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">requests.Session</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Requests HTTP session instance. If not specified, then one
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.