Files
doc-exports/docs/dcs/api-ref/UpdateSSLSwitch.html
chenjunjie 63188fad94 DCS API 20240705 version
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com>
Co-authored-by: chenjunjie <chenjunjie@huawei.com>
Co-committed-by: chenjunjie <chenjunjie@huawei.com>
2025-03-17 15:42:06 +00:00

220 lines
14 KiB
HTML

<a name="UpdateSSLSwitch"></a><a name="UpdateSSLSwitch"></a>
<h1 class="topictitle1">Enabling or Disabling SSL</h1>
<div id="body1708331107508"><div class="section" id="UpdateSSLSwitch__section209891332122015"><h4 class="sectiontitle">Function</h4><p id="UpdateSSLSwitch__p698913202015">This API is used to configure SSL. This API is only supported by DCS Redis 6.0/7.0 instances.</p>
</div>
<div class="section" id="UpdateSSLSwitch__section1399023272017"><h4 class="sectiontitle">URI</h4><p id="UpdateSSLSwitch__p15990632162015">PUT /v2/{project_id}/instances/{instance_id}/ssl</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateSSLSwitch__table139901732132019" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="UpdateSSLSwitch__row1399063282014"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="UpdateSSLSwitch__p89909325206">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="UpdateSSLSwitch__p799093216205">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="UpdateSSLSwitch__p8990432172011">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="UpdateSSLSwitch__p119906325201">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateSSLSwitch__row799033262015"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateSSLSwitch__p89913322202">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateSSLSwitch__p19991123272012">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateSSLSwitch__p11991132172016">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateSSLSwitch__p11991143222015">Project ID. For details, see <a href="dcs-api-0312045.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="UpdateSSLSwitch__row7990163216200"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateSSLSwitch__p1799183216209">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateSSLSwitch__p139911632102016">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateSSLSwitch__p99919323202">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateSSLSwitch__p5991153262016">Instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateSSLSwitch__section149911232162011"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateSSLSwitch__request_UpdateSSLSwitchRequestBody" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="UpdateSSLSwitch__row19991932192019"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="UpdateSSLSwitch__p1999163232012">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="UpdateSSLSwitch__p69921032202012">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="UpdateSSLSwitch__p13992132112019">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="UpdateSSLSwitch__p13992163216208">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateSSLSwitch__row1399119322202"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateSSLSwitch__p19921832142015">enabled</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateSSLSwitch__p13992183213200">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateSSLSwitch__p89929327209">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateSSLSwitch__p189926329202">Enabling or disabling SSL.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateSSLSwitch__section1992103282019"><h4 class="sectiontitle">Response Parameters</h4><p id="UpdateSSLSwitch__p1599203219200"><strong id="UpdateSSLSwitch__b16992153252010">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateSSLSwitch__response_UpdateSSLSwitchResponseBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="UpdateSSLSwitch__row139929326208"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="UpdateSSLSwitch__p159924327201">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="UpdateSSLSwitch__p8993163262011">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="UpdateSSLSwitch__p1999310323208">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateSSLSwitch__row199923323208"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateSSLSwitch__p699310325206">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateSSLSwitch__p099316321204">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateSSLSwitch__p109931432122013">DCS task ID.</p>
</td>
</tr>
<tr id="UpdateSSLSwitch__row1999218327204"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateSSLSwitch__p79931832122016">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateSSLSwitch__p199320328202">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateSSLSwitch__p199383232012">Instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="UpdateSSLSwitch__p1799319323208"><strong id="UpdateSSLSwitch__b119934327208">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateSSLSwitch__response_ErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="UpdateSSLSwitch__row99937324208"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.1"><p id="UpdateSSLSwitch__p7994932112012">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.2"><p id="UpdateSSLSwitch__p59947324203">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.4.1.3"><p id="UpdateSSLSwitch__p13994103213208">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateSSLSwitch__row12993732192010"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="UpdateSSLSwitch__p99948326208">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="UpdateSSLSwitch__p799473232010">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="UpdateSSLSwitch__p7994332122018">Error message.</p>
</td>
</tr>
<tr id="UpdateSSLSwitch__row159931328206"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="UpdateSSLSwitch__p499403222016">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="UpdateSSLSwitch__p169941132152020">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="UpdateSSLSwitch__p39947328208">Error code.</p>
</td>
</tr>
<tr id="UpdateSSLSwitch__row79932322204"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="UpdateSSLSwitch__p299414323204">error_ext_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="UpdateSSLSwitch__p1199443211201">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="UpdateSSLSwitch__p59942320206">Extended error information. This parameter is not used currently and is set to <strong id="UpdateSSLSwitch__b1199483242011">null</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="UpdateSSLSwitch__p13994193282020"><strong id="UpdateSSLSwitch__b69941832172015">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateSSLSwitch__table19941432132012" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="UpdateSSLSwitch__row1899413292014"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.1"><p id="UpdateSSLSwitch__p0995232182015">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.2"><p id="UpdateSSLSwitch__p299563217206">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.7.2.4.1.3"><p id="UpdateSSLSwitch__p1499512328207">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateSSLSwitch__row1999413282014"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="UpdateSSLSwitch__p099519320205">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="UpdateSSLSwitch__p9995163218209">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="UpdateSSLSwitch__p1399518328202">Error message.</p>
</td>
</tr>
<tr id="UpdateSSLSwitch__row39941532102016"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="UpdateSSLSwitch__p1299512327208">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="UpdateSSLSwitch__p399503252010">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="UpdateSSLSwitch__p699543242012">Error code.</p>
</td>
</tr>
<tr id="UpdateSSLSwitch__row1499423213204"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="UpdateSSLSwitch__p49951832172019">error_ext_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="UpdateSSLSwitch__p39951932182016">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="UpdateSSLSwitch__p29951932192019">Extended error information. This parameter is not used currently and is set to <strong id="UpdateSSLSwitch__b16995113219207">null</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateSSLSwitch__section139951732122018"><h4 class="sectiontitle">Example Requests</h4><pre class="screen" id="UpdateSSLSwitch__screen139951532122013">PUT https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/ssl
{
"enabled" : true
}</pre>
</div>
<div class="section" id="UpdateSSLSwitch__section599683222020"><h4 class="sectiontitle">Example Responses</h4><p id="UpdateSSLSwitch__p109961932112015"><strong id="UpdateSSLSwitch__b5996153213200">Status code: 200</strong></p>
<p id="UpdateSSLSwitch__p16996103216202">SSL enabled or disabled.</p>
<pre class="screen" id="UpdateSSLSwitch__screen17996183292015">{
"job_id" : "ff8080817fe01bb2017fe3cf68860481",
"instance_id" : "5560df16-cebf-4473-95c4-d1b573c16e79",
}</pre>
<p id="UpdateSSLSwitch__p199961032172019"><strong id="UpdateSSLSwitch__b14996113252012">Status code: 400</strong></p>
<p id="UpdateSSLSwitch__p11996103262012">Invalid request.</p>
<pre class="screen" id="UpdateSSLSwitch__screen16996203262011">{
"error_code" : "DCS.4201",
"error_msg" : "Do not support SSL."
}</pre>
<p id="UpdateSSLSwitch__p8996132122012"><strong id="UpdateSSLSwitch__b189965327200">Status code: 500</strong></p>
<p id="UpdateSSLSwitch__p1199613326203">Internal service error.</p>
<pre class="screen" id="UpdateSSLSwitch__screen299613324205">{
"error_code" : "DCS.5010",
"error_msg" : "Failed to operate SSL in database."
}</pre>
</div>
<div class="section" id="UpdateSSLSwitch__section499753252019"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateSSLSwitch__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="UpdateSSLSwitch__row299715327208"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="UpdateSSLSwitch__p399713242016">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="UpdateSSLSwitch__p4997123292010">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateSSLSwitch__row189971932112016"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateSSLSwitch__p1699743252015">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateSSLSwitch__p2099723213200">SSL enabled or disabled.</p>
</td>
</tr>
<tr id="UpdateSSLSwitch__row699723252016"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateSSLSwitch__p899713218205">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateSSLSwitch__p3997153222020">Invalid request.</p>
</td>
</tr>
<tr id="UpdateSSLSwitch__row2997123212202"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateSSLSwitch__p29971132122014">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateSSLSwitch__p49972032142011">Internal service error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateSSLSwitch__section89971032122018"><h4 class="sectiontitle">Error Codes</h4><p id="UpdateSSLSwitch__p7997143272012">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="NetworkSecurityManagement.html">Network Security</a></div>
</div>
</div>