Skip to content

Commit

Permalink
chore(sqs): clear linter exclusions
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
shivlaks and mergify[bot] authored May 4, 2020
1 parent 3beac0e commit 5ec0af6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-sqs/lib/policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { Construct, Resource } from '@aws-cdk/core';
import { IQueue } from './queue-base';
import { CfnQueuePolicy } from './sqs.generated';

/**
* Properties to associate SQS queues with a policy
*/
export interface QueuePolicyProps {
/**
* The set of queues this policy applies to.
Expand Down
8 changes: 8 additions & 0 deletions packages/@aws-cdk/aws-sqs/lib/queue-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import * as kms from '@aws-cdk/aws-kms';
import { IResource, Resource } from '@aws-cdk/core';
import { QueuePolicy } from './policy';

/**
* Represents an SQS queue
*/
export interface IQueue extends IResource {
/**
* The ARN of this queue
Expand Down Expand Up @@ -245,6 +248,9 @@ export interface QueueAttributes {

/**
* The URL of the queue.
* @see https://docs.aws.amazon.com/sdk-for-net/v2/developer-guide/QueueURL.html
*
* @default - 'https://sqs.<region-endpoint>/<account-ID>/<queue-name>'
*/
readonly queueUrl?: string;

Expand All @@ -256,6 +262,8 @@ export interface QueueAttributes {

/**
* KMS encryption key, if this queue is server-side encrypted by a KMS key.
*
* @default - None
*/
readonly keyArn?: string;
}
7 changes: 7 additions & 0 deletions packages/@aws-cdk/aws-sqs/lib/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ export enum QueueEncryption {
*/
export class Queue extends QueueBase {

/**
* Import an existing SQS queue provided an ARN
*
* @param scope The parent creating construct
* @param id The construct's name
* @param queueArn queue ARN (i.e. arn:aws:sqs:us-east-2:444455556666:queue1)
*/
public static fromQueueArn(scope: Construct, id: string, queueArn: string): IQueue {
return Queue.fromQueueAttributes(scope, id, { queueArn });
}
Expand Down
8 changes: 1 addition & 7 deletions packages/@aws-cdk/aws-sqs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,7 @@
},
"awslint": {
"exclude": [
"construct-base-is-private:@aws-cdk/aws-sqs.QueueBase",
"props-physical-name:@aws-cdk/aws-sqs.QueuePolicyProps",
"docs-public-apis:@aws-cdk/aws-sqs.Queue.fromQueueArn",
"docs-public-apis:@aws-cdk/aws-sqs.IQueue",
"props-default-doc:@aws-cdk/aws-sqs.QueueAttributes.keyArn",
"props-default-doc:@aws-cdk/aws-sqs.QueueAttributes.queueUrl",
"docs-public-apis:@aws-cdk/aws-sqs.QueuePolicyProps"
"props-physical-name:@aws-cdk/aws-sqs.QueuePolicyProps"
]
},
"stability": "stable",
Expand Down

0 comments on commit 5ec0af6

Please sign in to comment.