forked from shaniacht1/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautomation-AwsCreateVolumeSnapshot.yml
More file actions
37 lines (35 loc) · 1.08 KB
/
automation-AwsCreateVolumeSnapshot.yml
File metadata and controls
37 lines (35 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
args:
- default: true
description: The ID of the EBS volume
name: volumeId
required: true
- description: A description for the snapshot
name: description
comment: Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use
snapshots for backups, to make copies of EBS volumes, and to save data before shutting
down an instance.
commonfields:
id: AwsCreateVolumeSnapshot
version: -1
dependson:
must:
- create-volume-snapshot
name: AwsCreateVolumeSnapshot
runonce: false
script: |2
resp = demisto.executeCommand("create-volume-snapshot", demisto.args())
if isError(resp[0]):
demisto.results(resp)
else:
data = demisto.get(resp[0], "Contents.CreateSnapshotResponse")
if data:
data = data if isinstance(data, list) else [data]
data = [{k: formatCell(row[k]) for k in row} for row in data]
demisto.results({"ContentsFormat": formats["table"], "Type": entryTypes["note"], "Contents": data} )
else:
demisto.results("No results.")
scripttarget: 0
system: true
tags:
- Amazon Web Services
type: python