Skip to content

Commit 6d7b367

Browse files
committed
Added attack example
1 parent 725ce7b commit 6d7b367

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,40 @@ gremlinapi.login(email='kyle@gremlin.com',
4242

4343
## Launching Attacks
4444

45+
#### Request Body
46+
47+
```python
48+
from gremlinapi.config import GremlinAPIConfig as config
49+
from gremlinapi.attacks import GremlinAPIAttacks as attacks
50+
config.bearer_token = 'Bearer MU....ziTk....40z...c='
51+
config.team_guid = '9676868b-60d2-5ebe-aa66-c1de8162ff9d'
52+
body = {
53+
'target': {
54+
'type': "Random",
55+
'containers': {
56+
'multiSelectLabels': {
57+
"com.amazonaws.ecs.container-name": [
58+
"swissknife"
59+
]
60+
}
61+
},
62+
'exact': 1
63+
},
64+
'command': {
65+
'type': 'latency',
66+
'commandType': 'Latency',
67+
'args': [
68+
'-l', '60',
69+
'-h', '^api.gremlin.com',
70+
'-m', '100',
71+
'-P', 'ICMP'
72+
],
73+
'providers': []
74+
}
75+
}
76+
attacks.create_attack(body=body, teamId=config.team_guid)
77+
```
78+
4579
## Organization and Team management
4680

4781
```python

0 commit comments

Comments
 (0)