Skip to content

Commit

Permalink
Add region support to logentries logging endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
kellymclaughlin committed Jan 11, 2021
1 parent 7c2292c commit ddb2062
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 90 deletions.
35 changes: 16 additions & 19 deletions fastly/fixtures/logentries/create.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
---
version: 1
rwmutex: {}
interactions:
- request:
body: Service=7i6HN3TK9wS159v2gPAZ8A&Version=33&format=format&name=test-logentries&placement=waf_debug&port=1234&token=abcd1234&use_tls=1
body: ServiceID=7i6HN3TK9wS159v2gPAZ8A&ServiceVersion=112&format=format&name=test-logentries&placement=waf_debug&region=us&token=abcd1234&use_tls=1
form:
Service:
ServiceID:
- 7i6HN3TK9wS159v2gPAZ8A
Version:
- "33"
ServiceVersion:
- "112"
format:
- format
name:
- test-logentries
placement:
- waf_debug
port:
- "1234"
region:
- us
token:
- abcd1234
use_tls:
- "1"
headers:
Content-Type:
- application/x-www-form-urlencoded
Fastly-Key:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
User-Agent:
- FastlyGo/0.4.3.dev (+github.com/fastly/go-fastly; go1.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/33/logging/logentries
- FastlyGo/2.1.0 (+github.com/fastly/go-fastly; go1.15.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/112/logging/logentries
method: POST
response:
body: '{"format":"format","name":"test-logentries","placement":"waf_debug","port":"1234","token":"abcd1234","use_tls":"1","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"33","format_version":"2","response_condition":"","updated_at":"2019-05-09T20:26:14Z","deleted_at":null,"created_at":"2019-05-09T20:26:14Z","public_key":null}'
body: '{"format":"format","name":"test-logentries","placement":"waf_debug","region":"us","token":"abcd1234","use_tls":"1","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"112","port":"0","hostname":null,"created_at":"2021-01-11T15:38:57Z","deleted_at":null,"public_key":null,"format_version":"2","response_condition":"","updated_at":"2021-01-11T15:38:57Z"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -40,27 +37,27 @@ interactions:
Content-Type:
- application/json
Date:
- Thu, 09 May 2019 20:26:15 GMT
- Mon, 11 Jan 2021 15:38:57 GMT
Fastly-Ratelimit-Remaining:
- "994"
- "986"
Fastly-Ratelimit-Reset:
- "1557435600"
- "1610380800"
Status:
- 200 OK
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
Via:
- 1.1 varnish
- 1.1 varnish
- 1.1 varnish, 1.1 varnish
X-Cache:
- MISS, MISS
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-slwdc9036-CONTROL-SLWDC, cache-pao17448-PAO
- cache-control-slwdc9037-CONTROL-SLWDC, cache-den8281-DEN
X-Timer:
- S1557433574.437358,VS0,VE792
- S1610379537.326507,VS0,VE523
status: 200 OK
code: 200
duration: ""
21 changes: 9 additions & 12 deletions fastly/fixtures/logentries/delete.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
---
version: 1
rwmutex: {}
interactions:
- request:
body: ""
form: {}
headers:
Fastly-Key:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
User-Agent:
- FastlyGo/0.4.3.dev (+github.com/fastly/go-fastly; go1.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/33/logging/logentries/new-test-logentries
- FastlyGo/2.1.0 (+github.com/fastly/go-fastly; go1.15.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/112/logging/logentries/new-test-logentries
method: DELETE
response:
body: '{"status":"ok"}'
Expand All @@ -22,27 +19,27 @@ interactions:
Content-Type:
- application/json
Date:
- Thu, 09 May 2019 20:26:17 GMT
- Mon, 11 Jan 2021 15:38:59 GMT
Fastly-Ratelimit-Remaining:
- "992"
- "984"
Fastly-Ratelimit-Reset:
- "1557435600"
- "1610380800"
Status:
- 200 OK
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
Via:
- 1.1 varnish
- 1.1 varnish
- 1.1 varnish, 1.1 varnish
X-Cache:
- MISS, MISS
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-slwdc9036-CONTROL-SLWDC, cache-pao17448-PAO
- cache-control-slwdc9037-CONTROL-SLWDC, cache-den8281-DEN
X-Timer:
- S1557433577.089278,VS0,VE260
- S1610379539.275032,VS0,VE229
status: 200 OK
code: 200
duration: ""
21 changes: 8 additions & 13 deletions fastly/fixtures/logentries/get.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,41 @@
---
version: 1
rwmutex: {}
interactions:
- request:
body: ""
form: {}
headers:
Fastly-Key:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
User-Agent:
- FastlyGo/0.4.3.dev (+github.com/fastly/go-fastly; go1.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/33/logging/logentries/test-logentries
- FastlyGo/2.1.0 (+github.com/fastly/go-fastly; go1.15.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/112/logging/logentries/test-logentries
method: GET
response:
body: '{"public_key":null,"service_id":"7i6HN3TK9wS159v2gPAZ8A","format_version":"2","port":"1234","token":"abcd1234","format":"format","name":"test-logentries","created_at":"2019-05-09T20:26:14Z","updated_at":"2019-05-09T20:26:14Z","deleted_at":null,"placement":"waf_debug","version":"33","use_tls":"1","response_condition":""}'
body: '{"region":"us","response_condition":"","deleted_at":null,"service_id":"7i6HN3TK9wS159v2gPAZ8A","public_key":null,"format":"format","format_version":"2","token":"abcd1234","placement":"waf_debug","hostname":null,"version":"112","name":"test-logentries","created_at":"2021-01-11T15:38:57Z","updated_at":"2021-01-11T15:38:57Z","use_tls":"1","port":"0"}'
headers:
Accept-Ranges:
- bytes
Age:
- "0"
Cache-Control:
- no-cache
Content-Type:
- application/json
Date:
- Thu, 09 May 2019 20:26:16 GMT
- Mon, 11 Jan 2021 15:38:58 GMT
Status:
- 200 OK
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
Via:
- 1.1 varnish
- 1.1 varnish
- 1.1 varnish, 1.1 varnish
X-Cache:
- MISS, MISS
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-slwdc9036-CONTROL-SLWDC, cache-pao17448-PAO
- cache-control-slwdc9037-CONTROL-SLWDC, cache-den8281-DEN
X-Timer:
- S1557433576.962998,VS0,VE397
- S1610379538.143011,VS0,VE321
status: 200 OK
code: 200
duration: ""
21 changes: 8 additions & 13 deletions fastly/fixtures/logentries/list.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,41 @@
---
version: 1
rwmutex: {}
interactions:
- request:
body: ""
form: {}
headers:
Fastly-Key:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
User-Agent:
- FastlyGo/0.4.3.dev (+github.com/fastly/go-fastly; go1.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/33/logging/logentries
- FastlyGo/2.1.0 (+github.com/fastly/go-fastly; go1.15.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/112/logging/logentries
method: GET
response:
body: '[{"token":"abcd1234","use_tls":"1","response_condition":"","placement":"waf_debug","format_version":"2","updated_at":"2019-05-09T20:26:14Z","deleted_at":null,"service_id":"7i6HN3TK9wS159v2gPAZ8A","created_at":"2019-05-09T20:26:14Z","public_key":null,"format":"format","version":"33","name":"test-logentries","port":"1234"}]'
body: '[{"format_version":"2","service_id":"7i6HN3TK9wS159v2gPAZ8A","name":"test-logentries","response_condition":"","hostname":null,"updated_at":"2021-01-11T15:38:57Z","port":"0","placement":"waf_debug","deleted_at":null,"use_tls":"1","version":"112","region":"us","public_key":null,"format":"format","token":"abcd1234","created_at":"2021-01-11T15:38:57Z"}]'
headers:
Accept-Ranges:
- bytes
Age:
- "0"
Cache-Control:
- no-cache
Content-Type:
- application/json
Date:
- Thu, 09 May 2019 20:26:15 GMT
- Mon, 11 Jan 2021 15:38:58 GMT
Status:
- 200 OK
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
Via:
- 1.1 varnish
- 1.1 varnish
- 1.1 varnish, 1.1 varnish
X-Cache:
- MISS, MISS
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-slwdc9036-CONTROL-SLWDC, cache-pao17448-PAO
- cache-control-slwdc9035-CONTROL-SLWDC, cache-den8281-DEN
X-Timer:
- S1557433575.447777,VS0,VE423
- S1610379538.934509,VS0,VE146
status: 200 OK
code: 200
duration: ""
33 changes: 16 additions & 17 deletions fastly/fixtures/logentries/update.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
---
version: 1
rwmutex: {}
interactions:
- request:
body: Name=test-logentries&Service=7i6HN3TK9wS159v2gPAZ8A&Version=33&format_version=2&name=new-test-logentries
body: Name=test-logentries&ServiceID=7i6HN3TK9wS159v2gPAZ8A&ServiceVersion=112&format_version=2&name=new-test-logentries&region=ap
form:
Name:
- test-logentries
Service:
ServiceID:
- 7i6HN3TK9wS159v2gPAZ8A
Version:
- "33"
ServiceVersion:
- "112"
format_version:
- "2"
name:
- new-test-logentries
region:
- ap
headers:
Content-Type:
- application/x-www-form-urlencoded
Fastly-Key:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
User-Agent:
- FastlyGo/0.4.3.dev (+github.com/fastly/go-fastly; go1.12)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/33/logging/logentries/test-logentries
- FastlyGo/2.1.0 (+github.com/fastly/go-fastly; go1.15.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/112/logging/logentries/test-logentries
method: PUT
response:
body: '{"port":"1234","name":"new-test-logentries","format_version":"2","created_at":"2019-05-09T20:26:14Z","token":"abcd1234","public_key":null,"placement":"waf_debug","updated_at":"2019-05-09T20:26:14Z","response_condition":"","version":"33","use_tls":"1","format":"format","deleted_at":null,"service_id":"7i6HN3TK9wS159v2gPAZ8A"}'
body: '{"region":"ap","public_key":null,"version":"112","use_tls":"1","deleted_at":null,"updated_at":"2021-01-11T15:38:57Z","port":0,"placement":"waf_debug","hostname":"","response_condition":"","name":"new-test-logentries","service_id":"7i6HN3TK9wS159v2gPAZ8A","format_version":"2","created_at":"2021-01-11T15:38:57Z","token":"abcd1234","format":"format"}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -34,27 +33,27 @@ interactions:
Content-Type:
- application/json
Date:
- Thu, 09 May 2019 20:26:16 GMT
- Mon, 11 Jan 2021 15:38:59 GMT
Fastly-Ratelimit-Remaining:
- "993"
- "985"
Fastly-Ratelimit-Reset:
- "1557435600"
- "1610380800"
Status:
- 200 OK
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
Via:
- 1.1 varnish
- 1.1 varnish
- 1.1 varnish, 1.1 varnish
X-Cache:
- MISS, MISS
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-slwdc9036-CONTROL-SLWDC, cache-pao17448-PAO
- cache-control-slwdc9035-CONTROL-SLWDC, cache-den8281-DEN
X-Timer:
- S1557433576.472347,VS0,VE516
- S1610379539.600795,VS0,VE585
status: 200 OK
code: 200
duration: ""
25 changes: 11 additions & 14 deletions fastly/fixtures/logentries/version.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
---
version: 1
rwmutex: {}
interactions:
- request:
body: Service=7i6HN3TK9wS159v2gPAZ8A
body: ServiceID=7i6HN3TK9wS159v2gPAZ8A
form:
Service:
ServiceID:
- 7i6HN3TK9wS159v2gPAZ8A
headers:
Content-Type:
- application/x-www-form-urlencoded
Fastly-Key:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
User-Agent:
- FastlyGo/0.4.3.dev (+github.com/fastly/go-fastly; go1.12)
- FastlyGo/2.1.0 (+github.com/fastly/go-fastly; go1.15.2)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version
method: POST
response:
body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","number":33}'
body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","number":112}'
headers:
Accept-Ranges:
- bytes
Expand All @@ -26,27 +23,27 @@ interactions:
Content-Type:
- application/json
Date:
- Thu, 09 May 2019 20:26:14 GMT
- Mon, 11 Jan 2021 15:38:57 GMT
Fastly-Ratelimit-Remaining:
- "995"
- "987"
Fastly-Ratelimit-Reset:
- "1557435600"
- "1610380800"
Status:
- 200 OK
Strict-Transport-Security:
- max-age=31536000
Vary:
- Accept-Encoding
Via:
- 1.1 varnish
- 1.1 varnish
- 1.1 varnish, 1.1 varnish
X-Cache:
- MISS, MISS
X-Cache-Hits:
- 0, 0
X-Served-By:
- cache-control-slwdc9035-CONTROL-SLWDC, cache-pao17448-PAO
- cache-control-slwdc9037-CONTROL-SLWDC, cache-den8281-DEN
X-Timer:
- S1557433574.890134,VS0,VE483
- S1610379537.997960,VS0,VE253
status: 200 OK
code: 200
duration: ""
Loading

0 comments on commit ddb2062

Please sign in to comment.