mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
Update aws-sdk.d.ts (#10232)
Make QueueUrl optional, as it can have a default value that is be obtained from aws.SQS:
```
var sqs = new aws.SQS({
region: config.aws.region,
accessKeyId: config.aws.accessID,
secretAccessKey: config.aws.secretKey,
// For every request in this demo, I'm going to be using the same QueueUrl; so,
// rather than explicitly defining it on every request, I can set it here as the
// default QueueUrl to be automatically appended to every request.
params: {
QueueUrl: config.aws.queueUrl
}
});
var sendMessage = Q.nbind( sqs.sendMessage, sqs );
// ---------------------------------------------------------- //
// ---------------------------------------------------------- //
// Now that we have a Q-ified method, we can send the message.
sendMessage({
MessageBody: "This is my first ever SQS request... evar!"
})
```
Based on:
http://www.bennadel.com/blog/2792-shedding-the-monolithic-application-with-aws-simple-queue-service-sqs-and-node-js.htm
This commit is contained in:
committed by
Mohamed Hegazy
parent
d8d32d70b4
commit
3dde9d27db
Vendored
+1
-1
@@ -397,7 +397,7 @@ declare module "aws-sdk" {
|
||||
}
|
||||
|
||||
export interface SendMessageParams {
|
||||
QueueUrl: string;
|
||||
QueueUrl?: string;
|
||||
MessageBody: string;
|
||||
DelaySeconds?: number;
|
||||
MessageAttributes?: { [name:string]: MessageAttribute; }
|
||||
|
||||
Reference in New Issue
Block a user