1# Updater<a name="EN-US_TOPIC_0000001115974768"></a> 2 3- [Modules to Import](#en-us_topic_0000001149710363_section749mcpsimp) 4- [Required Permissions](#en-us_topic_0000001149710363_section752mcpsimp) 5- [updater.getNewVersionInfo\(\)](#en-us_topic_0000001149710363_section755mcpsimp) 6- [updater.checkNewVersion\(\)](#en-us_topic_0000001149710363_section817mcpsimp) 7- [updater.download\(\)](#en-us_topic_0000001149710363_section879mcpsimp) 8- [updater.upgrade\(\)](#en-us_topic_0000001149710363_section894mcpsimp) 9- [updater.setUpdatePolicy\(\)](#en-us_topic_0000001149710363_section909mcpsimp) 10- [updater.getUpdatePolicy\(\)](#en-us_topic_0000001149710363_section985mcpsimp) 11 12## Modules to Import<a name="en-us_topic_0000001149710363_section749mcpsimp"></a> 13 14``` 15import client from 'libupdateclient.z.so' 16``` 17 18## Required Permissions<a name="en-us_topic_0000001149710363_section752mcpsimp"></a> 19 20None 21 22## updater.getNewVersionInfo\(\)<a name="en-us_topic_0000001149710363_section755mcpsimp"></a> 23 24Obtains new version information. 25 26**Parameters** 27 28<a name="en-us_topic_0000001149710363_table760mcpsimp"></a> 29<table><thead align="left"><tr id="en-us_topic_0000001149710363_row767mcpsimp"><th class="cellrowborder" valign="top" width="11%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001149710363_p769mcpsimp"><a name="en-us_topic_0000001149710363_p769mcpsimp"></a><a name="en-us_topic_0000001149710363_p769mcpsimp"></a>Name</p> 30</th> 31<th class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001149710363_p771mcpsimp"><a name="en-us_topic_0000001149710363_p771mcpsimp"></a><a name="en-us_topic_0000001149710363_p771mcpsimp"></a>Type</p> 32</th> 33<th class="cellrowborder" valign="top" width="24.060000000000002%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001149710363_p773mcpsimp"><a name="en-us_topic_0000001149710363_p773mcpsimp"></a><a name="en-us_topic_0000001149710363_p773mcpsimp"></a>Mandatory</p> 34</th> 35<th class="cellrowborder" valign="top" width="50.94%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001149710363_p775mcpsimp"><a name="en-us_topic_0000001149710363_p775mcpsimp"></a><a name="en-us_topic_0000001149710363_p775mcpsimp"></a>Description</p> 36</th> 37</tr> 38</thead> 39<tbody><tr id="en-us_topic_0000001149710363_row777mcpsimp"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001149710363_p779mcpsimp"><a name="en-us_topic_0000001149710363_p779mcpsimp"></a><a name="en-us_topic_0000001149710363_p779mcpsimp"></a>callback</p> 40</td> 41<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001149710363_p781mcpsimp"><a name="en-us_topic_0000001149710363_p781mcpsimp"></a><a name="en-us_topic_0000001149710363_p781mcpsimp"></a>Function</p> 42</td> 43<td class="cellrowborder" valign="top" width="24.060000000000002%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001149710363_p783mcpsimp"><a name="en-us_topic_0000001149710363_p783mcpsimp"></a><a name="en-us_topic_0000001149710363_p783mcpsimp"></a>No</p> 44</td> 45<td class="cellrowborder" valign="top" width="50.94%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001149710363_p785mcpsimp"><a name="en-us_topic_0000001149710363_p785mcpsimp"></a><a name="en-us_topic_0000001149710363_p785mcpsimp"></a>AsyncCallback<NewVersionInfo></p> 46</td> 47</tr> 48</tbody> 49</table> 50 51**Return Values** 52 53<a name="en-us_topic_0000001149710363_table788mcpsimp"></a> 54<table><thead align="left"><tr id="en-us_topic_0000001149710363_row794mcpsimp"><th class="cellrowborder" valign="top" width="19%" id="mcps1.1.4.1.1"><p id="en-us_topic_0000001149710363_p796mcpsimp"><a name="en-us_topic_0000001149710363_p796mcpsimp"></a><a name="en-us_topic_0000001149710363_p796mcpsimp"></a>Name</p> 55</th> 56<th class="cellrowborder" valign="top" width="29.49%" id="mcps1.1.4.1.2"><p id="en-us_topic_0000001149710363_p798mcpsimp"><a name="en-us_topic_0000001149710363_p798mcpsimp"></a><a name="en-us_topic_0000001149710363_p798mcpsimp"></a>Type</p> 57</th> 58<th class="cellrowborder" valign="top" width="51.51%" id="mcps1.1.4.1.3"><p id="en-us_topic_0000001149710363_p800mcpsimp"><a name="en-us_topic_0000001149710363_p800mcpsimp"></a><a name="en-us_topic_0000001149710363_p800mcpsimp"></a>Description</p> 59</th> 60</tr> 61</thead> 62<tbody><tr id="en-us_topic_0000001149710363_row802mcpsimp"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001149710363_p804mcpsimp"><a name="en-us_topic_0000001149710363_p804mcpsimp"></a><a name="en-us_topic_0000001149710363_p804mcpsimp"></a>info</p> 63</td> 64<td class="cellrowborder" valign="top" width="29.49%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001149710363_p806mcpsimp"><a name="en-us_topic_0000001149710363_p806mcpsimp"></a><a name="en-us_topic_0000001149710363_p806mcpsimp"></a>NewVersionInfo</p> 65</td> 66<td class="cellrowborder" valign="top" width="51.51%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001149710363_p808mcpsimp"><a name="en-us_topic_0000001149710363_p808mcpsimp"></a><a name="en-us_topic_0000001149710363_p808mcpsimp"></a>New version information</p> 67</td> 68</tr> 69</tbody> 70</table> 71 72**Example** 73 74``` 75updater.getNewVersionInfo(info => { 76console.log("getNewVersionInfo success " + info.status); 77console.log(`info versionName = ` + info.result[0].versionName); 78console.log(`info versionCode = ` + info.result[0].versionCode); 79console.log(`info verifyInfo = ` + info.result[0].verifyInfo); 80)}; 81``` 82 83## updater.checkNewVersion\(\)<a name="en-us_topic_0000001149710363_section817mcpsimp"></a> 84 85Checks for a new version. 86 87**Parameters** 88 89<a name="en-us_topic_0000001149710363_table822mcpsimp"></a> 90<table><thead align="left"><tr id="en-us_topic_0000001149710363_row829mcpsimp"><th class="cellrowborder" valign="top" width="11%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001149710363_p831mcpsimp"><a name="en-us_topic_0000001149710363_p831mcpsimp"></a><a name="en-us_topic_0000001149710363_p831mcpsimp"></a>Name</p> 91</th> 92<th class="cellrowborder" valign="top" width="25%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001149710363_p833mcpsimp"><a name="en-us_topic_0000001149710363_p833mcpsimp"></a><a name="en-us_topic_0000001149710363_p833mcpsimp"></a>Type</p> 93</th> 94<th class="cellrowborder" valign="top" width="24.529999999999998%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001149710363_p835mcpsimp"><a name="en-us_topic_0000001149710363_p835mcpsimp"></a><a name="en-us_topic_0000001149710363_p835mcpsimp"></a>Mandatory</p> 95</th> 96<th class="cellrowborder" valign="top" width="39.47%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001149710363_p837mcpsimp"><a name="en-us_topic_0000001149710363_p837mcpsimp"></a><a name="en-us_topic_0000001149710363_p837mcpsimp"></a>Description</p> 97</th> 98</tr> 99</thead> 100<tbody><tr id="en-us_topic_0000001149710363_row839mcpsimp"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001149710363_p841mcpsimp"><a name="en-us_topic_0000001149710363_p841mcpsimp"></a><a name="en-us_topic_0000001149710363_p841mcpsimp"></a>callback</p> 101</td> 102<td class="cellrowborder" valign="top" width="25%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001149710363_p843mcpsimp"><a name="en-us_topic_0000001149710363_p843mcpsimp"></a><a name="en-us_topic_0000001149710363_p843mcpsimp"></a>Function</p> 103</td> 104<td class="cellrowborder" valign="top" width="24.529999999999998%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001149710363_p845mcpsimp"><a name="en-us_topic_0000001149710363_p845mcpsimp"></a><a name="en-us_topic_0000001149710363_p845mcpsimp"></a>No</p> 105</td> 106<td class="cellrowborder" valign="top" width="39.47%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001149710363_p847mcpsimp"><a name="en-us_topic_0000001149710363_p847mcpsimp"></a><a name="en-us_topic_0000001149710363_p847mcpsimp"></a>AsyncCallback<NewVersionInfo></p> 107</td> 108</tr> 109</tbody> 110</table> 111 112**Return Values** 113 114<a name="en-us_topic_0000001149710363_table850mcpsimp"></a> 115<table><thead align="left"><tr id="en-us_topic_0000001149710363_row856mcpsimp"><th class="cellrowborder" valign="top" width="19%" id="mcps1.1.4.1.1"><p id="en-us_topic_0000001149710363_p858mcpsimp"><a name="en-us_topic_0000001149710363_p858mcpsimp"></a><a name="en-us_topic_0000001149710363_p858mcpsimp"></a>Name</p> 116</th> 117<th class="cellrowborder" valign="top" width="20.330000000000002%" id="mcps1.1.4.1.2"><p id="en-us_topic_0000001149710363_p860mcpsimp"><a name="en-us_topic_0000001149710363_p860mcpsimp"></a><a name="en-us_topic_0000001149710363_p860mcpsimp"></a>Type</p> 118</th> 119<th class="cellrowborder" valign="top" width="60.67%" id="mcps1.1.4.1.3"><p id="en-us_topic_0000001149710363_p862mcpsimp"><a name="en-us_topic_0000001149710363_p862mcpsimp"></a><a name="en-us_topic_0000001149710363_p862mcpsimp"></a>Description</p> 120</th> 121</tr> 122</thead> 123<tbody><tr id="en-us_topic_0000001149710363_row864mcpsimp"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001149710363_p866mcpsimp"><a name="en-us_topic_0000001149710363_p866mcpsimp"></a><a name="en-us_topic_0000001149710363_p866mcpsimp"></a>info</p> 124</td> 125<td class="cellrowborder" valign="top" width="20.330000000000002%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001149710363_p868mcpsimp"><a name="en-us_topic_0000001149710363_p868mcpsimp"></a><a name="en-us_topic_0000001149710363_p868mcpsimp"></a>NewVersionInfo</p> 126</td> 127<td class="cellrowborder" valign="top" width="60.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001149710363_p870mcpsimp"><a name="en-us_topic_0000001149710363_p870mcpsimp"></a><a name="en-us_topic_0000001149710363_p870mcpsimp"></a>New version information</p> 128</td> 129</tr> 130</tbody> 131</table> 132 133**Example** 134 135``` 136updater.checkNewVersion(info => { 137console.log("checkNewVersion success " + info.status); 138console.log(`info versionName = ` + info.result[0].versionName); 139console.log(`info versionCode = ` + info.result[0].versionCode); 140console.log(`info verifyInfo = ` + info.result[0].verifyInfo); 141)}; 142``` 143 144## updater.download\(\)<a name="en-us_topic_0000001149710363_section879mcpsimp"></a> 145 146Downloads the new version and displays the download process. 147 148**Parameters** 149 150None 151 152**Return Values** 153 154None 155 156**Example** 157 158``` 159updater.on("downloadProgress", progress => { 160console.log("downloadProgress on" + progress); 161console.log(`downloadProgress status: ` + progress.status); 162console.log(`downloadProgress percent: ` + progress.percent); 163)}; 164updater.download(); 165``` 166 167## updater.upgrade\(\)<a name="en-us_topic_0000001149710363_section894mcpsimp"></a> 168 169Starts an update. 170 171**Parameters** 172 173None 174 175**Return Values** 176 177None 178 179**Example** 180 181``` 182updater.on("upgradeProgress", progress => { 183console.log("downloadProgress on" + progress); 184console.log(`downloadProgress status: ` + progress.status); 185console.log(`downloadProgress percent: ` + progress.percent); 186)}; 187updater.upgrade(); 188``` 189 190## updater.setUpdatePolicy\(\)<a name="en-us_topic_0000001149710363_section909mcpsimp"></a> 191 192Sets the update policy. 193 194**Parameters** 195 196<a name="en-us_topic_0000001149710363_table914mcpsimp"></a> 197<table><thead align="left"><tr id="en-us_topic_0000001149710363_row921mcpsimp"><th class="cellrowborder" valign="top" width="11%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001149710363_p923mcpsimp"><a name="en-us_topic_0000001149710363_p923mcpsimp"></a><a name="en-us_topic_0000001149710363_p923mcpsimp"></a>Name</p> 198</th> 199<th class="cellrowborder" valign="top" width="27.93%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001149710363_p925mcpsimp"><a name="en-us_topic_0000001149710363_p925mcpsimp"></a><a name="en-us_topic_0000001149710363_p925mcpsimp"></a>Type</p> 200</th> 201<th class="cellrowborder" valign="top" width="24.529999999999998%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001149710363_p927mcpsimp"><a name="en-us_topic_0000001149710363_p927mcpsimp"></a><a name="en-us_topic_0000001149710363_p927mcpsimp"></a>Mandatory</p> 202</th> 203<th class="cellrowborder" valign="top" width="36.54%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001149710363_p929mcpsimp"><a name="en-us_topic_0000001149710363_p929mcpsimp"></a><a name="en-us_topic_0000001149710363_p929mcpsimp"></a>Description</p> 204</th> 205</tr> 206</thead> 207<tbody><tr id="en-us_topic_0000001149710363_row931mcpsimp"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001149710363_p933mcpsimp"><a name="en-us_topic_0000001149710363_p933mcpsimp"></a><a name="en-us_topic_0000001149710363_p933mcpsimp"></a>policy</p> 208</td> 209<td class="cellrowborder" valign="top" width="27.93%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001149710363_p935mcpsimp"><a name="en-us_topic_0000001149710363_p935mcpsimp"></a><a name="en-us_topic_0000001149710363_p935mcpsimp"></a>UpdatePolicy</p> 210</td> 211<td class="cellrowborder" valign="top" width="24.529999999999998%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001149710363_p937mcpsimp"><a name="en-us_topic_0000001149710363_p937mcpsimp"></a><a name="en-us_topic_0000001149710363_p937mcpsimp"></a>Yes</p> 212</td> 213<td class="cellrowborder" valign="top" width="36.54%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001149710363_p939mcpsimp"><a name="en-us_topic_0000001149710363_p939mcpsimp"></a><a name="en-us_topic_0000001149710363_p939mcpsimp"></a>Update policy</p> 214</td> 215</tr> 216<tr id="en-us_topic_0000001149710363_row940mcpsimp"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001149710363_p942mcpsimp"><a name="en-us_topic_0000001149710363_p942mcpsimp"></a><a name="en-us_topic_0000001149710363_p942mcpsimp"></a>callback</p> 217</td> 218<td class="cellrowborder" valign="top" width="27.93%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001149710363_p944mcpsimp"><a name="en-us_topic_0000001149710363_p944mcpsimp"></a><a name="en-us_topic_0000001149710363_p944mcpsimp"></a>Function</p> 219</td> 220<td class="cellrowborder" valign="top" width="24.529999999999998%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001149710363_p946mcpsimp"><a name="en-us_topic_0000001149710363_p946mcpsimp"></a><a name="en-us_topic_0000001149710363_p946mcpsimp"></a>Yes</p> 221</td> 222<td class="cellrowborder" valign="top" width="36.54%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001149710363_p948mcpsimp"><a name="en-us_topic_0000001149710363_p948mcpsimp"></a><a name="en-us_topic_0000001149710363_p948mcpsimp"></a>AsyncCallback<number></p> 223</td> 224</tr> 225</tbody> 226</table> 227 228**Return Values** 229 230<a name="en-us_topic_0000001149710363_table951mcpsimp"></a> 231<table><thead align="left"><tr id="en-us_topic_0000001149710363_row957mcpsimp"><th class="cellrowborder" valign="top" width="19%" id="mcps1.1.4.1.1"><p id="en-us_topic_0000001149710363_p959mcpsimp"><a name="en-us_topic_0000001149710363_p959mcpsimp"></a><a name="en-us_topic_0000001149710363_p959mcpsimp"></a>Name</p> 232</th> 233<th class="cellrowborder" valign="top" width="23.62%" id="mcps1.1.4.1.2"><p id="en-us_topic_0000001149710363_p961mcpsimp"><a name="en-us_topic_0000001149710363_p961mcpsimp"></a><a name="en-us_topic_0000001149710363_p961mcpsimp"></a>Type</p> 234</th> 235<th class="cellrowborder" valign="top" width="57.379999999999995%" id="mcps1.1.4.1.3"><p id="en-us_topic_0000001149710363_p963mcpsimp"><a name="en-us_topic_0000001149710363_p963mcpsimp"></a><a name="en-us_topic_0000001149710363_p963mcpsimp"></a>Description</p> 236</th> 237</tr> 238</thead> 239<tbody><tr id="en-us_topic_0000001149710363_row965mcpsimp"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001149710363_p967mcpsimp"><a name="en-us_topic_0000001149710363_p967mcpsimp"></a><a name="en-us_topic_0000001149710363_p967mcpsimp"></a>result</p> 240</td> 241<td class="cellrowborder" valign="top" width="23.62%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001149710363_p969mcpsimp"><a name="en-us_topic_0000001149710363_p969mcpsimp"></a><a name="en-us_topic_0000001149710363_p969mcpsimp"></a>number</p> 242</td> 243<td class="cellrowborder" valign="top" width="57.379999999999995%" headers="mcps1.1.4.1.3 "> </td> 244</tr> 245</tbody> 246</table> 247 248**Example** 249 250``` 251// Set the update policy. 252let policy = { 253autoDownload: false, 254autoDownloadNet: true, 255mode: 2, 256autoUpgradeInterval: [ 2, 3 ], 257autoUpgradeCondition: 2 258} 259updater.setUpdatePolicy(policy, function(result) { 260console.log("setUpdatePolicy ", result) 261} 262); 263``` 264 265## updater.getUpdatePolicy\(\)<a name="en-us_topic_0000001149710363_section985mcpsimp"></a> 266 267Checks the update policy. 268 269**Parameters** 270 271<a name="en-us_topic_0000001149710363_table990mcpsimp"></a> 272<table><thead align="left"><tr id="en-us_topic_0000001149710363_row997mcpsimp"><th class="cellrowborder" valign="top" width="11%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001149710363_p999mcpsimp"><a name="en-us_topic_0000001149710363_p999mcpsimp"></a><a name="en-us_topic_0000001149710363_p999mcpsimp"></a>Name</p> 273</th> 274<th class="cellrowborder" valign="top" width="16.41%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001149710363_p1001mcpsimp"><a name="en-us_topic_0000001149710363_p1001mcpsimp"></a><a name="en-us_topic_0000001149710363_p1001mcpsimp"></a>Type</p> 275</th> 276<th class="cellrowborder" valign="top" width="24.72%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001149710363_p1003mcpsimp"><a name="en-us_topic_0000001149710363_p1003mcpsimp"></a><a name="en-us_topic_0000001149710363_p1003mcpsimp"></a>Mandatory</p> 277</th> 278<th class="cellrowborder" valign="top" width="47.870000000000005%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001149710363_p1005mcpsimp"><a name="en-us_topic_0000001149710363_p1005mcpsimp"></a><a name="en-us_topic_0000001149710363_p1005mcpsimp"></a>Description</p> 279</th> 280</tr> 281</thead> 282<tbody><tr id="en-us_topic_0000001149710363_row1007mcpsimp"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001149710363_p1009mcpsimp"><a name="en-us_topic_0000001149710363_p1009mcpsimp"></a><a name="en-us_topic_0000001149710363_p1009mcpsimp"></a>callback</p> 283</td> 284<td class="cellrowborder" valign="top" width="16.41%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001149710363_p1011mcpsimp"><a name="en-us_topic_0000001149710363_p1011mcpsimp"></a><a name="en-us_topic_0000001149710363_p1011mcpsimp"></a>Function</p> 285</td> 286<td class="cellrowborder" valign="top" width="24.72%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001149710363_p1013mcpsimp"><a name="en-us_topic_0000001149710363_p1013mcpsimp"></a><a name="en-us_topic_0000001149710363_p1013mcpsimp"></a>Yes</p> 287</td> 288<td class="cellrowborder" valign="top" width="47.870000000000005%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001149710363_p1015mcpsimp"><a name="en-us_topic_0000001149710363_p1015mcpsimp"></a><a name="en-us_topic_0000001149710363_p1015mcpsimp"></a>AsyncCallback<UpdatePolicy></p> 289</td> 290</tr> 291</tbody> 292</table> 293 294**Return Values** 295 296<a name="en-us_topic_0000001149710363_table1018mcpsimp"></a> 297<table><thead align="left"><tr id="en-us_topic_0000001149710363_row1024mcpsimp"><th class="cellrowborder" valign="top" width="19%" id="mcps1.1.4.1.1"><p id="en-us_topic_0000001149710363_p1026mcpsimp"><a name="en-us_topic_0000001149710363_p1026mcpsimp"></a><a name="en-us_topic_0000001149710363_p1026mcpsimp"></a>Name</p> 298</th> 299<th class="cellrowborder" valign="top" width="29.64%" id="mcps1.1.4.1.2"><p id="en-us_topic_0000001149710363_p1028mcpsimp"><a name="en-us_topic_0000001149710363_p1028mcpsimp"></a><a name="en-us_topic_0000001149710363_p1028mcpsimp"></a>Type</p> 300</th> 301<th class="cellrowborder" valign="top" width="51.35999999999999%" id="mcps1.1.4.1.3"><p id="en-us_topic_0000001149710363_p1030mcpsimp"><a name="en-us_topic_0000001149710363_p1030mcpsimp"></a><a name="en-us_topic_0000001149710363_p1030mcpsimp"></a>Description</p> 302</th> 303</tr> 304</thead> 305<tbody><tr id="en-us_topic_0000001149710363_row1032mcpsimp"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001149710363_p1034mcpsimp"><a name="en-us_topic_0000001149710363_p1034mcpsimp"></a><a name="en-us_topic_0000001149710363_p1034mcpsimp"></a>policy</p> 306</td> 307<td class="cellrowborder" valign="top" width="29.64%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001149710363_p1036mcpsimp"><a name="en-us_topic_0000001149710363_p1036mcpsimp"></a><a name="en-us_topic_0000001149710363_p1036mcpsimp"></a>UpdatePolicy</p> 308</td> 309<td class="cellrowborder" valign="top" width="51.35999999999999%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001149710363_p1038mcpsimp"><a name="en-us_topic_0000001149710363_p1038mcpsimp"></a><a name="en-us_topic_0000001149710363_p1038mcpsimp"></a>Update policy</p> 310</td> 311</tr> 312</tbody> 313</table> 314 315**Example** 316 317``` 318updater.getUpdatePolicy(policy => { 319console.log("getUpdatePolicy success", policy) 320}); 321``` 322 323