forked from docs/doc-exports
OBS Nodejs SDK 1121 Version
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: weihongmin1 <weihongmin1@huawei.com> Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
This commit is contained in:
2201
docs/obs_3rd_party/nodejs_sdk/ALL_META.TXT.json
vendored
Normal file
2201
docs/obs_3rd_party/nodejs_sdk/ALL_META.TXT.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1100
docs/obs_3rd_party/nodejs_sdk/CLASS.TXT.json
vendored
Normal file
1100
docs/obs_3rd_party/nodejs_sdk/CLASS.TXT.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
docs/obs_3rd_party/nodejs_sdk/PARAMETERS.txt
vendored
Normal file
3
docs/obs_3rd_party/nodejs_sdk/PARAMETERS.txt
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version=""
|
||||||
|
language="en-us"
|
||||||
|
type=""
|
||||||
84
docs/obs_3rd_party/nodejs_sdk/obs_29_0001.html
vendored
Normal file
84
docs/obs_3rd_party/nodejs_sdk/obs_29_0001.html
vendored
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<a name="obs_29_0001"></a><a name="obs_29_0001"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Downloading an SDK</h1>
|
||||||
|
<div id="body1502764180077"><div class="section" id="obs_29_0001__section1585712245441"><h4 class="sectiontitle">Download</h4><ul id="obs_29_0001__ul17831193115487"><li id="obs_29_0001__li1943064981111">Latest version of OBS Node.js SDK: <a href="https://github.com/opentelekomcloud-community/obs-nodejs-sdk" target="_blank" rel="noopener noreferrer">Download</a></li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="obs_29_0001__section328381115452"><h4 class="sectiontitle">Compatibility</h4><ul id="obs_29_0001__ul193791251135212"><li id="obs_29_0001__li13248492110">Recommended versions: Node 0.12.<em id="obs_29_0001__i7218958111">x</em>, Node4.<em id="obs_29_0001__i19268323218">x</em>, Node6.<em id="obs_29_0001__i0317162211">x</em>, Node8.<em id="obs_29_0001__i14454210429">x</em>, or Node10.<em id="obs_29_0001__i89156181226">x</em></li><li id="obs_29_0001__li177341928635">Interface changes: The following table describes the interfaces not completely compatible with earlier versions 2.1.<em id="obs_29_0001__i156242043120">x</em>:
|
||||||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_29_0001__table149942337519" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_29_0001__row199941133115118"><th align="left" class="cellrowborder" valign="top" width="31%" id="mcps1.3.2.2.2.2.1.3.1.1"><p id="obs_29_0001__p9994533135117"><strong id="obs_29_0001__b165614425311">Interface</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="69%" id="mcps1.3.2.2.2.2.1.3.1.2"><p id="obs_29_0001__p89941333125118"><strong id="obs_29_0001__b1565614283118">Description</strong></p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr id="obs_29_0001__row18994233145118"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p179941333105119">ObsClient.listBuckets</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p10994123335112">In the response, the data type of <strong id="obs_29_0001__b9612171020414">InterfaceResult.Buckets</strong> was changed to <strong id="obs_29_0001__b186121710947">Array</strong>. <strong id="obs_29_0001__b6612410643">InterfaceResult.Buckets.Bucket</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row19994433175111"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p4994173310511">ObsClient.setBucketAcl</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p5994123345116">In the request, the data type of <strong id="obs_29_0001__b1561211101417">Grants</strong> was changed to <strong id="obs_29_0001__b1261217101541">Array</strong>. <strong id="obs_29_0001__b19612181013411">Grants.Grant</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row7994143312518"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p1994123385119">ObsClient.getBucketAcl</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p199403335120">In the response, the data type of <strong id="obs_29_0001__b13613210841">InterfaceResult.Grants</strong> was changed to <strong id="obs_29_0001__b66138108419">Array</strong>. <strong id="obs_29_0001__b6613201017410">InterfaceResult.Grants.Grant</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row1284175505319"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p7855326557">ObsClient.setObjectAcl</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p1785183212552">In the request, the data type of <strong id="obs_29_0001__b1461319105415">Grants</strong> was changed to <strong id="obs_29_0001__b1761312108411">Array</strong>. <strong id="obs_29_0001__b061316101944">Grants.Grant</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row53141558145315"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p28514324555">ObsClient.getObjectAcl</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p1185163216551">In the response, the data type of <strong id="obs_29_0001__b161311010414">InterfaceResult.Grants</strong> was changed to <strong id="obs_29_0001__b661331011412">Array</strong>. <strong id="obs_29_0001__b661371015412">InterfaceResult.Grants.Grant</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row88001012143717"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p13800312153710">ObsClient.setBucketLogging</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p108004120374">In the request, the data type of <strong id="obs_29_0001__b76134101749">LoggingEnabled.TargetGrants</strong> was changed to <strong id="obs_29_0001__b961391010411">Array</strong>. <strong id="obs_29_0001__b361315101647">LoggingEnabled.TargetGrants.Grant</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row56721024123711"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p6672524103713">ObsClient.getBucketLogging</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p167292415374">In the response, the data type of <strong id="obs_29_0001__b1961319108410">InterfaceResult.LoggingEnabled.TargetGrants</strong> was changed to <strong id="obs_29_0001__b06138101841">Array</strong>. <strong id="obs_29_0001__b1961316101441">InterfaceResult.LoggingEnabled.TargetGrants.Grant</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row5859419124017"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p58591019124013">ObsClient.setBucketWebsite</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p1785901912400">In the request, the data type of <strong id="obs_29_0001__b16137101144">RoutingRules</strong> was changed to <strong id="obs_29_0001__b1861318106415">Array</strong>. <strong id="obs_29_0001__b156141110643">RoutingRules.RoutingRule</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row1402123284014"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p204021329404">ObsClient.getBucketWebsite</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p240211323405">In the response, the data type of <strong id="obs_29_0001__b5614161016418">InterfaceResult.RoutingRules</strong> was changed to <strong id="obs_29_0001__b1761401014412">Array</strong>. <strong id="obs_29_0001__b16614191011412">InterfaceResult.RoutingRules.RoutingRule</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row425265793316"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p14252195783312">ObsClient.setBucketCors</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p122521257103311">In the request, <strong id="obs_29_0001__b842352706111410">CorsRule</strong> was renamed as <strong id="obs_29_0001__b84235270611147">CorsRules</strong>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row93131558133317"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p1467010913343">ObsClient.getBucketCors</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p1031375893314">In the response, <strong id="obs_29_0001__b06140101144">InterfaceResult.CorsRule</strong> was renamed as <strong id="obs_29_0001__b16149108419">InterfaceResult.CorsRules</strong>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row187271353165320"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p4727553195312">ObsClient.setBucketTagging</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p87271853105315">In the request, the data type of <strong id="obs_29_0001__b161517102412">TagSet</strong> was changed to <strong id="obs_29_0001__b1561515101343">Array</strong>. <strong id="obs_29_0001__b176152101419">TagSet.Tag</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0001__row1763265415320"><td class="cellrowborder" valign="top" width="31%" headers="mcps1.3.2.2.2.2.1.3.1.1 "><p id="obs_29_0001__p13632115455312">ObsClient.getBucketTagging</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.2.2.2.2.1.3.1.2 "><p id="obs_29_0001__p1463220548539">In the response, the data type of <strong id="obs_29_0001__b11615310940">InterfaceResult.TagSet</strong> was changed to <strong id="obs_29_0001__b361571019415">Array</strong>. <strong id="obs_29_0001__b261510101540">InterfaceResult.TagSet.Tag</strong> was deleted.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
33
docs/obs_3rd_party/nodejs_sdk/obs_29_0100.html
vendored
Normal file
33
docs/obs_3rd_party/nodejs_sdk/obs_29_0100.html
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<a name="obs_29_0100"></a><a name="obs_29_0100"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Getting Started</h1>
|
||||||
|
<div id="body1502764180078"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0101.html">Before You Start</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0103.html">Creating Access Keys</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0104.html">Preparing a Development Environment</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0105.html">Installing the SDK</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0106.html">Obtaining Endpoints</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0107.html">Initializing an Instance of ObsClient</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0108.html">Creating a Bucket</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0109.html">Uploading an Object</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0110.html">Downloading an Object</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0111.html">Listing Objects</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0112.html">Deleting an Object</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0113.html">General Ways to Use ObsClient</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
11
docs/obs_3rd_party/nodejs_sdk/obs_29_0101.html
vendored
Normal file
11
docs/obs_3rd_party/nodejs_sdk/obs_29_0101.html
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<a name="obs_29_0101"></a><a name="obs_29_0101"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Before You Start</h1>
|
||||||
|
<div id="body1536633398689"><ul id="obs_29_0101__ul14541897376"><li id="obs_29_0101__li15541399379">Ensure that you are familiar with OBS basic concepts from <a href="https://docs.otc.t-systems.com/en-us/usermanual/obs/en-us_topic_0045853692.html" target="_blank" rel="noopener noreferrer">Help Center</a>, such as bucket, object, region, and AK and SK.</li><li id="obs_29_0101__li4662165883613">You can see <a href="obs_29_0113.html">General Ways to Use ObsClient</a> to learn how to call OBS Node.js SDK APIs in a general manner.</li><li id="obs_29_0101__li36502212394"><strong id="obs_29_0101__b842352706135946">ObsClient</strong> supports API calling results returned via a callback function or the <strong id="obs_29_0101__b84235270611310">Promise</strong> object.</li><li id="obs_29_0101__li197551226203115">Some features are available only in some regions. If an API call returns the 405 HTTP status code, check whether the region supports this feature.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0100.html">Getting Started</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
20
docs/obs_3rd_party/nodejs_sdk/obs_29_0103.html
vendored
Normal file
20
docs/obs_3rd_party/nodejs_sdk/obs_29_0103.html
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<a name="obs_29_0103"></a><a name="obs_29_0103"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Creating Access Keys</h1>
|
||||||
|
<div id="body1517297314790"><p id="obs_29_0103__p9732164813445">OBS uses access keys (AK and SK) for signature verification to ensure that only authorized accounts can access specified OBS resources. Detailed explanations are as follows:</p>
|
||||||
|
<ul id="obs_29_0103__ul168171537102114"><li id="obs_29_0103__li13817193792118">An AK is an Access Key ID on OBS. One AK maps to only one user but one user can have multiple AKs. OBS recognizes users by their AKs.</li><li id="obs_29_0103__li10817637182116">An SK is the Secret Access Key on OBS, which is required as the key to access OBS. You can generate authentication information based on SKs and request header fields. SKs and AKs are in one-to-one mapping.</li></ul>
|
||||||
|
<p id="obs_29_0103__p8503143122312">The procedure is as follows:</p>
|
||||||
|
<ol id="obs_29_0103__ol9297134219456"><li id="obs_29_0103__li162971429455">Log in to OBS Console.</li><li id="obs_29_0103__li192069368242">In the upper right corner, hover the cursor over the username and choose <strong id="obs_29_0103__b13885151894713">My Credentials</strong>.</li><li id="obs_29_0103__en-us_topic_0142814371_li111081813183213">On the <strong id="obs_29_0103__b1730281511114">My Credentials</strong> page, select <strong id="obs_29_0103__b9302141514115">Access Keys</strong> in the navigation pane on the left.</li><li id="obs_29_0103__en-us_topic_0142814371_li875452123217">On the <strong id="obs_29_0103__b346421715115">Access Keys</strong> page, click <strong id="obs_29_0103__b1946419171516">Create Access Key</strong>.</li><li id="obs_29_0103__li6297342164517">In the <strong id="obs_29_0103__b471132251412">Add Access Key</strong> dialog box that is displayed, enter the password and its verification code.<div class="note" id="obs_29_0103__note1973823819195"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_29_0103__ul0792103811194"><li id="obs_29_0103__li17792123819197">If you have not bound an email address or mobile number, you need to enter only the password.</li><li id="obs_29_0103__li479210389194">If you have bound an email address and a mobile number, you can select the verification either by email address or mobile number.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
</li><li id="obs_29_0103__li1871318184251">Click <strong id="obs_29_0103__b358591014519">OK</strong>.</li><li id="obs_29_0103__li14714171832518">In the <strong id="obs_29_0103__b8337141612517">Download Access Key</strong> dialog box that is displayed, click <strong id="obs_29_0103__b5337316855">OK</strong> to save the access keys to your browser's default download path.</li><li id="obs_29_0103__li117144186258">Open the downloaded <strong id="obs_29_0103__b644021013611">credentials.csv</strong> file to obtain the access keys (AK and SK).</li></ol>
|
||||||
|
<div class="note" id="obs_29_0103__note6500160171911"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_29_0103__ul20741103324711"><li id="obs_29_0103__li11741533154716">Each user can create up to two valid AK/SK pairs.</li><li id="obs_29_0103__li3741113324712">To prevent the AK from being leaked, keep it secure. If you click <strong id="obs_29_0103__b84235270610500">Cancel</strong> in the dialog box, the AKs will not be downloaded, and you cannot download them later. You can re-create an access key if you need to use it.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
<ul id="obs_29_0103__ul16535152914714"><li id="obs_29_0103__li853592913720">To get temporary access keys, refer to the following:<p id="obs_29_0103__en-us_topic_0000001605096753_en-us_topic_0000001526886348_p1387017162467"><a name="obs_29_0103__li853592913720"></a><a name="li853592913720"></a>Temporary access keys are issued by the system and are only valid for 15 minutes to 24 hours. Once expired, they must be requested again. They follow the principle of least privilege. When a temporary AK/SK pair is used for authentication, a security token must be used at the same time.</p>
|
||||||
|
</li></ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0100.html">Getting Started</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
11
docs/obs_3rd_party/nodejs_sdk/obs_29_0104.html
vendored
Normal file
11
docs/obs_3rd_party/nodejs_sdk/obs_29_0104.html
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<a name="obs_29_0104"></a><a name="obs_29_0104"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Preparing a Development Environment</h1>
|
||||||
|
<div id="body1502764180077"><ul id="obs_29_0104__ul1053982918378"><li id="obs_29_0104__li1130924375415">Download the recommended version from the <a href="https://nodejs.org/en/" target="_blank" rel="noopener noreferrer">Node.js's official website</a> and install it.</li><li id="obs_29_0104__li641113361213">Download the latest version of Eclipse IDE for JavaScript and Web Developer from <a href="https://www.eclipse.org/downloads/packages/" target="_blank" rel="noopener noreferrer">Eclipse's official website</a> and install it.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0100.html">Getting Started</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
20
docs/obs_3rd_party/nodejs_sdk/obs_29_0105.html
vendored
Normal file
20
docs/obs_3rd_party/nodejs_sdk/obs_29_0105.html
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<a name="obs_29_0105"></a><a name="obs_29_0105"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Installing the SDK</h1>
|
||||||
|
<div id="body1502764180077"><div class="section" id="obs_29_0105__section6866125102510"><h4 class="sectiontitle">Installing the SDK with the Source Code</h4><p id="obs_29_0105__p85261953125318">The following procedures use OBS Node.js SDK of the latest version as an example.</p>
|
||||||
|
</div>
|
||||||
|
<ol id="obs_29_0105__ol157097243314"><li id="obs_29_0105__li7709192173310"><span>Download the OBS Node.js SDK by referring to <a href="obs_29_0001.html">Downloading an SDK</a>.</span></li><li id="obs_29_0105__li117090233310"><span>Decompress the development package to obtain folder <strong id="obs_29_0105__b1959116579199">examples</strong> (code examples), folder <strong id="obs_29_0105__b1022591322017">lib</strong> (SDK source code), file <strong id="obs_29_0105__b12225181316201">package.json</strong> (dependency configuration file), and file <strong id="obs_29_0105__b31121734152011">README.txt</strong> (feature description file of SDK versions).</span></li><li id="obs_29_0105__li170972113316"><span>On the command-line interface (CLI), go to the directory under which the SDK development package was decompressed, and run the <strong id="obs_29_0105__b19852446132013">npm install</strong> command to install dependency libraries. A <strong id="obs_29_0105__b70046327910641">node_modules</strong> folder will be generated.</span></li><li id="obs_29_0105__li127092253316"><span>(Optional) In the Eclipse JavaScript project, import the source code: Open Eclipse JavaScript IDE and choose <strong id="obs_29_0105__b1078263819182">Import</strong> > <strong id="obs_29_0105__b178218383186">Projects from Folder or Archive</strong>. For <strong id="obs_29_0105__b2623458971073">Import source</strong>, select the directory under which the SDK development package is decompressed.</span></li></ol>
|
||||||
|
<div class="note" id="obs_29_0105__note0879142322219"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_29_0105__p18915122811184">After the installation, the directory structure is similar to the following:</p>
|
||||||
|
<p id="obs_29_0105__p7879023122220">├── examples</p>
|
||||||
|
<p id="obs_29_0105__p2088082322215">├── lib</p>
|
||||||
|
<p id="obs_29_0105__p1788019231223">├── node_modules</p>
|
||||||
|
<p id="obs_29_0105__p1988032302218">├── package.json</p>
|
||||||
|
<p id="obs_29_0105__p1888092352218">└── README.txt</p>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0100.html">Getting Started</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
13
docs/obs_3rd_party/nodejs_sdk/obs_29_0106.html
vendored
Normal file
13
docs/obs_3rd_party/nodejs_sdk/obs_29_0106.html
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<a name="obs_29_0106"></a><a name="obs_29_0106"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Obtaining Endpoints</h1>
|
||||||
|
<div id="body1502764180078"><ul id="obs_29_0106__ul384585317111"><li id="obs_29_0106__li1981154765611">You can click <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">here</a> to view the endpoints and regions enabled for OBS.</li></ul>
|
||||||
|
<div class="notice" id="obs_29_0106__note545317864015"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="obs_29_0106__p425561863518">The SDK allows you to pass endpoints with or without the protocol name. Suppose the endpoint you obtained is <strong id="obs_29_0106__b16247132715194">your-endpoint</strong>. The endpoint passed when initializing an instance of <strong id="obs_29_0106__b824916275199">ObsClient</strong> can be <strong id="obs_29_0106__b18249172718199">http://your-endpoint</strong>, <strong id="obs_29_0106__b19251102711193">https://your-endpoint</strong>, or <strong id="obs_29_0106__b2025292781911">your-endpoint</strong>.</p>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0100.html">Getting Started</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
37
docs/obs_3rd_party/nodejs_sdk/obs_29_0107.html
vendored
Normal file
37
docs/obs_3rd_party/nodejs_sdk/obs_29_0107.html
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<a name="obs_29_0107"></a><a name="obs_29_0107"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Initializing an Instance of ObsClient</h1>
|
||||||
|
<div id="body1502764180078"><p id="obs_29_0107__p8060118">Each time you want to send an HTTP/HTTPS request to OBS, you must create an instance of<strong id="obs_29_0107__b879518506451"> ObsClient</strong>. Sample code is as follows:</p>
|
||||||
|
<pre class="screen" id="obs_29_0107__screen862831714402">// Import the OBS library.
|
||||||
|
// Use npm to install the client.
|
||||||
|
const ObsClient = require("esdk-obs-nodejs");
|
||||||
|
// Use the source code to install the client.
|
||||||
|
// var ObsClient = require('./lib/obs');
|
||||||
|
|
||||||
|
// Create an instance of ObsClient.
|
||||||
|
const obsClient = new ObsClient({
|
||||||
|
//Obtain an AK/SK pair using environment variables or import an AK/SK pair in other ways. Using hard coding may result in leakage.
|
||||||
|
// Obtain an AK/SK pair on the management console.
|
||||||
|
access_key_id: process.env.ACCESS_KEY_ID,
|
||||||
|
secret_access_key: process.env.SECRET_ACCESS_KEY,
|
||||||
|
// (Optional) If you use a temporary AK/SK pair and a security token to access OBS, you are advised not to use hard coding, which may result in information leakage. You can obtain an AK/SK pair using environment variables or import an AK/SK pair in other ways.
|
||||||
|
// security_token: process.env.SECURITY_TOKEN,
|
||||||
|
// Enter the endpoint of the region where the bucket is located.
|
||||||
|
server: "https://your-endpoint"
|
||||||
|
});
|
||||||
|
|
||||||
|
// Use the instance to access OBS.
|
||||||
|
|
||||||
|
// Close the ObsClient instance.
|
||||||
|
// obsClient.close();</pre>
|
||||||
|
<div class="caution" id="obs_29_0107__note0918357457"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><ul id="obs_29_0107__ul20784412227"><li id="obs_29_0107__li137844113220">JavaScript is an asynchronous programming language. Therefore, you cannot call the close method when accessing OBS.</li><li id="obs_29_0107__li2203258228">An ObsClient instance cannot be used again after it is closed by calling <strong id="obs_29_0107__b17175266015">obsClient.close</strong>.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
<div class="note" id="obs_29_0107__note4861899010"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_29_0107__ul7879182311217"><li id="obs_29_0107__li758442816216">For more information, see chapter "Initialization."</li><li id="obs_29_0107__li1387932312113">For logging configuration, see <a href="obs_29_0204.html">Configuring SDK Logging</a>.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0100.html">Getting Started</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
15
docs/obs_3rd_party/nodejs_sdk/obs_29_0108.html
vendored
Normal file
15
docs/obs_3rd_party/nodejs_sdk/obs_29_0108.html
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<a name="obs_29_0108"></a><a name="obs_29_0108"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Creating a Bucket</h1>
|
||||||
|
<div id="body1502764180078"><p id="obs_29_0108__p8060118">A bucket is a global namespace of OBS and is a data container. It functions as a root directory of a file system and can store objects. The following code shows how to create a bucket:</p>
|
||||||
|
<div class="note" id="obs_29_0108__note17327949104615"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_29_0108__ul197416571727"><li id="obs_29_0108__li131949411116">Bucket names are globally unique. Ensure that the bucket you create is named differently from any other bucket.</li><li id="obs_29_0108__li1797117415620">A bucket name must comply with the following rules:<ul id="obs_29_0108__ul92121210100"><li id="obs_29_0108__li1212201015020">Contains 3 to 63 characters, chosen from lowercase letters, digits, hyphens (-), and periods (.), and starts with a digit or letter.</li><li id="obs_29_0108__li1212121012012">Cannot be an IP address.</li><li id="obs_29_0108__li1721291013018">Cannot start or end with a hyphen (-) or period (.).</li><li id="obs_29_0108__li1221219102003">Cannot contain two consecutive periods (..), for example, <strong id="obs_29_0108__b4348191914489">my..bucket</strong>.</li><li id="obs_29_0108__li42122101901">Cannot contain a period (.) and a hyphen (-) adjacent to each other, for example, <strong id="obs_29_0108__b1125175674816">my-.bucket</strong> or <strong id="obs_29_0108__b412685620481">my.-bucket</strong>.</li></ul>
|
||||||
|
</li><li id="obs_29_0108__li48451415202918">If you create buckets of the same name, no error will be reported and the bucket properties comply with those set in the first creation request.</li></ul>
|
||||||
|
<ul id="obs_29_0108__ul174139317010"><li id="obs_29_0108__li1541303705">For more information, see <a href="obs_29_0301.html">Creating a Bucket</a>.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0100.html">Getting Started</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
111
docs/obs_3rd_party/nodejs_sdk/obs_29_0109.html
vendored
Normal file
111
docs/obs_3rd_party/nodejs_sdk/obs_29_0109.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
107
docs/obs_3rd_party/nodejs_sdk/obs_29_0110.html
vendored
Normal file
107
docs/obs_3rd_party/nodejs_sdk/obs_29_0110.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
110
docs/obs_3rd_party/nodejs_sdk/obs_29_0111.html
vendored
Normal file
110
docs/obs_3rd_party/nodejs_sdk/obs_29_0111.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
105
docs/obs_3rd_party/nodejs_sdk/obs_29_0112.html
vendored
Normal file
105
docs/obs_3rd_party/nodejs_sdk/obs_29_0112.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
191
docs/obs_3rd_party/nodejs_sdk/obs_29_0113.html
vendored
Normal file
191
docs/obs_3rd_party/nodejs_sdk/obs_29_0113.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
17
docs/obs_3rd_party/nodejs_sdk/obs_29_0200.html
vendored
Normal file
17
docs/obs_3rd_party/nodejs_sdk/obs_29_0200.html
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<a name="obs_29_0200"></a><a name="obs_29_0200"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Initialization</h1>
|
||||||
|
<div id="body1502764180078"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0201.html">Configuring Access Keys</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0202.html">Creating an Instance of ObsClient</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0203.html">Configuring an Instance of ObsClient</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0204.html">Configuring SDK Logging</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
15
docs/obs_3rd_party/nodejs_sdk/obs_29_0201.html
vendored
Normal file
15
docs/obs_3rd_party/nodejs_sdk/obs_29_0201.html
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<a name="obs_29_0201"></a><a name="obs_29_0201"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Configuring Access Keys</h1>
|
||||||
|
<div id="body1502764180078"><p id="obs_29_0201__p11758569156">To use OBS, you need a valid pair of AK and SK for signature authentication. </p>
|
||||||
|
<p id="obs_29_0201__p58961533152918">After obtaining the AK and SK, you can create an instance of ObsClient to call SDK APIs.</p>
|
||||||
|
<p id="obs_29_0201__p115631117161518">For details, see <a href="obs_29_0103.html">Creating Access Keys</a>.</p>
|
||||||
|
<p id="obs_29_0201__p15563417191516">After obtaining the AK and SK, you can follow these steps to start initialization:</p>
|
||||||
|
<ul id="obs_29_0201__ul41794515273"><li id="obs_29_0201__li13179165110275"><a href="obs_29_0202.html">Creating an Instance of ObsClient</a></li><li id="obs_29_0201__li18179155113277"><a href="obs_29_0203.html">Configuring an Instance of ObsClient</a></li><li id="obs_29_0201__li11637135752713"><a href="obs_29_0204.html">Configuring SDK Logging</a></li></ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0200.html">Initialization</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
104
docs/obs_3rd_party/nodejs_sdk/obs_29_0202.html
vendored
Normal file
104
docs/obs_3rd_party/nodejs_sdk/obs_29_0202.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
86
docs/obs_3rd_party/nodejs_sdk/obs_29_0203.html
vendored
Normal file
86
docs/obs_3rd_party/nodejs_sdk/obs_29_0203.html
vendored
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<a name="obs_29_0203"></a><a name="obs_29_0203"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Configuring an Instance of ObsClient</h1>
|
||||||
|
<div id="body1502764180078"><p id="obs_29_0203__p8060118">You can set the following initialization parameters to configure an instance of <strong id="obs_29_0203__b1263617458309">ObsClient</strong>.</p>
|
||||||
|
|
||||||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_29_0203__table10831182114445" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_29_0203__row683212154419"><th align="left" class="cellrowborder" valign="top" width="27.87%" id="mcps1.3.2.1.4.1.1"><p id="obs_29_0203__p118329219446"><strong id="obs_29_0203__b67173843419">Parameter</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="46.760000000000005%" id="mcps1.3.2.1.4.1.2"><p id="obs_29_0203__p12832121184414"><strong id="obs_29_0203__b4719380341">Description</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="25.369999999999997%" id="mcps1.3.2.1.4.1.3"><p id="obs_29_0203__p174671008433"><strong id="obs_29_0203__b1472013873414">Recommended Value</strong></p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr id="obs_29_0203__row108328217449"><td class="cellrowborder" valign="top" width="27.87%" headers="mcps1.3.2.1.4.1.1 "><p id="obs_29_0203__p16832192117441">access_key_id</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="46.760000000000005%" headers="mcps1.3.2.1.4.1.2 "><p id="obs_29_0203__p0832112144416">AK</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="25.369999999999997%" headers="mcps1.3.2.1.4.1.3 "><p id="obs_29_0203__p63935310482">N/A</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0203__row283252114414"><td class="cellrowborder" valign="top" width="27.87%" headers="mcps1.3.2.1.4.1.1 "><p id="obs_29_0203__p683220213446">secret_access_key</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="46.760000000000005%" headers="mcps1.3.2.1.4.1.2 "><p id="obs_29_0203__p965412289498">SK</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="25.369999999999997%" headers="mcps1.3.2.1.4.1.3 "><p id="obs_29_0203__p646813018438">N/A</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0203__row724815598281"><td class="cellrowborder" valign="top" width="27.87%" headers="mcps1.3.2.1.4.1.1 "><p id="obs_29_0203__p22491159192810">server</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="46.760000000000005%" headers="mcps1.3.2.1.4.1.2 "><p id="obs_29_0203__p35581421048">Endpoint for accessing OBS, which contains the protocol type, domain name (or IP address), and port number. For example, https://your-endpoint:443. For security purposes, you are advised to use HTTPS.</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="25.369999999999997%" headers="mcps1.3.2.1.4.1.3 "><p id="obs_29_0203__p35587217416">N/A</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0203__row1483317212448"><td class="cellrowborder" valign="top" width="27.87%" headers="mcps1.3.2.1.4.1.1 "><p id="obs_29_0203__p1833821194411">max_retry_count</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="46.760000000000005%" headers="mcps1.3.2.1.4.1.2 "><p id="obs_29_0203__p1526264520557">Maximum number of retries when an HTTP/HTTPS connection is abnormal. The default value is <strong id="obs_29_0203__b169034133414">3</strong>.</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="25.369999999999997%" headers="mcps1.3.2.1.4.1.3 "><p id="obs_29_0203__p697217567485">[1, 5]</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0203__row288125015110"><td class="cellrowborder" valign="top" width="27.87%" headers="mcps1.3.2.1.4.1.1 "><p id="obs_29_0203__p188935010114">timeout</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="46.760000000000005%" headers="mcps1.3.2.1.4.1.2 "><p id="obs_29_0203__p17941272577">Timeout period (in seconds) of an HTTP/HTTPS request. The default value is <strong id="obs_29_0203__b1990316113341">60</strong>.</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="25.369999999999997%" headers="mcps1.3.2.1.4.1.3 "><p id="obs_29_0203__p753215171416">[10, 60]</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0203__row1070193615319"><td class="cellrowborder" valign="top" width="27.87%" headers="mcps1.3.2.1.4.1.1 "><p id="obs_29_0203__p1170163611316">ssl_verify</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="46.760000000000005%" headers="mcps1.3.2.1.4.1.2 "><p id="obs_29_0203__p052711485916">Whether to verify server-side certificates. Possible values are:</p>
|
||||||
|
<ul id="obs_29_0203__ul133251642201019"><li id="obs_29_0203__li8325542201012">Path to the server-side root certificate file in <strong id="obs_29_0203__b6787730135118">.pem</strong> format</li><li id="obs_29_0203__li17979153443517"><strong id="obs_29_0203__b39212331515">true</strong>: The default CAs are used to verify the server-side certificate.</li><li id="obs_29_0203__li11325154218106"><strong id="obs_29_0203__b84235270622470">false</strong>: The server-side certificates will not be verified.</li></ul>
|
||||||
|
<p id="obs_29_0203__p1523448491">The default value is <strong id="obs_29_0203__b1564730115">false</strong>.</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="25.369999999999997%" headers="mcps1.3.2.1.4.1.3 "><p id="obs_29_0203__p144683084318">N/A</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0203__row1850711147719"><td class="cellrowborder" valign="top" width="27.87%" headers="mcps1.3.2.1.4.1.1 "><p id="obs_29_0203__p6507114676">long_conn_param</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="46.760000000000005%" headers="mcps1.3.2.1.4.1.2 "><p id="obs_29_0203__p1542035191817">Persistent connection mode (in seconds). If the value is equal to or larger than <strong id="obs_29_0203__b1495014313394">0</strong>, the persistent connection mode is enabled and this value is used as the <a href="https://nodejs.org/dist/latest-v8.x/docs/api/net.html#net_socket_setkeepalive_enable_initialdelay" target="_blank" rel="noopener noreferrer">initial delay</a> of the TCP Keep-Alive packets.</p>
|
||||||
|
<p id="obs_29_0203__p579916171213">By default, this parameter is left blank, which indicates that persistent connection mode is disabled.</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="25.369999999999997%" headers="mcps1.3.2.1.4.1.3 "><p id="obs_29_0203__p1379912114122">N/A</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="obs_29_0203__row1887114245817"><td class="cellrowborder" valign="top" width="27.87%" headers="mcps1.3.2.1.4.1.1 "><p id="obs_29_0203__p187219235815">is_cname</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="46.760000000000005%" headers="mcps1.3.2.1.4.1.2 "><p id="obs_29_0203__p155128203177">Whether to use self-defined domain name to access OBS. The default value is <strong id="obs_29_0203__b801892865">false</strong>.</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="25.369999999999997%" headers="mcps1.3.2.1.4.1.3 "><p id="obs_29_0203__p651218204172">N/A</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="note" id="obs_29_0203__note2057172123512"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_29_0203__ul25814213356"><li id="obs_29_0203__li1159921113514">Parameters whose recommended value is <strong id="obs_29_0203__b187734613318">N/A</strong> need to be set according to the actual conditions.</li><li id="obs_29_0203__li176018214359">If the network is unstable, you are advised to set a larger value for <strong id="obs_29_0203__b842352706113656">timeout</strong>.</li><li id="obs_29_0203__li12032945610">If the value of <strong id="obs_29_0203__b84235270616229">server</strong> does not contain any protocol, HTTPS is used by default.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
<div class="notice" id="obs_29_0203__note31056616350"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="obs_29_0203__ul10378848144616"><li id="obs_29_0203__li937874824613">If the persistent connection mode is enabled, you must call <strong id="obs_29_0203__b842352706175429">ObsClient.close</strong> to close <strong id="obs_29_0203__b842352706175436">ObsClient</strong> explicitly to reclaim connection resources.</li><li id="obs_29_0203__li2798114934614">For the sake of high DNS resolution performance and OBS reliability, you can set <strong id="obs_29_0203__b842352706162715">server</strong> only to the domain name of OBS, instead of the IP address.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0200.html">Initialization</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
20
docs/obs_3rd_party/nodejs_sdk/obs_29_0204.html
vendored
Normal file
20
docs/obs_3rd_party/nodejs_sdk/obs_29_0204.html
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<a name="obs_29_0204"></a><a name="obs_29_0204"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Configuring SDK Logging</h1>
|
||||||
|
<div id="body1502764180078"><p id="obs_29_0204__p52301238171813">OBS Node.js SDK provides the logging function based on Log4js. You can call <strong id="obs_29_0204__b11820381901">ObsClient.initLog</strong> to enable and configure logging. The following is a code sample:</p>
|
||||||
|
<pre class="screen" id="obs_29_0204__screen13333135912465">obsClient.initLog({
|
||||||
|
file_full_path:'./logs/OBS-SDK.log', //Set the path to the log file.
|
||||||
|
max_log_size:20480, //Set the size of the log file, in bytes.
|
||||||
|
backups:10, //Set the maximum number of log files that can be stored.
|
||||||
|
level:'warn', //Set the log level.
|
||||||
|
log_to_console:<strong id="obs_29_0204__b20180193510117">true</strong> //Set whether to print the log to console.
|
||||||
|
});</pre>
|
||||||
|
<div class="note" id="obs_29_0204__note1911620337524"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_29_0204__ul1511653319526"><li id="obs_29_0204__li1232751917441">The logging function is disabled by default. You need to enable it manually.</li><li id="obs_29_0204__li1116133105219">For details about SDK logs, see <a href="obs_29_1603.html">Log Analysis</a>.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0200.html">Initialization</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
41
docs/obs_3rd_party/nodejs_sdk/obs_29_0300.html
vendored
Normal file
41
docs/obs_3rd_party/nodejs_sdk/obs_29_0300.html
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<a name="obs_29_0300"></a><a name="obs_29_0300"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Bucket Management</h1>
|
||||||
|
<div id="body1502764180078"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0301.html">Creating a Bucket</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0302.html">Listing Buckets</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0304.html">Checking Whether a Bucket Exists</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0303.html">Deleting a Bucket</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0305.html">Obtaining Bucket Metadata</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0306.html">Configuring a Bucket ACL</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0307.html">Obtaining a Bucket ACL</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0308.html">Configuring a Bucket Policy</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0309.html">Obtaining the Policy of a Bucket</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0310.html">Deleting a Bucket Policy</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0311.html">Obtaining the Region of a Bucket</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0312.html">Obtaining Storage Information of a Bucket</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0313.html">Configuring a Storage Quota for a Bucket</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0314.html">Obtaining the Storage Quota of a Bucket</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0315.html">Configuring a Storage Class for a Bucket</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0316.html">Obtaining the Storage Class of a Bucket</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
561
docs/obs_3rd_party/nodejs_sdk/obs_29_0301.html
vendored
Normal file
561
docs/obs_3rd_party/nodejs_sdk/obs_29_0301.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
423
docs/obs_3rd_party/nodejs_sdk/obs_29_0302.html
vendored
Normal file
423
docs/obs_3rd_party/nodejs_sdk/obs_29_0302.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
276
docs/obs_3rd_party/nodejs_sdk/obs_29_0303.html
vendored
Normal file
276
docs/obs_3rd_party/nodejs_sdk/obs_29_0303.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
275
docs/obs_3rd_party/nodejs_sdk/obs_29_0304.html
vendored
Normal file
275
docs/obs_3rd_party/nodejs_sdk/obs_29_0304.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
427
docs/obs_3rd_party/nodejs_sdk/obs_29_0305.html
vendored
Normal file
427
docs/obs_3rd_party/nodejs_sdk/obs_29_0305.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
869
docs/obs_3rd_party/nodejs_sdk/obs_29_0306.html
vendored
Normal file
869
docs/obs_3rd_party/nodejs_sdk/obs_29_0306.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
527
docs/obs_3rd_party/nodejs_sdk/obs_29_0307.html
vendored
Normal file
527
docs/obs_3rd_party/nodejs_sdk/obs_29_0307.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
298
docs/obs_3rd_party/nodejs_sdk/obs_29_0308.html
vendored
Normal file
298
docs/obs_3rd_party/nodejs_sdk/obs_29_0308.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
290
docs/obs_3rd_party/nodejs_sdk/obs_29_0309.html
vendored
Normal file
290
docs/obs_3rd_party/nodejs_sdk/obs_29_0309.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
279
docs/obs_3rd_party/nodejs_sdk/obs_29_0310.html
vendored
Normal file
279
docs/obs_3rd_party/nodejs_sdk/obs_29_0310.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
287
docs/obs_3rd_party/nodejs_sdk/obs_29_0311.html
vendored
Normal file
287
docs/obs_3rd_party/nodejs_sdk/obs_29_0311.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
299
docs/obs_3rd_party/nodejs_sdk/obs_29_0312.html
vendored
Normal file
299
docs/obs_3rd_party/nodejs_sdk/obs_29_0312.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
298
docs/obs_3rd_party/nodejs_sdk/obs_29_0313.html
vendored
Normal file
298
docs/obs_3rd_party/nodejs_sdk/obs_29_0313.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
287
docs/obs_3rd_party/nodejs_sdk/obs_29_0314.html
vendored
Normal file
287
docs/obs_3rd_party/nodejs_sdk/obs_29_0314.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
331
docs/obs_3rd_party/nodejs_sdk/obs_29_0315.html
vendored
Normal file
331
docs/obs_3rd_party/nodejs_sdk/obs_29_0315.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
323
docs/obs_3rd_party/nodejs_sdk/obs_29_0316.html
vendored
Normal file
323
docs/obs_3rd_party/nodejs_sdk/obs_29_0316.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
29
docs/obs_3rd_party/nodejs_sdk/obs_29_0400.html
vendored
Normal file
29
docs/obs_3rd_party/nodejs_sdk/obs_29_0400.html
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<a name="obs_29_0400"></a><a name="obs_29_0400"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Object Upload</h1>
|
||||||
|
<div id="body1502764180079"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0401.html">Object Upload Overview</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0402.html">Uploading an Object - Text-Based</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0403.html">Uploading an Object - Streaming</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0404.html">Uploading an Object - File-Based</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0405.html">Creating a Folder</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0406.html">Configuring Object Metadata</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0407.html">Configuring a Lifecycle Rule When Uploading an Object</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0409.html">Uploading an Object - Append</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0411.html">Uploading an Object - Resumable</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="obs_29_0412.html">Uploading an Object - Browser-Based</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
14
docs/obs_3rd_party/nodejs_sdk/obs_29_0401.html
vendored
Normal file
14
docs/obs_3rd_party/nodejs_sdk/obs_29_0401.html
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<a name="obs_29_0401"></a><a name="obs_29_0401"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Object Upload Overview</h1>
|
||||||
|
<div id="body1540283770231"><p id="obs_29_0401__p97362568368">In OBS, objects are basic data units that users can perform operations on. OBS Node.js SDK provides abundant APIs for object upload in the following methods:</p>
|
||||||
|
<ul id="obs_29_0401__ul1973718564361"><li id="obs_29_0401__li0737256143612"><a href="obs_29_0402.html">Uploading an Object - Text-Based</a></li><li id="obs_29_0401__li77375561362"><a href="obs_29_0403.html">Uploading an Object - Streaming</a></li><li id="obs_29_0401__li9737195618364"><a href="obs_29_0404.html">Uploading an Object - File-Based</a></li><li id="obs_29_0401__li15737165653616"><a href="obs_29_1902.html">Initiating a Multipart Upload</a></li><li id="obs_29_0401__li16737105653612"><a href="obs_29_0409.html">Uploading an Object - Append</a></li><li id="obs_29_0401__li197371456153610"><a href="obs_29_0411.html">Uploading an Object - Resumable</a></li><li id="obs_29_0401__li137371856173614"><a href="obs_29_0412.html">Uploading an Object - Browser-Based</a></li></ul>
|
||||||
|
<p id="obs_29_0401__p173765683620">The SDK supports the upload of objects whose size ranges from 0 KB to 5 GB. For streaming upload, appendable upload, and file-based upload, data to be uploaded at a time cannot be larger than 5 GB. If the file is larger than 5 GB, multipart upload (whose part size is smaller than 5 GB) is suitable. Browser-based upload allows files to be uploaded through a browser.</p>
|
||||||
|
<p id="obs_29_0401__p11681222111914">If you grant anonymous users the read permission for an object during the upload, anonymous users can access the object through a URL after the upload is complete. The object URL is in the format of <strong id="obs_29_0401__b1332464719565">https://</strong><strong id="obs_29_0401__b2325347115610"><em id="obs_29_0401__i1032519473563">bucket name</em></strong><strong id="obs_29_0401__b932694775619">.</strong><strong id="obs_29_0401__b2327114719566"><em id="obs_29_0401__i1932620474567">domain name</em></strong><strong id="obs_29_0401__b2032724735610">/</strong><strong id="obs_29_0401__b13328134716562"><em id="obs_29_0401__i1932820473566">directory levels</em></strong><strong id="obs_29_0401__b12329154713568">/</strong><strong id="obs_29_0401__b1333024775617"><em id="obs_29_0401__i53294471564">object name</em></strong>. If the object resides in the root directory of the bucket, its URL does not contain directory levels.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_29_0400.html">Object Upload</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
832
docs/obs_3rd_party/nodejs_sdk/obs_29_0402.html
vendored
Normal file
832
docs/obs_3rd_party/nodejs_sdk/obs_29_0402.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
981
docs/obs_3rd_party/nodejs_sdk/obs_29_0403.html
vendored
Normal file
981
docs/obs_3rd_party/nodejs_sdk/obs_29_0403.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
830
docs/obs_3rd_party/nodejs_sdk/obs_29_0404.html
vendored
Normal file
830
docs/obs_3rd_party/nodejs_sdk/obs_29_0404.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
828
docs/obs_3rd_party/nodejs_sdk/obs_29_0405.html
vendored
Normal file
828
docs/obs_3rd_party/nodejs_sdk/obs_29_0405.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
690
docs/obs_3rd_party/nodejs_sdk/obs_29_0406.html
vendored
Normal file
690
docs/obs_3rd_party/nodejs_sdk/obs_29_0406.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
162
docs/obs_3rd_party/nodejs_sdk/obs_29_0407.html
vendored
Normal file
162
docs/obs_3rd_party/nodejs_sdk/obs_29_0407.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
818
docs/obs_3rd_party/nodejs_sdk/obs_29_0409.html
vendored
Normal file
818
docs/obs_3rd_party/nodejs_sdk/obs_29_0409.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
709
docs/obs_3rd_party/nodejs_sdk/obs_29_0411.html
vendored
Normal file
709
docs/obs_3rd_party/nodejs_sdk/obs_29_0411.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
249
docs/obs_3rd_party/nodejs_sdk/obs_29_0412.html
vendored
Normal file
249
docs/obs_3rd_party/nodejs_sdk/obs_29_0412.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user