software/guile-aws.git
3 weeks agoAdd support for Cost Explorer API. master
Ricardo Wurmus [Sat, 17 Apr 2021 20:56:09 +0000 (22:56 +0200)] 
Add support for Cost Explorer API.

4 weeks agoaws/request: Use parameters for AWS settings.
Ricardo Wurmus [Fri, 9 Apr 2021 12:29:05 +0000 (14:29 +0200)] 
aws/request: Use parameters for AWS settings.

6 weeks agoAdd support for Route 53 API.
Ricardo Wurmus [Sun, 28 Mar 2021 20:50:52 +0000 (22:50 +0200)] 
Add support for Route 53 API.

* aws/api/route53-2013-04-01.normal.json: New API file.
* Makefile.am (JSON_SOURCES): Add it.
* aws/base.scm (aws-operation): Pass xml-namespace to requester.
* aws/request.scm (request-xml-string): New procedure.
(make-operation->request): Accept xml-namespace key.
[host]: Use globalEndpoint if provided.
[request-parameters]: Use request-xml-string for rest-xml protocol.
* aws/serialize.scm (aws-value->sxml): New procedure.
* language/aws/spec.scm (compile-operation): Pass xml-namespace to
aws-operation.

7 weeks agoguix: Fix syntax error.
Ricardo Wurmus [Sun, 21 Mar 2021 10:18:49 +0000 (11:18 +0100)] 
guix: Fix syntax error.

7 weeks agoserialize-aws-value: Add a docstring.
Ricardo Wurmus [Thu, 18 Mar 2021 13:31:08 +0000 (14:31 +0100)] 
serialize-aws-value: Add a docstring.

7 weeks agoserialize: Upcase the first letter of any property name.
Ricardo Wurmus [Thu, 18 Mar 2021 13:30:37 +0000 (14:30 +0100)] 
serialize: Upcase the first letter of any property name.

7 weeks agoIgnore test output files.
Ricardo Wurmus [Thu, 18 Mar 2021 12:37:20 +0000 (13:37 +0100)] 
Ignore test output files.

7 weeks agoserialize-aws-value: Rewrite to pass the tests.
Ricardo Wurmus [Thu, 18 Mar 2021 12:36:11 +0000 (13:36 +0100)] 
serialize-aws-value: Rewrite to pass the tests.

7 weeks agoAdd serialization tests.
Ricardo Wurmus [Thu, 18 Mar 2021 12:35:29 +0000 (13:35 +0100)] 
Add serialization tests.

7 weeks agoMove serialization code to (aws serialize).
Ricardo Wurmus [Thu, 18 Mar 2021 10:36:03 +0000 (11:36 +0100)] 
Move serialization code to (aws serialize).

7 weeks agoAdd Guix package file.
Ricardo Wurmus [Thu, 18 Mar 2021 09:08:23 +0000 (10:08 +0100)] 
Add Guix package file.

7 weeks agoRename guix.scm to manifest.scm.
Ricardo Wurmus [Thu, 18 Mar 2021 09:07:45 +0000 (10:07 +0100)] 
Rename guix.scm to manifest.scm.

7 weeks agoInstall .go files to site-ccache directory.
Ricardo Wurmus [Wed, 17 Mar 2021 21:26:55 +0000 (22:26 +0100)] 
Install .go files to site-ccache directory.

2 months agoUpdate README.
Ricardo Wurmus [Tue, 9 Mar 2021 10:26:15 +0000 (11:26 +0100)] 
Update README.

2 months agoREADME: Add TODO item.
Ricardo Wurmus [Sun, 7 Mar 2021 12:08:35 +0000 (13:08 +0100)] 
README: Add TODO item.

2 months agobase: aws-operation: Pass request arguments to request constructor.
Ricardo Wurmus [Sun, 7 Mar 2021 12:03:30 +0000 (13:03 +0100)] 
base: aws-operation: Pass request arguments to request constructor.

Instead of expecting a single input of the required type, the
procedure returned by AWS-OPERATION now accepts keyword arguments
intended for the request constructor.  This makes for a much less
verbose DSL.  Compare the explicit style

  (DeleteFileSystem
    (DeleteFileSystemRequest
      #:FileSystemId "fs-cabba9e"))

with the new implicit style:

  (DeleteFileSystem
   #:FileSystemId "fs-cabba9e")

* aws/base.scm (aws-operation): Accept an input-constructor; apply it
to a provided list of keyword arguments.
* language/aws/spec.scm (compile-operation): Generate code that
specifies the input constructor.
* README.org: Update examples.

2 months agospec: compile-shape: Prefer primitive type checkers for members.
Ricardo Wurmus [Sun, 7 Mar 2021 07:44:49 +0000 (08:44 +0100)] 
spec: compile-shape: Prefer primitive type checkers for members.

* language/aws/spec.scm (compile-shape): Only check for the AWS shape
type if the member value is a complex type and not merely a wrapper
around a primitive type.

2 months agospec: primitive-type-checker: Recurse into lists.
Ricardo Wurmus [Sun, 7 Mar 2021 07:43:31 +0000 (08:43 +0100)] 
spec: primitive-type-checker: Recurse into lists.

* language/aws/spec.scm (primitive-type-checker): Use the
primitive-type-checker recursively for list values that are (wrappers
around) primitive types.

2 months agospec: compile-shape-stubs: Record encountered shape specs.
Ricardo Wurmus [Sun, 7 Mar 2021 07:41:45 +0000 (08:41 +0100)] 
spec: compile-shape-stubs: Record encountered shape specs.

We use this when compiling structures to determine if a structure
member is a wrapper around a primitive type.

2 months agospec: primitive-type-checker: Support string limit checking.
Ricardo Wurmus [Sun, 7 Mar 2021 07:40:24 +0000 (08:40 +0100)] 
spec: primitive-type-checker: Support string limit checking.

2 months agorequest: aws-value->scm: Support parent name stripping.
Ricardo Wurmus [Sun, 7 Mar 2021 07:38:52 +0000 (08:38 +0100)] 
request: aws-value->scm: Support parent name stripping.

This is necessary to remove unnecessary nesting when serializing
wrappers around primitive types.

2 months agorequest: Do not export serialize-aws-value.
Ricardo Wurmus [Sun, 7 Mar 2021 07:35:15 +0000 (08:35 +0100)] 
request: Do not export serialize-aws-value.

2 months agorequest: Remove stray pk.
Ricardo Wurmus [Sat, 6 Mar 2021 22:41:26 +0000 (23:41 +0100)] 
request: Remove stray pk.

2 months agoUpdate README.
Ricardo Wurmus [Wed, 3 Mar 2021 22:08:57 +0000 (23:08 +0100)] 
Update README.

2 months agoaws/request: Only process server response if it exists.
Ricardo Wurmus [Wed, 3 Mar 2021 21:55:44 +0000 (22:55 +0100)] 
aws/request: Only process server response if it exists.

2 months agospec: Add comment.
Ricardo Wurmus [Tue, 2 Mar 2021 21:58:18 +0000 (22:58 +0100)] 
spec: Add comment.

2 months agoaws/request: Use JSON for "rest-json" APIs.
Ricardo Wurmus [Tue, 2 Mar 2021 21:57:31 +0000 (22:57 +0100)] 
aws/request: Use JSON for "rest-json" APIs.

2 months agoaws/request: make-operation->request: Always append request body.
Ricardo Wurmus [Tue, 2 Mar 2021 21:56:46 +0000 (22:56 +0100)] 
aws/request: make-operation->request: Always append request body.

* aws/request.scm (make-operation->request): Remove match expression.

2 months agoaws/request: make-operation->request: Send request to full URI.
Ricardo Wurmus [Tue, 2 Mar 2021 21:55:54 +0000 (22:55 +0100)] 
aws/request: make-operation->request: Send request to full URI.

* aws/request.scm (make-operation->request): Send HTTP request to full
URI, not just the endpoint domain.

2 months agoaws/request: Add parameterize-request-uri.
Ricardo Wurmus [Tue, 2 Mar 2021 21:54:55 +0000 (22:54 +0100)] 
aws/request: Add parameterize-request-uri.

* aws/request.scm (parameterize-request-uri): New procedure.
(make-operation->request)[canonical-uri]: Use it.

2 months agoaws/request: Split request-json-string.
Ricardo Wurmus [Tue, 2 Mar 2021 21:54:10 +0000 (22:54 +0100)] 
aws/request: Split request-json-string.

* aws/request.scm (input-arguments->scm): New procedure.
(request-json-string): Use it.

2 months agorequest: Respect GUILE_AWS_DEBUG_ENDPOINT to ease debugging.
Ricardo Wurmus [Thu, 25 Feb 2021 14:20:53 +0000 (15:20 +0100)] 
request: Respect GUILE_AWS_DEBUG_ENDPOINT to ease debugging.

2 months agorequest: Support sending of JSON requests.
Ricardo Wurmus [Thu, 25 Feb 2021 14:20:24 +0000 (15:20 +0100)] 
request: Support sending of JSON requests.

2 months agorequest: Add request-query-string.
Ricardo Wurmus [Thu, 25 Feb 2021 14:19:20 +0000 (15:19 +0100)] 
request: Add request-query-string.

* aws/request.scm (request-query-string): New procedure.

2 months agorequest: Parse JSON responses.
Ricardo Wurmus [Thu, 25 Feb 2021 14:17:18 +0000 (15:17 +0100)] 
request: Parse JSON responses.

* aws/request.scm (make-operation->request): Inspect content-type of
server response.

2 months agobase: aws-operation: Make input argument optional.
Ricardo Wurmus [Thu, 25 Feb 2021 13:04:36 +0000 (14:04 +0100)] 
base: aws-operation: Make input argument optional.

2 months agorequest: Patch (web http)'s handling of the Authorization header.
Ricardo Wurmus [Wed, 24 Feb 2021 23:22:32 +0000 (00:22 +0100)] 
request: Patch (web http)'s handling of the Authorization header.

* aws/request.scm: Declare a new authorization header with a writer
that does not quote values.

10 months agoAdd README.
Ricardo Wurmus [Tue, 7 Jul 2020 21:25:01 +0000 (23:25 +0200)] 
Add README.

10 months agoaws/api: Add API update script.
Ricardo Wurmus [Tue, 7 Jul 2020 20:47:40 +0000 (22:47 +0200)] 
aws/api: Add API update script.

* aws/api/update.sh: New file.

10 months agoaws/api: Update EC2 API.
Ricardo Wurmus [Tue, 7 Jul 2020 20:46:39 +0000 (22:46 +0200)] 
aws/api: Update EC2 API.

* aws/api/ec2-2016-11-15.normal.json: Replace with version v2.680.0.
* aws/api/README: Update version information.

10 months agoaws/api: Update Cloudfront API.
Ricardo Wurmus [Tue, 7 Jul 2020 20:45:47 +0000 (22:45 +0200)] 
aws/api: Update Cloudfront API.

* aws/api/cloudfront-2019-03-26.normal.json: Replace with version v2.680.0.

10 months agoaws/api: Update S3 API.
Ricardo Wurmus [Tue, 7 Jul 2020 20:44:57 +0000 (22:44 +0200)] 
aws/api: Update S3 API.

* aws/api/s3-2006-03-01.normal.json: Replace with version v2.680.0.

10 months agoaws/request: make-operation->request: Use lowercase for authorization.
Ricardo Wurmus [Tue, 7 Jul 2020 20:17:37 +0000 (22:17 +0200)] 
aws/request: make-operation->request: Use lowercase for authorization.

When we use the symbol 'Authorization as the name of the header, Guile
complains "Bad request: Bad value for header Authorization".

We don't want or need Guile to make this judgement.  By using
'authorization we avoid this problem.

* aws/request.scm (make-operation->request)[new-headers]: Use
lowercase for authorization header name.

10 months agoaws/request: make-operation->request: Use requested HTTP method.
Ricardo Wurmus [Tue, 7 Jul 2020 19:31:49 +0000 (21:31 +0200)] 
aws/request: make-operation->request: Use requested HTTP method.

Don't just use POST; use whatever method the API operation requires.
Only add a request body for POST requests.

* aws/request.scm (make-operation->request): Use HTTP-REQUEST instead
of HTTP-POST.

10 months agoaws/request: make-operation->request: Include content hash header.
Ricardo Wurmus [Tue, 7 Jul 2020 19:28:01 +0000 (21:28 +0200)] 
aws/request: make-operation->request: Include content hash header.

The x-amz-content-sha256 is required for S3.

* aws/request.scm (make-operation->request)[headers]: Add
x-amz-content-sha256 header.

10 months agoaws/request: make-operation->request: Handle empty input values.
Ricardo Wurmus [Tue, 7 Jul 2020 19:27:13 +0000 (21:27 +0200)] 
aws/request: make-operation->request: Handle empty input values.

* aws/request.scm (make-operation->request)[request-parameters]:
Gracefully deal with empty input values.

10 months agoaws/request: make-operation->request: Define PAYLOAD-HASH.
Ricardo Wurmus [Tue, 7 Jul 2020 18:24:26 +0000 (20:24 +0200)] 
aws/request: make-operation->request: Define PAYLOAD-HASH.

* aws/request.scm (make-operation->request)[payload-hash]: New
variable definition.

10 months agoaws/request: Overwrite (web http)'s DEFAULT-VAL-WRITER.
Ricardo Wurmus [Tue, 7 Jul 2020 18:19:56 +0000 (20:19 +0200)] 
aws/request: Overwrite (web http)'s DEFAULT-VAL-WRITER.

The DEFAULT-VAL-WRITER procedure in Guile's (web http) module causes
values in headers to be quoted when they contain a semicolon.

The Authorization header that AWS expects contains a field
SignedHeaders whose value is a semicolon-separated list of header
names.  When this list is quoted AWS considers the opening quote
character to be part of the name of the first header and the closing
quote character to be part of the name of the last header.

* aws/request.scm (my-default-val-writer): New procedure; replace the
definition of DEFAULT-VAL-WRITER in Guile's (web http).

10 months agoAdd EFS API.
Ricardo Wurmus [Mon, 6 Jul 2020 15:53:31 +0000 (17:53 +0200)] 
Add EFS API.

* aws/api/elasticfilesystem-2015-02-01.normal.json: New file.
* Makefile.am (JSON_SOURCES): Add it.
* aws/api/README: Mention it.

11 months agoAdd ECR API.
Ricardo Wurmus [Mon, 25 May 2020 14:36:04 +0000 (16:36 +0200)] 
Add ECR API.

11 months agoAdd EBS API.
Ricardo Wurmus [Thu, 21 May 2020 05:23:22 +0000 (07:23 +0200)] 
Add EBS API.

11 months agoAdd ECS API.
Ricardo Wurmus [Wed, 20 May 2020 15:43:07 +0000 (17:43 +0200)] 
Add ECS API.

21 months agoInitial commit.
Ricardo Wurmus [Fri, 28 Jun 2019 23:51:57 +0000 (01:51 +0200)] 
Initial commit.