# README
Amazon Elastic Compute Cloud Service
Provides ability to call operations on EC2 client
Usage
var request = &ec2.CallRequest{
Credentials: "endly-aws-east",
Method: "DescribeInstances",
Input: map[string]interface{}{
"InstanceIds": []interface{}{
"i-0139209d5358e60**",
},
},
}
var response = &ec2.CallResponse{}
var manager = endly.New()
var context = manager.NewContext(nil)
var err := endly.Run(context, request, response)
if err != nil {
log.Fatal(err)
}
fmt.Sprintf("%v\n", response);
Endly workflow service action
Run the following command for aws/ec2 service operation details:
endly -s='aws/ec2' -a=call
Endly inline workflow
endly -r=run
@run.yaml
pipeline:
ec2-up:
action: aws/ec2:run
credentials: endly-aws-east
method: StartInstances
input:
instanceIds:
- i-0139209d5358e60**
Service Id | Action | Description | Request | Response |
---|---|---|---|---|
aws/ec2 | call | run ec2 operation | CallRequest | CallResponse |
'call' action's method and input are proxied to EC2 client
Shared/global workflow
-
List workflow tasks:
endly -w='cloud/ec2' -t='?'
- Run workflow
endly -r=start
@start.yaml
pipeline:
ec2-up:
workflow: cloud/ec2
tasks: start
ec2InstanceId: i-0139209d5358e60a4
awsCredential: endly-aws-west
@stop.yaml
pipeline:
ec2-down:
workflow: cloud/ec2
tasks: stop
ec2InstanceId: i-0139209d5358e60a4
awsCredential: endly-aws-west
@restart.yaml
defaults:
ec2InstanceId: i-0139209d5358e60a4
awsCredential: endly-aws-west
pipeline:
ec2-restart:
down:
workflow: cloud/ec2
tasks: stop
up:
workflow: cloud/ec2
tasks: start