1
0
mirror of https://github.com/vmware/vsphere-automation-sdk-python.git synced 2024-11-22 09:39:58 -05:00
vsphere-automation-sdk-python/vmc/vmware.vapi.vmc.html
2019-04-15 10:06:35 +00:00

358 lines
15 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>vmware.vapi.vmc package &mdash; VMware Cloud on AWS Console API 1.3.1 documentation</title>
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="vmware.vapi package" href="vmware.vapi.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> VMware Cloud on AWS Console API
</a>
<div class="version">
1.3.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="com.html">com package</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="vmware.html">vmware package</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="vmware.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l3 current"><a class="reference internal" href="vmware.vapi.html">vmware.vapi package</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="vmware.vapi.html#subpackages">Subpackages</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">VMware Cloud on AWS Console API</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li><a href="vmware.html">vmware package</a> &raquo;</li>
<li><a href="vmware.vapi.html">vmware.vapi package</a> &raquo;</li>
<li>vmware.vapi.vmc package</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/vmware.vapi.vmc.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="module-vmware.vapi.vmc">
<span id="vmware-vapi-vmc-package"></span><h1>vmware.vapi.vmc package<a class="headerlink" href="#module-vmware.vapi.vmc" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-vmware.vapi.vmc.client">
<span id="vmware-vapi-vmc-client-module"></span><h2>vmware.vapi.vmc.client module<a class="headerlink" href="#module-vmware.vapi.vmc.client" title="Permalink to this headline"></a></h2>
<p>CSP Refresh token based SecurityContextFilter</p>
<dl class="class">
<dt id="vmware.vapi.vmc.client.VmcClient">
<em class="property">class </em><code class="descclassname">vmware.vapi.vmc.client.</code><code class="descname">VmcClient</code><span class="sig-paren">(</span><em>session</em>, <em>refresh_token</em>, <em>vmc_url</em>, <em>csp_url</em><span class="sig-paren">)</span><a class="headerlink" href="#vmware.vapi.vmc.client.VmcClient" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">vmware.vapi.bindings.stub.ApiClient</span></code></p>
<p>VMC Client class that providess access to stubs for all the services in the
VMC API</p>
<p>Initialize VmcClient by creating a stub factory instance using a CSP
Security context filter added to the filter chain of the connector</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>session</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">requests.Session</span></code>) Requests HTTP session instance</li>
<li><strong>refresh_token</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) Refresh token obtained from CSP</li>
<li><strong>vmc_url</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) URL of the VMC service</li>
<li><strong>csp_url</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) URL of the CSP service</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.vmc.client.create_vmc_client">
<code class="descclassname">vmware.vapi.vmc.client.</code><code class="descname">create_vmc_client</code><span class="sig-paren">(</span><em>refresh_token</em>, <em>session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#vmware.vapi.vmc.client.create_vmc_client" title="Permalink to this definition"></a></dt>
<dd><p>Helper method to create an instance of the VMC API client using the public
VMC and CSP URL.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>refresh_token</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) Refresh token obtained from CSP</li>
<li><strong>session</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">requests.Session</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code>) Requests HTTP session instance. If not specified, then one
is automatically created and used</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#vmware.vapi.vmc.client.VmcClient" title="vmware.vapi.vmc.client.VmcClient"><code class="xref py py-class docutils literal notranslate"><span class="pre">vmware.vapi.vmc.client.VmcClient</span></code></a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">VMC Client instance</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.vmc.csp_filter">
<span id="vmware-vapi-vmc-csp-filter-module"></span><h2>vmware.vapi.vmc.csp_filter module<a class="headerlink" href="#module-vmware.vapi.vmc.csp_filter" title="Permalink to this headline"></a></h2>
<p>CSP Refresh token based SecurityContextFilter</p>
<dl class="class">
<dt id="vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter">
<em class="property">class </em><code class="descclassname">vmware.vapi.vmc.csp_filter.</code><code class="descname">CSPSecurityContextFilter</code><span class="sig-paren">(</span><em>session</em>, <em>refresh_token</em>, <em>refresh_url</em><span class="sig-paren">)</span><a class="headerlink" href="#vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">vmware.vapi.security.client.security_context_filter.SecurityContextFilter</span></code></p>
<p>CSP Security Context filter in API Provider chain adds the security
context based on a refresh token to the execution context passed in.</p>
<p>Initialize SecurityContextFilter</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>session</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">requests.Session</span></code>) Requests Session object to use for making HTTP calls</li>
<li><strong>refresh_token</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) Refresh token to use for obtaining an access token</li>
<li><strong>refresh_url</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) URL that allows exchanging a refresh token for an
access token</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter.get_max_retries">
<code class="descname">get_max_retries</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter.get_max_retries" title="Permalink to this definition"></a></dt>
<dd><p>Get the max number of retries</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Number of retries</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter.get_security_context">
<code class="descname">get_security_context</code><span class="sig-paren">(</span><em>on_error</em><span class="sig-paren">)</span><a class="headerlink" href="#vmware.vapi.vmc.csp_filter.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 token and
a new security context is created.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>on_error</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>) Whether this method is called after getting an error</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal notranslate"><span class="pre">vmware.vapi.core.SecurityContext</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Security context</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter.should_retry">
<code class="descname">should_retry</code><span class="sig-paren">(</span><em>error_value</em><span class="sig-paren">)</span><a class="headerlink" href="#vmware.vapi.vmc.csp_filter.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
specified.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>error_value</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">vmware.vapi.data.value.ErrorValue</span></code>) Method error</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Returns True if request should be retried in case the error is
either Unauthenticated or Unauthorized else False</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="vmware.vapi.html" class="btn btn-neutral float-left" title="vmware.vapi package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2019, VMware, Inc.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>