@@ -81,47 +81,7 @@ program: |
8181 }
8282 :
8383 (
84- state.?want_more.orValue(false) ?
8584 state.with({
86-
87- // Perform a succession of keyed hash operations (HMAC) on the request date, Region, and service,
88- // with the AWS secret access key as the key for the initial hashing operation.
89- // Refer https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html#derive-signing-key
90-
91- "signing_key": "aws4_request".hmac("sha256",
92- "config".hmac("sha256",
93- state.aws_region.hmac("sha256",
94- now.format("20060102").hmac("sha256",
95- bytes("AWS4" + state.secret_key)
96- )
97- )
98- )
99- ),
100- // Create a string_to_sign that includes the algorithm, request timestamp, credential scope, and hashed canonical request
101- // Refer https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html#create-string-to-sign
102- "string_to_sign": [
103- 'AWS4-HMAC-SHA256',
104- now.format("20060102T150405Z"),
105- now.format("20060102") + '/' + state.aws_region + '/config/aws4_request',
106- [
107- 'POST',
108- '/',
109- '',
110- "content-type:application/x-amz-json-1.1",
111- "host:config." + state.aws_region + "." + state.tld,
112- "x-amz-date:" + now.format("20060102T150405Z"),
113- "x-amz-target:StarlingDoveService.DescribeConfigRules",
114- '',
115- "content-type;host;x-amz-date;x-amz-target",
116- {
117- ?"NextToken": state.?next_page.rule_token
118- }.encode_json().sha256().hex()
119- ].join("\n").sha256().hex()
120- ].join("\n"),
121- })
122- :
123- state.with({
124-
12585 // Perform a succession of keyed hash operations (HMAC) on the request date, Region, and service,
12686 // with the AWS secret access key as the key for the initial hashing operation.
12787 // Refer https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html#derive-signing-key
@@ -156,7 +116,7 @@ program: |
156116 ?"NextToken": state.?next_page.rule_token
157117 }.encode_json().sha256().hex()
158118 ].join("\n").sha256().hex()
159- ].join("\n")
119+ ].join("\n"),
160120 })
161121 ).as(state,
162122 post_request(
0 commit comments