|
260 | 260 | ]
|
261 | 261 | },
|
262 | 262 | {
|
263 |
| - "cell_type": "code", |
264 |
| - "execution_count": null, |
| 263 | + "cell_type": "markdown", |
265 | 264 | "metadata": {},
|
266 |
| - "outputs": [], |
267 | 265 | "source": [
|
268 |
| - "p_gis = GIS(\"your_enterprise_profile\")" |
| 266 | + "Now we'll connect to an ArcGIS Enterprise deployment and publish a service definition file and illustrate the updating of item properties published from them:" |
269 | 267 | ]
|
270 | 268 | },
|
271 | 269 | {
|
272 | 270 | "cell_type": "code",
|
273 |
| - "execution_count": 4, |
| 271 | + "execution_count": null, |
274 | 272 | "metadata": {},
|
275 |
| - "outputs": [ |
276 |
| - { |
277 |
| - "name": "stderr", |
278 |
| - "output_type": "stream", |
279 |
| - "text": [ |
280 |
| - "Setting `verify_cert` to False is a security risk, use at your own risk.\n" |
281 |
| - ] |
282 |
| - } |
283 |
| - ], |
| 273 | + "outputs": [], |
284 | 274 | "source": [
|
285 |
| - "p_gis = GIS(profile=\"my_own_portal\", verify_cert=False)" |
| 275 | + "p_gis = GIS(\"your_enterprise_profile\")" |
286 | 276 | ]
|
287 | 277 | },
|
288 | 278 | {
|
|
294 | 284 | "sd_file = \"data/publishing_sd_shapefiles_and_csv/Nursing_home_locations.sd\""
|
295 | 285 | ]
|
296 | 286 | },
|
| 287 | + { |
| 288 | + "cell_type": "markdown", |
| 289 | + "metadata": {}, |
| 290 | + "source": [ |
| 291 | + "Let's add the service definition file item:" |
| 292 | + ] |
| 293 | + }, |
297 | 294 | {
|
298 | 295 | "cell_type": "code",
|
299 | 296 | "execution_count": 11,
|
|
318 | 315 | "uploaded_file.tags"
|
319 | 316 | ]
|
320 | 317 | },
|
321 |
| - { |
322 |
| - "cell_type": "code", |
323 |
| - "execution_count": 27, |
324 |
| - "metadata": {}, |
325 |
| - "outputs": [ |
326 |
| - { |
327 |
| - "data": { |
328 |
| - "text/plain": [ |
329 |
| - "['.sd', 'ArcGIS', 'Metadata', 'Service Definition', 'Online']" |
330 |
| - ] |
331 |
| - }, |
332 |
| - "execution_count": 27, |
333 |
| - "metadata": {}, |
334 |
| - "output_type": "execute_result" |
335 |
| - } |
336 |
| - ], |
337 |
| - "source": [ |
338 |
| - "uploaded_file.typeKeywords" |
339 |
| - ] |
340 |
| - }, |
341 | 318 | {
|
342 | 319 | "cell_type": "markdown",
|
343 | 320 | "metadata": {},
|
344 | 321 | "source": [
|
345 |
| - "We'll update some of the item properties for the service definition file." |
346 |
| - ] |
347 |
| - }, |
348 |
| - { |
349 |
| - "cell_type": "code", |
350 |
| - "execution_count": 28, |
351 |
| - "metadata": {}, |
352 |
| - "outputs": [ |
353 |
| - { |
354 |
| - "data": { |
355 |
| - "text/plain": [ |
356 |
| - "['ArcGIS',\n", |
357 |
| - " 'ArcGIS Server',\n", |
358 |
| - " 'Data',\n", |
359 |
| - " 'Feature Access',\n", |
360 |
| - " 'Feature Service',\n", |
361 |
| - " 'Metadata',\n", |
362 |
| - " 'providerSDS',\n", |
363 |
| - " 'Service',\n", |
364 |
| - " 'Hosted Service']" |
365 |
| - ] |
366 |
| - }, |
367 |
| - "execution_count": 28, |
368 |
| - "metadata": {}, |
369 |
| - "output_type": "execute_result" |
370 |
| - } |
371 |
| - ], |
372 |
| - "source": [ |
373 |
| - "i = p_gis.content.get(\"0affa060f64f49a88d4742f1b6d328cb\")\n", |
374 |
| - "i.typeKeywords" |
| 322 | + "We'll update some of the item properties for the service definition file by defining a dictionary and inputting it the [Item.update()](/python/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.update) method." |
375 | 323 | ]
|
376 | 324 | },
|
377 | 325 | {
|
|
437 | 385 | }
|
438 | 386 | ],
|
439 | 387 | "source": [
|
| 388 | + "# Publish the service from the service definition item\n", |
440 | 389 | "item = uploaded_file.publish()\n",
|
441 | 390 | "item.tags"
|
442 | 391 | ]
|
|
0 commit comments