forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript-AwsRunInstance.yml
More file actions
51 lines (49 loc) · 1.8 KB
/
Copy pathscript-AwsRunInstance.yml
File metadata and controls
51 lines (49 loc) · 1.8 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
commonfields:
id: AwsRunInstance
version: -1
name: AwsRunInstance
script: |2
resp = demisto.executeCommand("run-instance", demisto.args())
if isError(resp[0]):
demisto.results(resp)
else:
data = demisto.get(resp[0], "Contents.RunInstancesResponse")
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.")
type: python
tags:
- Amazon Web Services
comment: create ec2 aws instances from image
system: true
args:
- default: true
description: The ID of the AMI
name: imageId
required: true
- description: 'The instance type. For more information, see Instance Types in the
Amazon Elastic Compute Cloud User Guide. Default: m1.small'
name: instanceType
- description: The name of the key pair. You can create a key pair using CreateKeyPair
or ImportKeyPair.
name: keyName
- description: '[EC2-VPC] The ID of the subnet to launch the instance into.'
name: subnetId
- description: '[EC2-VPC] The primary IP address. You must specify a value from the
IP address range of the subnet. Only one private IP address can be designated
as primary. Therefore, you can''t specify this parameter if PrivateIpAddresses.n.Primary
is set to true and PrivateIpAddresses.n.PrivateIpAddress is set to an IP address.'
name: privateIpAddress
- description: The Availability Zone of the instance.
name: availabilityZone
- description: 'Security group name, Default: Amazon EC2 uses the default security
group.'
name: securityGroup
scripttarget: 0
timeout: 0s
dependson:
must:
- run-instance