doc-exports/docs/cce/api-ref/cce_02_0248.html
Dong, Qiu Jian 3bfd56205d CCE API update -20240401 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
2024-04-16 09:26:07 +00:00

384 lines
29 KiB
HTML

<a name="cce_02_0248"></a><a name="cce_02_0248"></a>
<h1 class="topictitle1">Obtaining Cluster Certificates</h1>
<div id="body0000001210253850"><div class="section" id="cce_02_0248__section1686113493165"><h4 class="sectiontitle">Function</h4><p id="cce_02_0248__p7667449104014">This API is used to obtain certificates of a specified cluster in form of <span class="keyword" id="cce_02_0248__keyword8518164973218">kubeconfig</span> file.</p>
</div>
<div class="section" id="cce_02_0248__section8403243161416"><h4 class="sectiontitle">URI</h4><p id="cce_02_0248__p126681471417">POST /api/v3/projects/{project_id}/clusters/{cluster_id}/clustercert</p>
<p id="cce_02_0248__p1667949144018"><a href="#cce_02_0248__table2027961241820">Table 1</a> describes the parameters of this API.</p>
</div>
<div class="tablenoborder"><a name="cce_02_0248__table2027961241820"></a><a name="table2027961241820"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__table2027961241820" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Description</caption><thead align="left"><tr id="cce_02_0248__row122809120186"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.4.1.1"><p id="cce_02_0248__p91421758131813">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12%" id="mcps1.3.3.2.4.1.2"><p id="cce_02_0248__p101421758131816">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68%" id="mcps1.3.3.2.4.1.3"><p id="cce_02_0248__p19143115818187">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__row32801312121810"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="cce_02_0248__p1714415589184">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.3.2.4.1.2 "><p id="cce_02_0248__p814518580186">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.3.2.4.1.3 "><p id="cce_02_0248__p5145175891811">Project ID. For details about how to obtain the project ID, see <a href="cce_02_0271.html">How to Obtain Parameters in the API URI</a>.</p>
</td>
</tr>
<tr id="cce_02_0248__row19993973274"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="cce_02_0248__p1699317712718">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.3.2.4.1.2 "><p id="cce_02_0248__p89934722719">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.3.2.4.1.3 "><p id="cce_02_0248__p1149162812272">Cluster ID. For details about how to obtain the cluster ID, see <a href="cce_02_0271.html">How to Obtain Parameters in the API URI</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="cce_02_0248__section947084713911"><h4 class="sectiontitle">Request</h4><p id="cce_02_0248__p10314164115415"><strong id="cce_02_0248__b162259487412">Request parameters</strong>:</p>
<p id="cce_02_0248__p7105145203655"><a href="#cce_02_0248__table538113720514">Table 2</a> and<a href="#cce_02_0248__table34052983203655">Table 3</a> describes the request parameters.</p>
<div class="tablenoborder"><a name="cce_02_0248__table538113720514"></a><a name="table538113720514"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__table538113720514" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="cce_02_0248__en-us_topic_0102499074_row55001954122614"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="cce_02_0248__en-us_topic_0102499074_p115009545264">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.4.4.2.4.1.2"><p id="cce_02_0248__en-us_topic_0102499074_p175001547265">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="61%" id="mcps1.3.4.4.2.4.1.3"><p id="cce_02_0248__en-us_topic_0102499074_p16500154162611">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__en-us_topic_0102499074_row199801811203412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cce_02_0248__en-us_topic_0102499074_p69808112344">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cce_02_0248__en-us_topic_0102499074_p3980111103414">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="61%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cce_02_0248__en-us_topic_0102499074_p169801011203416">Message body type (format). Possible values:</p>
<ul id="cce_02_0248__en-us_topic_0102499074_ul7385444163617"><li id="cce_02_0248__en-us_topic_0102499074_li18385114483612">application/json;charset=utf-8</li><li id="cce_02_0248__en-us_topic_0102499074_li3516132853714">application/json</li></ul>
</td>
</tr>
<tr id="cce_02_0248__en-us_topic_0102499074_row3500125412260"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cce_02_0248__en-us_topic_0102499074_p105001654202618">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cce_02_0248__en-us_topic_0102499074_p20500954182618">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="61%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cce_02_0248__p18824197845">Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details on how to obtain a user token, see <a href="cce_02_0004.html">API Usage Guidelines</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="cce_02_0248__table34052983203655"></a><a name="table34052983203655"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__table34052983203655" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters in the request body</caption><thead align="left"><tr id="cce_02_0248__row30254333203655"><th align="left" class="cellrowborder" valign="top" width="20.2020202020202%" id="mcps1.3.4.5.2.5.1.1"><p id="cce_02_0248__p34681881203655">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.13131313131313%" id="mcps1.3.4.5.2.5.1.2"><p id="cce_02_0248__p333122111014">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.32323232323232%" id="mcps1.3.4.5.2.5.1.3"><p id="cce_02_0248__p57769002203655">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.34343434343434%" id="mcps1.3.4.5.2.5.1.4"><p id="cce_02_0248__p58673482203655">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__row54931625203655"><td class="cellrowborder" valign="top" width="20.2020202020202%" headers="mcps1.3.4.5.2.5.1.1 "><p id="cce_02_0248__p44731858185518">duration</p>
</td>
<td class="cellrowborder" valign="top" width="13.13131313131313%" headers="mcps1.3.4.5.2.5.1.2 "><p id="cce_02_0248__p20715132635516">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.32323232323232%" headers="mcps1.3.4.5.2.5.1.3 "><p id="cce_02_0248__p57145269553">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="48.34343434343434%" headers="mcps1.3.4.5.2.5.1.4 "><p id="cce_02_0248__p1715181364111">Period during which a cluster certificate is valid, in days.</p>
<p id="cce_02_0248__p815181310419">Validity period of the cluster certificate, in days. A cluster certificate can be valid for 1 to 1,825 days. If this parameter is set to <strong id="cce_02_0248__b2034904120412">-1</strong>, the validity period is 1,825 days (about 5 years).</p>
<p id="cce_02_0248__p46951149543">Minimum: 1</p>
<p id="cce_02_0248__p969516491242">Maximum: 1825</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="cce_02_0248__p1611232212217"><strong id="cce_02_0248__b18637103252113">Example request</strong>:</p>
<p id="cce_02_0248__p128315321556">Applying for a cluster access certificate valid for 30 days</p>
<pre class="screen" id="cce_02_0248__screen954535114587">{
"duration": 30
}</pre>
</div>
<div class="section" id="cce_02_0248__section61819725020"><h4 class="sectiontitle">Response</h4><p id="cce_02_0248__p146697490405"><strong id="cce_02_0248__b267074913401">Response parameters</strong>:</p>
<p id="cce_02_0248__p967014911405"><a href="#cce_02_0248__table10794441185312">Table 4</a> describes the response parameters.</p>
<div class="tablenoborder"><a name="cce_02_0248__table10794441185312"></a><a name="table10794441185312"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__table10794441185312" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response parameters</caption><thead align="left"><tr id="cce_02_0248__row479704155313"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.4.2.4.1.1"><p id="cce_02_0248__p1479884175317">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="cce_02_0248__p1279917411533">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.5.4.2.4.1.3"><p id="cce_02_0248__p7800174116531">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__row280113412539"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p id="cce_02_0248__p12340185616220">kind</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="cce_02_0248__p1822894016484">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.5.4.2.4.1.3 "><p id="cce_02_0248__p722774012483">API type. The value is fixed at <strong id="cce_02_0248__b199262510521">Config</strong> and cannot be changed.</p>
</td>
</tr>
<tr id="cce_02_0248__row68061041135317"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p id="cce_02_0248__p23406568227">apiVersion</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="cce_02_0248__p622611406488">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.5.4.2.4.1.3 "><p id="cce_02_0248__p162251840154816">API version. The value is fixed at <strong id="cce_02_0248__b892253618533">v1</strong> and cannot be changed.</p>
</td>
</tr>
<tr id="cce_02_0248__row75713500227"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p id="cce_02_0248__p1340145692215">preferences</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="cce_02_0248__p45141305719">Object</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.5.4.2.4.1.3 "><p id="cce_02_0248__p145729504227">This field is not used currently and is left unspecified by default.</p>
</td>
</tr>
<tr id="cce_02_0248__row1481016412536"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p id="cce_02_0248__p1234075612226">clusters</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="cce_02_0248__p8224204054815">Array of <a href="#cce_02_0248__table2157957598">clusters</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.5.4.2.4.1.3 "><p id="cce_02_0248__p16223840194816">Cluster list.</p>
</td>
</tr>
<tr id="cce_02_0248__row178131418531"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p id="cce_02_0248__p15340175622213">users</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="cce_02_0248__p222117402485">Array of <a href="#cce_02_0248__table7846125310316">users</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.5.4.2.4.1.3 "><p id="cce_02_0248__p174922011883">Certificate information and client key information of a specified user.</p>
</td>
</tr>
<tr id="cce_02_0248__row581674195314"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p id="cce_02_0248__p1034085618224">contexts</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="cce_02_0248__p19219104018481">Array of <a href="#cce_02_0248__table1653965354">contexts</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.5.4.2.4.1.3 "><p id="cce_02_0248__p221974010482">Context list.</p>
</td>
</tr>
<tr id="cce_02_0248__row16820841145310"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p id="cce_02_0248__p17340756192216">current-context</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="cce_02_0248__p20820114145010">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.5.4.2.4.1.3 "><p id="cce_02_0248__p9820191425019">Current context. If <strong id="cce_02_0248__b1421174516815">publicIp</strong> (VM EIP) exists, the value is <strong id="cce_02_0248__b1751204912819">external</strong>. If <strong id="cce_02_0248__b97698521280">publicIp</strong> does not exist, the value is <strong id="cce_02_0248__b179489561788">internal</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tablenoborder"><a name="cce_02_0248__table2157957598"></a><a name="table2157957598"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__table2157957598" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Data structure of the <strong id="cce_02_0248__b18592259401">clusters</strong> field</caption><thead align="left"><tr id="cce_02_0248__row1161175165911"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.6.2.4.1.1"><p id="cce_02_0248__p111637517599">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.6.2.4.1.2"><p id="cce_02_0248__p11651358593">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.6.2.4.1.3"><p id="cce_02_0248__p416645155912">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__row616710518596"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.6.2.4.1.1 "><p id="cce_02_0248__p8749132512311">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.2.4.1.2 "><p id="cce_02_0248__p181688520596">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.6.2.4.1.3 "><p id="cce_02_0248__p69881827105120">Cluster name.</p>
<ul id="cce_02_0248__ul189480357510"><li id="cce_02_0248__li18948183545116">If the <strong id="cce_02_0248__b6196437211">publicIp</strong> parameter does not exist (that is, no EIP exists), there is only one cluster in the cluster list, and the value of this parameter is <strong id="cce_02_0248__b108621843">internalCluster</strong>.</li><li id="cce_02_0248__li199481435115112">If the <strong id="cce_02_0248__b84042716416">publicIp</strong> parameter exists (that is, the EIP exists), there is more than one cluster in the cluster list, and the value of this parameter is <strong id="cce_02_0248__b154115271644">externalCluster</strong>.</li></ul>
</td>
</tr>
<tr id="cce_02_0248__row1717013525912"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.6.2.4.1.1 "><p id="cce_02_0248__p1474962552312">cluster</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.2.4.1.2 "><p id="cce_02_0248__p1617116516594"><a href="#cce_02_0248__table519211353218">cluster</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.6.2.4.1.3 "><p id="cce_02_0248__p197819347238">Cluster information.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="cce_02_0248__table519211353218"></a><a name="table519211353218"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__table519211353218" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Data structure of the <strong id="cce_02_0248__b1145219207614">cluster</strong> field</caption><thead align="left"><tr id="cce_02_0248__row321083518215"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.7.2.4.1.1"><p id="cce_02_0248__p12164356219">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.7.2.4.1.2"><p id="cce_02_0248__p17224123512111">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.7.2.4.1.3"><p id="cce_02_0248__p122293355211">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__row3234635142115"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.4.1.1 "><p id="cce_02_0248__p464235772320">server</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.7.2.4.1.2 "><p id="cce_02_0248__p1015317134399">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.7.2.4.1.3 "><p id="cce_02_0248__p151548136395">Node IP address.</p>
</td>
</tr>
<tr id="cce_02_0248__row16252935192119"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.4.1.1 "><p id="cce_02_0248__p166421257162313">certificate-authority-data</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.7.2.4.1.2 "><p id="cce_02_0248__p1022104625510">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.7.2.4.1.3 "><p id="cce_02_0248__p222016469555">Certificate authorization data.</p>
</td>
</tr>
<tr id="cce_02_0248__row184587219016"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.7.2.4.1.1 "><p id="cce_02_0248__p1645992119018">insecure-skip-tls-verify</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.7.2.4.1.2 "><p id="cce_02_0248__p1445916211012">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.7.2.4.1.3 "><p id="cce_02_0248__p2023481013218">Whether to skip the server certificate verification. If the cluster type is <strong id="cce_02_0248__b5377122012113">externalCluster</strong>, the value is <strong id="cce_02_0248__b8396142414214">true</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="cce_02_0248__table7846125310316"></a><a name="table7846125310316"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__table7846125310316" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Data structure of the <strong id="cce_02_0248__b983611571571">users</strong> field</caption><thead align="left"><tr id="cce_02_0248__row18491253439"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.8.2.4.1.1"><p id="cce_02_0248__p1185213531136">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.8.2.4.1.2"><p id="cce_02_0248__p168531539311">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.8.2.4.1.3"><p id="cce_02_0248__p48557530314">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__row48561353538"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.2.4.1.1 "><p id="cce_02_0248__p1081619137243">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.8.2.4.1.2 "><p id="cce_02_0248__p8681520149">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.8.2.4.1.3 "><p id="cce_02_0248__p2681320241">The value is fixed to <strong id="cce_02_0248__b56951334589">user</strong>.</p>
</td>
</tr>
<tr id="cce_02_0248__row2086016536310"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.8.2.4.1.1 "><p id="cce_02_0248__p1481615137243">user</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.8.2.4.1.2 "><p id="cce_02_0248__p26718205410"><a href="#cce_02_0248__table205311581434">user</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.8.2.4.1.3 "><p id="cce_02_0248__p266920549">Stores the certificate information and ClientKey information of a specified user.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="cce_02_0248__table205311581434"></a><a name="table205311581434"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__table205311581434" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Data structure of the <strong id="cce_02_0248__b4855142218124">user</strong> field</caption><thead align="left"><tr id="cce_02_0248__row14571558933"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.9.2.4.1.1"><p id="cce_02_0248__p1558125817311">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.9.2.4.1.2"><p id="cce_02_0248__p116015581134">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.9.2.4.1.3"><p id="cce_02_0248__p12611058739">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__row126110585314"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.9.2.4.1.1 "><p id="cce_02_0248__p4958942122415">client-certificate-data</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.9.2.4.1.2 "><p id="cce_02_0248__p69201306371">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.9.2.4.1.3 "><p id="cce_02_0248__p6155132833316">Client certificate.</p>
</td>
</tr>
<tr id="cce_02_0248__row1266155814310"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.9.2.4.1.1 "><p id="cce_02_0248__p169582420243">client-key-data</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.9.2.4.1.2 "><p id="cce_02_0248__p1890215353719">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.9.2.4.1.3 "><p id="cce_02_0248__p16973125711346">Contains PEM encoding data from the TLS client key file.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="cce_02_0248__table1653965354"></a><a name="table1653965354"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__table1653965354" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Data structure of the <strong id="cce_02_0248__b1772851891116">contexts</strong> field</caption><thead align="left"><tr id="cce_02_0248__row1654419517516"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.10.2.4.1.1"><p id="cce_02_0248__p754585755">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.10.2.4.1.2"><p id="cce_02_0248__p3546952053">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.10.2.4.1.3"><p id="cce_02_0248__p11548135655">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__row25491955514"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.10.2.4.1.1 "><p id="cce_02_0248__p1115011101251">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.10.2.4.1.2 "><p id="cce_02_0248__p12552755513">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.10.2.4.1.3 "><p id="cce_02_0248__p55125122395">Context name.</p>
<ul id="cce_02_0248__ul157991814135715"><li id="cce_02_0248__li1799191455713">If the <strong id="cce_02_0248__b16909127171319">publicIp</strong> parameter does not exist (that is, no EIP exists), there is only one cluster in the cluster list, and the value of this parameter is <strong id="cce_02_0248__b19104701314">internal</strong>.</li><li id="cce_02_0248__li679961410570">If the <strong id="cce_02_0248__b193515299133">publicIp</strong> parameter exists (that is, the EIP exists), there is more than one cluster in the cluster list, and the value of this parameter is <strong id="cce_02_0248__b1538129121311">external</strong>.</li></ul>
</td>
</tr>
<tr id="cce_02_0248__row125534519519"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.10.2.4.1.1 "><p id="cce_02_0248__p19150610112518">context</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.10.2.4.1.2 "><p id="cce_02_0248__p12556559518"><a href="#cce_02_0248__table47913919518">context</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.10.2.4.1.3 "><p id="cce_02_0248__p107081923192519">Context information.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="cce_02_0248__table47913919518"></a><a name="table47913919518"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__table47913919518" frame="border" border="1" rules="all"><caption><b>Table 10 </b>Data structure of the <strong id="cce_02_0248__b14127110161415">context</strong> field</caption><thead align="left"><tr id="cce_02_0248__row2851791957"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.4.1.1"><p id="cce_02_0248__p387896517">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.11.2.4.1.2"><p id="cce_02_0248__p1891591554">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.11.2.4.1.3"><p id="cce_02_0248__p119112912513">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__row793396511"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.4.1.1 "><p id="cce_02_0248__p1997111301250">cluster</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.11.2.4.1.2 "><p id="cce_02_0248__p2951292054">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.11.2.4.1.3 "><p id="cce_02_0248__p879115407257">Cluster context.</p>
</td>
</tr>
<tr id="cce_02_0248__row15979918515"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.4.1.1 "><p id="cce_02_0248__p15971153052514">user</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.11.2.4.1.2 "><p id="cce_02_0248__p9100891155">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.11.2.4.1.3 "><p id="cce_02_0248__p1791940192516">User context.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="cce_02_0248__en-us_topic_0079614900_p24465425"><strong id="cce_02_0248__b1618018910150">Response example</strong>:</p>
<pre class="screen" id="cce_02_0248__screen197821555132619">{
"kind": "Config",
"apiVersion": "v1",
"preferences": {},
"clusters": [
{
"name": "internalCluster",
"cluster": {
"server": "https://192.168.1.7:5443",
"certificate-authority-data": ""
}
}
],
"users": [
{
"name": "user",
"user": {
"client-certificate-data": "",
"client-key-data": ""
}
}
],
"contexts": [
{
"name": "internal",
"context": {
"cluster": "internalCluster",
"user": "user"
}
}
],
"current-context": "internal"
}</pre>
<div class="section" id="cce_02_0248__s50f1049a6a4d404c895cf636eb8f3bf1"><h4 class="sectiontitle">Status Code</h4><p id="cce_02_0248__en-us_topic_0079614900_p21869221"><a href="#cce_02_0248__en-us_topic_0079614900_table46761928">Table 11</a> describes the status code of this API.</p>
<div class="tablenoborder"><a name="cce_02_0248__en-us_topic_0079614900_table46761928"></a><a name="en-us_topic_0079614900_table46761928"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0248__en-us_topic_0079614900_table46761928" frame="border" border="1" rules="all"><caption><b>Table 11 </b>Status code</caption><thead align="left"><tr id="cce_02_0248__en-us_topic_0079614900_row33254664"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.14.3.2.3.1.1"><p id="cce_02_0248__p55616028205955">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.14.3.2.3.1.2"><p id="cce_02_0248__p8604418205955">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0248__en-us_topic_0079614900_row41084259"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.3.2.3.1.1 "><p id="cce_02_0248__en-us_topic_0079614900_p39490674">200</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.14.3.2.3.1.2 "><p id="cce_02_0248__en-us_topic_0079614900_p44628050">Certificates of the specified cluster are successfully obtained.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="cce_02_0248__p347213715512">For details about error status codes, see <a href="cce_02_0084.html">Status Code</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="cce_02_0092.html">Cluster Management</a></div>
</div>
</div>