Skip to content

Commit

Permalink
2621.0.0: Update AWS APIs to v2.621
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Feb 19, 2020
1 parent 0158985 commit b7bd99a
Show file tree
Hide file tree
Showing 7 changed files with 42,958 additions and 42,114 deletions.
2 changes: 1 addition & 1 deletion atoz.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "2619.0.1"
version = "2621.0.0"
author = "disruptek"
description = "Amazon Web Services (AWS) APIs"
license = "MIT"
Expand Down
2,903 changes: 1,462 additions & 1,441 deletions src/atoz/autoscaling_20110101.nim

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions src/atoz/chime_20180501.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12492,6 +12492,9 @@ sloppyConst FetchFromEnv, AWS_ACCESS_KEY_ID
sloppyConst FetchFromEnv, AWS_SECRET_ACCESS_KEY
sloppyConst BakeIntoBinary, AWS_REGION
sloppyConst FetchFromEnv, AWS_ACCOUNT_ID
type
XAmz = enum
SecurityToken = "X-Amz-Security-Token", ContentSha256 = "X-Amz-Content-Sha256"
proc atozSign(recall: var Recallable; query: JsonNode; algo: SigningAlgo = SHA256) =
let
date = makeDateTime()
Expand All @@ -12515,8 +12518,8 @@ proc atozSign(recall: var Recallable; query: JsonNode; algo: SigningAlgo = SHA25
normal = PathNormal.Default
recall.headers["Host"] = url.hostname
recall.headers["X-Amz-Date"] = date
recall.headers[$ContentSha256] = hash(recall.body, SHA256)
let
algo = SHA256
scope = credentialScope(region = region, service = awsServiceName, date = date)
request = canonicalRequest(recall.meth, $url, query, recall.headers, recall.body,
normalize = normal, digest = algo)
Expand All @@ -12531,9 +12534,6 @@ proc atozSign(recall: var Recallable; query: JsonNode; algo: SigningAlgo = SHA25
recall.headers.del "Host"
recall.url = $url

type
XAmz = enum
SecurityToken = "X-Amz-Security-Token", ContentSha256 = "X-Amz-Content-Sha256"
method atozHook(call: OpenApiRestCall; url: Uri; input: JsonNode): Recallable {.base.} =
## the hook is a terrible earworm
var headers = newHttpHeaders(massageHeaders(input.getOrDefault("header")))
Expand All @@ -12550,6 +12550,5 @@ method atozHook(call: OpenApiRestCall; url: Uri; input: JsonNode): Recallable {.
let session = getEnv("AWS_SESSION_TOKEN", "")
if session != "":
headers[$SecurityToken] = session
headers[$ContentSha256] = hash(text, SHA256)
result = newRecallable(call, url, headers, text)
result.atozSign(input.getOrDefault("query"), SHA256)
397 changes: 363 additions & 34 deletions src/atoz/cloud9_20170923.nim

Large diffs are not rendered by default.

40,898 changes: 20,463 additions & 20,435 deletions src/atoz/ec2_20161115.nim

Large diffs are not rendered by default.

38,991 changes: 19,607 additions & 19,384 deletions src/atoz/rds_20141031.nim

Large diffs are not rendered by default.

1,872 changes: 1,058 additions & 814 deletions src/atoz/rekognition_20160627.nim

Large diffs are not rendered by default.

0 comments on commit b7bd99a

Please sign in to comment.