esp_sdk 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +114 -41
- data/lib/esp_sdk/client.rb +1 -1
- data/lib/esp_sdk/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8c01a4884ffd3c261307b32243b8723270548c0
|
4
|
+
data.tar.gz: edfe42c64b0f212cfb1f0846073746aad4a8931c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b4b3e5d2aa705fce7bd4585c27c13b287a20c38d6cf4df4e028c670f180ab4281401e96634fe7f94b2060e558c084884b5b43c9e03fd93aa5750bfe725dc103
|
7
|
+
data.tar.gz: 97b14f4f7636ee30d77ac58a9c7199681ca0a0509b0775e37e7060ae939f0570972761089fc36591b21cc377c2040de8ee02d8fd44eff5909fe835c83a2dbe0c
|
data/README.md
CHANGED
@@ -31,22 +31,22 @@ Or install it yourself as:
|
|
31
31
|
api = EspSdk::Api.new(email: 'me@google.com', password: 'password', version: 'optional')
|
32
32
|
|
33
33
|
## Configuration
|
34
|
-
|
34
|
+
|
35
35
|
api.config => #<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>
|
36
|
-
|
36
|
+
|
37
37
|
# Authorization token
|
38
38
|
api.config.token => "6_4wys1a2FhqsECstavC"
|
39
|
-
|
39
|
+
|
40
40
|
# Token expiration. ActiveSupport::TimeWithZone
|
41
41
|
api.config.token_expires_at => Fri, 19 Sep 2014 15:39:10 UTC +00:00
|
42
|
-
|
42
|
+
|
43
43
|
# Authorization email
|
44
44
|
api.config.email => "me@gmail.com"
|
45
45
|
|
46
46
|
## End points array
|
47
47
|
|
48
48
|
# Current and all endpoints in a single array
|
49
|
-
|
49
|
+
|
50
50
|
api.end_points =>
|
51
51
|
[
|
52
52
|
[0] #<EspSdk::EndPoints::Reports:0x000001019bc498 @config=#<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>,
|
@@ -65,26 +65,26 @@ Or install it yourself as:
|
|
65
65
|
## Reports end point
|
66
66
|
### List action
|
67
67
|
# List action is a pageable response with a total of 5 reports per page.
|
68
|
-
api.reports.list =>
|
68
|
+
api.reports.list =>
|
69
69
|
{
|
70
70
|
"id" => 130,
|
71
71
|
"created_at" => "2014-08-06T19:59:57.540Z",
|
72
72
|
"team" => "Evident"
|
73
73
|
}
|
74
|
-
|
74
|
+
|
75
75
|
# Current page
|
76
76
|
api.reports.current_page
|
77
|
-
|
77
|
+
|
78
78
|
# Next page sets current_page with the next page results.
|
79
79
|
api.reports.next_page
|
80
|
-
|
80
|
+
|
81
81
|
# Previous page sets current_page with the previous page results.
|
82
82
|
api.reports.prev_page
|
83
83
|
|
84
84
|
### Show action
|
85
85
|
# Show a specific report
|
86
86
|
# Required :id
|
87
|
-
api.reports.show(id: 130) =>
|
87
|
+
api.reports.show(id: 130) =>
|
88
88
|
{
|
89
89
|
"report" => 130,
|
90
90
|
"created_at" => "2014-08-06T19:59:57.540Z",
|
@@ -107,7 +107,7 @@ Or install it yourself as:
|
|
107
107
|
}
|
108
108
|
},
|
109
109
|
}
|
110
|
-
|
110
|
+
|
111
111
|
# Current record shows the current record
|
112
112
|
api.reports.current_record
|
113
113
|
|
@@ -324,7 +324,7 @@ Or install it yourself as:
|
|
324
324
|
#### This endpoint is used for returning dashboard stats at a specific hour in the past
|
325
325
|
# Required params: time: => '1413999010' Unix Time
|
326
326
|
# The time is floored and has five minutes subtracted. Then adds an hour for the end time. Any reports between that hour will have their stats returned.
|
327
|
-
# EX:
|
327
|
+
# EX:
|
328
328
|
# start_time = DateTime.strptime('1413999010','%s').at_beginning_of_hour - 5.minutes
|
329
329
|
# end_time = start_time + 1.hour
|
330
330
|
api.dashboard.timewarp(time: '1413999010') =>
|
@@ -569,13 +569,86 @@ Or install it yourself as:
|
|
569
569
|
]
|
570
570
|
}
|
571
571
|
|
572
|
+
## External Accounts end point
|
573
|
+
### List action
|
574
|
+
# list is a pageable response of 25 total external accounts per page
|
575
|
+
api.external_accounts.list =>
|
576
|
+
[
|
577
|
+
[0] {
|
578
|
+
"id" => 1,
|
579
|
+
"created_at" => "2014-10-22T16:23:19.615Z",
|
580
|
+
"updated_at" => "2014-11-03T21:39:36.891Z",
|
581
|
+
"organization_id" => 1,
|
582
|
+
"nickname" => "Ops",
|
583
|
+
"team_id" => 1,
|
584
|
+
"sub_organization_id" => 1,
|
585
|
+
"arn" => "arn:aws:iam::12345:role/evident_service_role",
|
586
|
+
"external_id" => "External ID"
|
587
|
+
}
|
588
|
+
]
|
589
|
+
# Current page
|
590
|
+
api.external_accounts.current_page
|
591
|
+
|
592
|
+
# Next page sets current page with the next page results.
|
593
|
+
api.external_accounts.next_page
|
594
|
+
|
595
|
+
# Prev page sets current page with the previous page results.
|
596
|
+
api.external_accounts.prev_page
|
597
|
+
|
598
|
+
### Show action
|
599
|
+
# Show a specific external account
|
600
|
+
# Required :id
|
601
|
+
api.external_accounts.show(id: 1) =>
|
602
|
+
{
|
603
|
+
"id" => 1,
|
604
|
+
"created_at" => "2014-10-22T16:23:19.615Z",
|
605
|
+
"updated_at" => "2014-11-03T21:39:36.891Z",
|
606
|
+
"organization_id" => 1,
|
607
|
+
"nickname" => "Ops",
|
608
|
+
"team_id" => 1,
|
609
|
+
"sub_organization_id" => 1,
|
610
|
+
"arn" => "arn:aws:iam::12345:role/evident_service_role",
|
611
|
+
"external_id" => "External ID"
|
612
|
+
}
|
613
|
+
|
614
|
+
# Current record
|
615
|
+
api.external_accounts.current_record
|
616
|
+
|
617
|
+
### Update action
|
618
|
+
# Update a specific external account
|
619
|
+
# Required :id
|
620
|
+
api.external_accounts.update(id: 1, nickname: 'Dev Ops') =>
|
621
|
+
{
|
622
|
+
"id" => 1,
|
623
|
+
"created_at" => "2014-10-22T16:23:19.615Z",
|
624
|
+
"updated_at" => "2014-11-03T21:39:36.891Z",
|
625
|
+
"organization_id" => 1,
|
626
|
+
"nickname" => "Dev Ops",
|
627
|
+
"team_id" => 1,
|
628
|
+
"sub_organization_id" => 1,
|
629
|
+
"arn" => "arn:aws:iam::12345:role/evident_service_role",
|
630
|
+
"external_id" => "External ID"
|
631
|
+
}
|
632
|
+
|
633
|
+
### Destroy action
|
634
|
+
# Destroy a specific external account
|
635
|
+
# Required :id
|
636
|
+
api.external_accounts.destroy(id: 1) =>
|
637
|
+
{
|
638
|
+
"success" => "Dev Ops has been destroyed"
|
639
|
+
}
|
640
|
+
|
641
|
+
### Create action
|
642
|
+
# Create a new external account
|
643
|
+
|
644
|
+
|
572
645
|
|
573
646
|
## Services end point
|
574
647
|
#### *Note this end point is a read only end point, and requires the user to have manager role access
|
575
648
|
#### This end point can be used to for retrieving a service id to apply to a custom signature. Example your custom signature targets EC2 services.
|
576
649
|
### List action
|
577
650
|
# list is a pageable response of 25 total signatures per page
|
578
|
-
api.services.list =>
|
651
|
+
api.services.list =>
|
579
652
|
[
|
580
653
|
[ 4] {
|
581
654
|
"id" => 5,
|
@@ -589,8 +662,8 @@ Or install it yourself as:
|
|
589
662
|
### Show action
|
590
663
|
# Show a specific signature
|
591
664
|
# Required :id
|
592
|
-
|
593
|
-
api.show(id: 5) =>
|
665
|
+
|
666
|
+
api.services.show(id: 5) =>
|
594
667
|
{
|
595
668
|
"id" => 5,
|
596
669
|
"name" => "EC2",
|
@@ -604,7 +677,7 @@ Or install it yourself as:
|
|
604
677
|
## Custom Signatures end point
|
605
678
|
### List action
|
606
679
|
# List is a pageable response of 25 total signatures per page
|
607
|
-
api.custom_signatures.list =>
|
680
|
+
api.custom_signatures.list =>
|
608
681
|
[
|
609
682
|
[ 0] {
|
610
683
|
"id" => 4,
|
@@ -622,20 +695,20 @@ Or install it yourself as:
|
|
622
695
|
"deleted_at" => nil
|
623
696
|
}
|
624
697
|
}
|
625
|
-
|
698
|
+
|
626
699
|
# Current page
|
627
700
|
api.custom_signatures.current_page
|
628
|
-
|
701
|
+
|
629
702
|
# Next page sets current page with the next page results.
|
630
703
|
api.custom_signatures.next_page
|
631
|
-
|
704
|
+
|
632
705
|
# Prev page sets current page with the previous page results.
|
633
706
|
api.custom_signatures.prev_page
|
634
|
-
|
707
|
+
|
635
708
|
### Show action
|
636
709
|
# Show a specific custom signature
|
637
710
|
# Required :id
|
638
|
-
|
711
|
+
|
639
712
|
api.custom_signatures.show(id: 4) =>
|
640
713
|
{
|
641
714
|
"id" => 4,
|
@@ -702,13 +775,13 @@ Or install it yourself as:
|
|
702
775
|
{
|
703
776
|
"success" => "Demo Signature has been destroyed"
|
704
777
|
}
|
705
|
-
|
778
|
+
|
706
779
|
### Run action
|
707
780
|
# Run a custom signature
|
708
781
|
# Required :id => ID of the custom signature to run
|
709
782
|
# Required :external_account_id => ID of the external account to use
|
710
783
|
# Required :regions => Array of regions to run the signature in
|
711
|
-
|
784
|
+
|
712
785
|
api.custom_signatures.run(id: 1, external_account_id: 1, regions: [:us_east_1]) =>
|
713
786
|
{
|
714
787
|
"alerts" => [
|
@@ -759,7 +832,7 @@ Or install it yourself as:
|
|
759
832
|
}
|
760
833
|
|
761
834
|
### Run Raw action
|
762
|
-
# Run a raw custom signature
|
835
|
+
# Run a raw custom signature
|
763
836
|
# Required: :signature => JavaScript signature to run as a string
|
764
837
|
# Required :external_account_id => ID of the external account to use
|
765
838
|
# Required :regions => Array of regions to run the signature in
|
@@ -812,11 +885,11 @@ Or install it yourself as:
|
|
812
885
|
]
|
813
886
|
}
|
814
887
|
|
815
|
-
|
888
|
+
|
816
889
|
## Signatures end point
|
817
890
|
### List action
|
818
891
|
# List is a pageable response of 25 total signatures per page.
|
819
|
-
api.signatures.list =>
|
892
|
+
api.signatures.list =>
|
820
893
|
[
|
821
894
|
[ 0] {
|
822
895
|
"id" => 35,
|
@@ -835,20 +908,20 @@ Or install it yourself as:
|
|
835
908
|
}
|
836
909
|
},
|
837
910
|
]
|
838
|
-
|
911
|
+
|
839
912
|
# Current page
|
840
913
|
api.signatures.current_page
|
841
|
-
|
914
|
+
|
842
915
|
# Next page sets current page with the next page results.
|
843
916
|
api.signatures.next_page
|
844
|
-
|
917
|
+
|
845
918
|
# Prev page sets current page with the previous page results.
|
846
919
|
api.signatures.prev_page
|
847
920
|
|
848
921
|
### Show action
|
849
922
|
# Show a specific signature
|
850
923
|
# Required :id
|
851
|
-
api.signatures.show(id: 35) =>
|
924
|
+
api.signatures.show(id: 35) =>
|
852
925
|
{
|
853
926
|
"id" => 35,
|
854
927
|
"name" => "Global Telnet",
|
@@ -913,13 +986,13 @@ Or install it yourself as:
|
|
913
986
|
}
|
914
987
|
|
915
988
|
### Run action
|
916
|
-
|
989
|
+
|
917
990
|
# Run an Evident Signature
|
918
991
|
Required :signature_name => name of signature to run
|
919
992
|
Required :external_account_id => ID of the external account with the ARN/External ID to use
|
920
993
|
Required :regions => Array of regions to run the signature in
|
921
994
|
# Requires manager role access
|
922
|
-
|
995
|
+
|
923
996
|
api.signatures.run(signature_name: 'validate_cloud_formation_template', regions: [:us_east_1], external_account_id: 1)
|
924
997
|
{
|
925
998
|
"alerts" => [
|
@@ -1002,7 +1075,7 @@ Or install it yourself as:
|
|
1002
1075
|
"sso_idp_id" => nil
|
1003
1076
|
}
|
1004
1077
|
|
1005
|
-
|
1078
|
+
|
1006
1079
|
### Update action
|
1007
1080
|
# Update your organizations information
|
1008
1081
|
# Required :id
|
@@ -1040,13 +1113,13 @@ Or install it yourself as:
|
|
1040
1113
|
"updated_at" => "2014-09-03T12:32:50.472Z"
|
1041
1114
|
}
|
1042
1115
|
]
|
1043
|
-
|
1116
|
+
|
1044
1117
|
# Current page
|
1045
1118
|
api.sub_organizations.current_page
|
1046
|
-
|
1119
|
+
|
1047
1120
|
# Next page sets current page with the next page results.
|
1048
1121
|
api.sub_organizations.next_page
|
1049
|
-
|
1122
|
+
|
1050
1123
|
# Prev page sets current page with the previous page results.
|
1051
1124
|
api.sub_organizations.prev_page
|
1052
1125
|
|
@@ -1097,7 +1170,7 @@ Or install it yourself as:
|
|
1097
1170
|
"success" => "Test has been destroyed"
|
1098
1171
|
}
|
1099
1172
|
|
1100
|
-
|
1173
|
+
|
1101
1174
|
## Teams end point
|
1102
1175
|
### List action
|
1103
1176
|
# List is a pageable response of 25 total signatures per page.
|
@@ -1113,13 +1186,13 @@ Or install it yourself as:
|
|
1113
1186
|
"deleted_at" => nil
|
1114
1187
|
},
|
1115
1188
|
]
|
1116
|
-
|
1189
|
+
|
1117
1190
|
# Current page
|
1118
1191
|
api.teams.current_page
|
1119
|
-
|
1192
|
+
|
1120
1193
|
# Next page sets current page with the next page results.
|
1121
1194
|
api.teams.next_page
|
1122
|
-
|
1195
|
+
|
1123
1196
|
# Prev page sets current page with the previous page results.
|
1124
1197
|
api.teams.prev_page
|
1125
1198
|
|
@@ -1176,7 +1249,7 @@ Or install it yourself as:
|
|
1176
1249
|
"success" => "New Name has been destroyed"
|
1177
1250
|
}
|
1178
1251
|
|
1179
|
-
|
1252
|
+
|
1180
1253
|
## Contributing
|
1181
1254
|
|
1182
1255
|
1. Fork it ( https://github.com/[my-github-username]/esp_sdk/fork )
|
data/lib/esp_sdk/client.rb
CHANGED
data/lib/esp_sdk/version.rb
CHANGED