Skip to content

Commit

Permalink
Regenerate prebuilt clients, update examples
Browse files Browse the repository at this point in the history
- no default export anymore
- removed AbortSignal until Deno actually supports it
  • Loading branch information
danopia committed Apr 29, 2021
1 parent 1be8b67 commit ca8f7ed
Show file tree
Hide file tree
Showing 33 changed files with 3,314 additions and 3,562 deletions.
46 changes: 23 additions & 23 deletions grid-services.csv
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
service,version,fullname,id,namespace,protocol,generated,typechecked,bytecount,cachetime
dynamodb,2011-12-05,Amazon DynamoDB,,,json,,,,
dynamodb,2012-08-10,Amazon DynamoDB,dynamodb,DynamoDB,json,ok,ok,126018,2903
ec2,2016-11-15,Amazon Elastic Compute Cloud,ec2,EC2,ec2,ok,ok,1140992,9389
ecr,2015-09-21,Amazon EC2 Container Registry,ecr,ECR,json,ok,ok,50339,2607
eks,2017-11-01,Amazon Elastic Kubernetes Service,eks,EKS,rest-json,ok,ok,62953,2748
elasticloadbalancing,2012-06-01,Elastic Load Balancing,elb,ELB,query,ok,ok,47728,2537
elasticloadbalancingv2,2015-12-01,Elastic Load Balancing,elbv2,ELBv2,query,ok,ok,78826,2652
email,2010-12-01,Amazon Simple Email Service,ses,SES,query,ok,ok,95877,7546
es,2015-01-01,Amazon Elasticsearch Service,es,ES,rest-json,ok,ok,92215,2885
iam,2010-05-08,AWS Identity and Access Management,iam,IAM,query,ok,ok,192644,3892
kinesis,2013-12-02,Amazon Kinesis,kinesis,Kinesis,json,ok,ok,32515,6388
kms,2014-11-01,AWS Key Management Service,kms,KMS,json,ok,ok,49045,2247
dynamodb,2012-08-10,Amazon DynamoDB,dynamodb,DynamoDB,json,ok,ok,123554,4625
ec2,2016-11-15,Amazon Elastic Compute Cloud,ec2,EC2,ec2,ok,ok,1119734,18947
ecr,2015-09-21,Amazon EC2 Container Registry,ecr,ECR,json,ok,ok,48619,2670
eks,2017-11-01,Amazon Elastic Kubernetes Service,eks,EKS,rest-json,ok,ok,61233,4326
elasticloadbalancing,2012-06-01,Elastic Load Balancing,elb,ELB,query,ok,ok,46251,4654
elasticloadbalancingv2,2015-12-01,Elastic Load Balancing,elbv2,ELBv2,query,ok,ok,77082,5743
email,2010-12-01,Amazon Simple Email Service,ses,SES,query,ok,ok,92386,3658
es,2015-01-01,Amazon Elasticsearch Service,es,ES,rest-json,ok,ok,90175,5927
iam,2010-05-08,AWS Identity and Access Management,iam,IAM,query,ok,ok,185002,9459
kinesis,2013-12-02,Amazon Kinesis,kinesis,Kinesis,json,ok,ok,31140,3281
kms,2014-11-01,AWS Key Management Service,kms,KMS,json,ok,ok,46817,2819
lambda,2014-11-11,AWS Lambda,,,rest-json,,,,
lambda,2015-03-31,AWS Lambda,lambda,Lambda,rest-json,ok,ok,101845,3554
monitoring,2010-08-01,Amazon CloudWatch,cloudwatch,CloudWatch,query,ok,ok,61325,3217
pricing,2017-10-15,AWS Price List Service,pricing,Pricing,json,ok,ok,5262,1771
lambda,2015-03-31,AWS Lambda,lambda,Lambda,rest-json,ok,ok,98913,4510
monitoring,2010-08-01,Amazon CloudWatch,cloudwatch,CloudWatch,query,ok,ok,59817,3009
pricing,2017-10-15,AWS Price List Service,pricing,Pricing,json,ok,ok,5055,2817
rds,2013-01-10,Amazon Relational Database Service,,,query,,,,
rds,2013-02-12,Amazon Relational Database Service,,,query,,,,
rds,2013-09-09,Amazon Relational Database Service,,,query,,,,
rds,2014-09-01,Amazon Relational Database Service,,,query,,,,
rds,2014-10-31,Amazon Relational Database Service,rds,RDS,query,ok,ok,328901,6144
route53,2013-04-01,Amazon Route 53,route53,Route53,rest-xml,ok,ok,100512,3088
s3,2006-03-01,Amazon Simple Storage Service,s3,S3,rest-xml,ok,ok,266690,4578
sesv2,2019-09-27,Amazon Simple Email Service,sesv2,SESV2,rest-json,ok,ok,113919,2751
sns,2010-03-31,Amazon Simple Notification Service,sns,SNS,query,ok,ok,33350,2132
sqs,2012-11-05,Amazon Simple Queue Service,sqs,SQS,query,ok,ok,30032,1897
ssm,2014-11-06,Amazon Simple Systems Manager (SSM),ssm,SSM,json,ok,ok,270337,4488
streams.dynamodb,2012-08-10,Amazon DynamoDB Streams,dynamodbstreams,DynamoDBStreams,json,ok,ok,10504,1926
sts,2011-06-15,AWS Security Token Service,sts,STS,query,ok,ok,14316,2164
rds,2014-10-31,Amazon Relational Database Service,rds,RDS,query,ok,ok,322292,10266
route53,2013-04-01,Amazon Route 53,route53,Route53,rest-xml,ok,ok,97240,3756
s3,2006-03-01,Amazon Simple Storage Service,s3,S3,rest-xml,ok,ok,262034,8624
sesv2,2019-09-27,Amazon Simple Email Service,sesv2,SESV2,rest-json,ok,ok,109892,4289
sns,2010-03-31,Amazon Simple Notification Service,sns,SNS,query,ok,ok,31733,3556
sqs,2012-11-05,Amazon Simple Queue Service,sqs,SQS,query,ok,ok,29026,3150
ssm,2014-11-06,Amazon Simple Systems Manager (SSM),ssm,SSM,json,ok,ok,264098,8372
streams.dynamodb,2012-08-10,Amazon DynamoDB Streams,dynamodbstreams,DynamoDBStreams,json,ok,ok,10250,2052
sts,2011-06-15,AWS Security Token Service,sts,STS,query,ok,ok,13866,2139
46 changes: 23 additions & 23 deletions lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,29 +154,29 @@ All API definitions are current as of [aws-sdk-js `v2.874.0`](https://github.com

| Module | Protocol | File size | Approx check time |
| --- | --- | ---: | ---: |
| `cloudwatch/mod.ts` | query | 60 KiB | 3.2 sec |
| `dynamodb/mod.ts` | json | 123 KiB | 2.9 sec |
| `dynamodbstreams/mod.ts` | json | 10 KiB | 1.9 sec |
| `ec2/mod.ts` | ec2 | 1114 KiB | 9.4 sec |
| `ecr/mod.ts` | json | 49 KiB | 2.6 sec |
| `eks/mod.ts` | rest-json | 61 KiB | 2.7 sec |
| `elb/mod.ts` | query | 47 KiB | 2.5 sec |
| `elbv2/mod.ts` | query | 77 KiB | 2.7 sec |
| `es/mod.ts` | rest-json | 90 KiB | 2.9 sec |
| `iam/mod.ts` | query | 188 KiB | 3.9 sec |
| `kinesis/mod.ts` | json | 32 KiB | 6.4 sec |
| `kms/mod.ts` | json | 48 KiB | 2.2 sec |
| `lambda/mod.ts` | rest-json | 99 KiB | 3.6 sec |
| `pricing/mod.ts` | json | 5 KiB | 1.8 sec |
| `rds/mod.ts` | query | 321 KiB | 6.1 sec |
| `route53/mod.ts` | rest-xml | 98 KiB | 3.1 sec |
| `s3/mod.ts` | rest-xml | 260 KiB | 4.6 sec |
| `ses/mod.ts` | query | 94 KiB | 7.5 sec |
| `sesv2/mod.ts` | rest-json | 111 KiB | 2.8 sec |
| `sns/mod.ts` | query | 33 KiB | 2.1 sec |
| `sqs/mod.ts` | query | 29 KiB | 1.9 sec |
| `ssm/mod.ts` | json | 264 KiB | 4.5 sec |
| `sts/mod.ts` | query | 14 KiB | 2.2 sec |
| `cloudwatch/mod.ts` | query | 58 KiB | 3.0 sec |
| `dynamodb/mod.ts` | json | 121 KiB | 4.6 sec |
| `dynamodbstreams/mod.ts` | json | 10 KiB | 2.1 sec |
| `ec2/mod.ts` | ec2 | 1093 KiB | 18.9 sec |
| `ecr/mod.ts` | json | 47 KiB | 2.7 sec |
| `eks/mod.ts` | rest-json | 60 KiB | 4.3 sec |
| `elb/mod.ts` | query | 45 KiB | 4.7 sec |
| `elbv2/mod.ts` | query | 75 KiB | 5.7 sec |
| `es/mod.ts` | rest-json | 88 KiB | 5.9 sec |
| `iam/mod.ts` | query | 181 KiB | 9.5 sec |
| `kinesis/mod.ts` | json | 30 KiB | 3.3 sec |
| `kms/mod.ts` | json | 46 KiB | 2.8 sec |
| `lambda/mod.ts` | rest-json | 97 KiB | 4.5 sec |
| `pricing/mod.ts` | json | 5 KiB | 2.8 sec |
| `rds/mod.ts` | query | 315 KiB | 10.3 sec |
| `route53/mod.ts` | rest-xml | 95 KiB | 3.8 sec |
| `s3/mod.ts` | rest-xml | 256 KiB | 8.6 sec |
| `ses/mod.ts` | query | 90 KiB | 3.7 sec |
| `sesv2/mod.ts` | rest-json | 107 KiB | 4.3 sec |
| `sns/mod.ts` | query | 31 KiB | 3.6 sec |
| `sqs/mod.ts` | query | 28 KiB | 3.2 sec |
| `ssm/mod.ts` | json | 258 KiB | 8.4 sec |
| `sts/mod.ts` | query | 14 KiB | 2.1 sec |

[//]: # (Generated Content Barrier)

Expand Down
2 changes: 1 addition & 1 deletion lib/client/instance-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class IMDSv2 {

const httpFetch = fetch(new URL('api/token', this.baseUrl), {
method: 'PUT',
signal: this.makeTimeoutSignal(),
// signal: this.makeTimeoutSignal(),
headers: {
"x-aws-ec2-metadata-token-ttl-seconds": ttlSeconds.toFixed(0),
}});
Expand Down
12 changes: 6 additions & 6 deletions lib/demo.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
#!/usr/bin/env -S deno run --allow-env --allow-read=${HOME}/.aws --allow-net

import {ApiFactory} from './client/mod.ts';
import { ApiFactory } from './client/mod.ts';
const factory = new ApiFactory();

await factory.ensureCredentialsAvailable();


import STS from './services/sts/mod.ts';
import { STS } from './services/sts/mod.ts';
const sts = new STS(factory);
await sts.getCallerIdentity().then(identity => {
console.log('You are', identity.UserId, 'in account', identity.Account);
console.log('ARN:', identity.Arn);
}).catch(console.log);


import EC2 from './services/ec2/mod.ts';
import { EC2 } from './services/ec2/mod.ts';
const ec2 = new EC2(factory);
console.log(await ec2.describeInstances().then(x => x.Reservations).catch(err => err));


import SQS from './services/sqs/mod.ts';
import { SQS } from './services/sqs/mod.ts';
const sqs = new SQS(factory);
console.log(await sqs.listQueues().catch(err => err));


import SNS from './services/sns/mod.ts';
import { SNS } from './services/sns/mod.ts';
const sns = new SNS(factory);
console.log(await sns.listTopics().catch(err => err));


import S3 from './services/s3/mod.ts';
import { S3 } from './services/s3/mod.ts';
const s3 = new S3(factory);
console.log(await s3.listBuckets().catch(err => err));
2 changes: 1 addition & 1 deletion lib/examples/cloudwatch-emitter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S deno run --allow-env --allow-read=${HOME}/.aws --allow-net --unstable

import { ApiFactory } from '../client/mod.ts';
import CloudWatch from '../services/cloudwatch/mod.ts';
import { CloudWatch } from '../services/cloudwatch/mod.ts';

const factory = new ApiFactory();
const cw = new CloudWatch(factory);
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/dynamodb.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S deno run --allow-env --allow-read=${HOME}/.aws --allow-net

import { ApiFactory } from '../client/mod.ts';
import DynamoDB from '../services/dynamodb/mod.ts';
import { DynamoDB } from '../services/dynamodb/mod.ts';

const factory = new ApiFactory();
const ddb = new DynamoDB(factory);
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/ec2-launch-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const ThisScriptUrl = `https://deno.land/x/aws_api/examples/ec2-launch-instance.ts`;

import { ApiFactory } from '../client/mod.ts';
import EC2, { Instance } from '../services/ec2/mod.ts';
import { EC2, Instance } from '../services/ec2/mod.ts';

const factory = new ApiFactory();
const ec2 = new EC2(factory);
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/kinesis-demo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S deno run --allow-env --allow-read=${HOME}/.aws --allow-net

import { ApiFactory } from '../client/mod.ts';
import Kinesis from '../services/kinesis/mod.ts';
import { Kinesis } from '../services/kinesis/mod.ts';

const factory = new ApiFactory();
const kinesis = new Kinesis(factory);
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/s3-bucket-lifecycle.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S deno run --allow-env --allow-read=${HOME}/.aws --allow-net

import { ApiFactory } from '../client/mod.ts';
import S3, {BucketLocationConstraint} from '../services/s3/mod.ts';
import { S3, BucketLocationConstraint } from '../services/s3/mod.ts';

const factory = new ApiFactory();
const s3 = new S3(factory);
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/sqs-redriver.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S deno run --allow-env --allow-read=${HOME}/.aws --allow-net

import { ApiFactory } from '../client/mod.ts';
import SQS from '../services/sqs/mod.ts';
import { SQS } from '../services/sqs/mod.ts';

const factory = new ApiFactory();
const sqs = new SQS(factory);
Expand Down
Loading

0 comments on commit ca8f7ed

Please sign in to comment.