terraconstructs 0.1.10 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +1297 -629
- package/lib/asset-staging.js +1 -1
- package/lib/aws/arn.js +4 -3
- package/lib/aws/aws-asset-manager.js +1 -1
- package/lib/aws/aws-construct.js +1 -1
- package/lib/aws/aws-stack.js +1 -1
- package/lib/aws/aws-tags.js +2 -2
- package/lib/aws/cloudwatch/actions/appscaling.js +1 -1
- package/lib/aws/cloudwatch/actions/ec2.js +1 -1
- package/lib/aws/cloudwatch/actions/lambda.js +1 -1
- package/lib/aws/cloudwatch/actions/sns.js +1 -1
- package/lib/aws/cloudwatch/actions/ssm.js +2 -2
- package/lib/aws/cloudwatch/alarm-base.js +1 -1
- package/lib/aws/cloudwatch/alarm-rule.js +1 -1
- package/lib/aws/cloudwatch/alarm-status-widget.js +1 -1
- package/lib/aws/cloudwatch/alarm.js +1 -1
- package/lib/aws/cloudwatch/composite-alarm.js +1 -1
- package/lib/aws/cloudwatch/dashboard.js +1 -1
- package/lib/aws/cloudwatch/data-protection-policy.js +3 -3
- package/lib/aws/cloudwatch/graph.js +8 -8
- package/lib/aws/cloudwatch/layout.js +3 -3
- package/lib/aws/cloudwatch/log-destinations/kinesis.js +1 -1
- package/lib/aws/cloudwatch/log-destinations/lambda.js +1 -1
- package/lib/aws/cloudwatch/log-group.js +1 -1
- package/lib/aws/cloudwatch/log-query.js +1 -1
- package/lib/aws/cloudwatch/log-stream.js +1 -1
- package/lib/aws/cloudwatch/metric-filter.js +1 -1
- package/lib/aws/cloudwatch/metric.js +2 -2
- package/lib/aws/cloudwatch/pattern.js +3 -3
- package/lib/aws/cloudwatch/policy.js +1 -1
- package/lib/aws/cloudwatch/query-definition.js +2 -2
- package/lib/aws/cloudwatch/stats.js +1 -1
- package/lib/aws/cloudwatch/subscription-filter.js +1 -1
- package/lib/aws/cloudwatch/text.js +1 -1
- package/lib/aws/cloudwatch/variable.js +3 -3
- package/lib/aws/cloudwatch/widget.js +1 -1
- package/lib/aws/compute/access-log.js +4 -4
- package/lib/aws/compute/activity.js +1 -1
- package/lib/aws/compute/alb/application-listener-action.js +1 -1
- package/lib/aws/compute/alb/application-listener-certificate.js +1 -1
- package/lib/aws/compute/alb/application-listener-rule.js +1 -1
- package/lib/aws/compute/alb/application-listener.js +1 -1
- package/lib/aws/compute/alb/application-load-balancer.js +1 -1
- package/lib/aws/compute/alb/application-target-group.js +1 -1
- package/lib/aws/compute/alb/conditions.js +1 -1
- package/lib/aws/compute/alb/trust-store-revocation.js +1 -1
- package/lib/aws/compute/alb/trust-store.js +1 -1
- package/lib/aws/compute/api-definition.js +3 -3
- package/lib/aws/compute/api-key.js +2 -2
- package/lib/aws/compute/architecture.js +1 -1
- package/lib/aws/compute/aspects/require-imdsv2-aspect.js +2 -2
- package/lib/aws/compute/authorizer.js +1 -1
- package/lib/aws/compute/authorizers/identity-source.js +1 -1
- package/lib/aws/compute/authorizers/lambda.js +2 -2
- package/lib/aws/compute/base-path-mapping.js +1 -1
- package/lib/aws/compute/base-scalable-attribute.js +1 -1
- package/lib/aws/compute/bastion-host.js +1 -1
- package/lib/aws/compute/chain.js +1 -1
- package/lib/aws/compute/client-vpn-authorization-rule.js +1 -1
- package/lib/aws/compute/client-vpn-endpoint.js +2 -2
- package/lib/aws/compute/client-vpn-route.js +2 -2
- package/lib/aws/compute/code.js +8 -8
- package/lib/aws/compute/condition.js +1 -1
- package/lib/aws/compute/connections.js +1 -1
- package/lib/aws/compute/cors.js +1 -1
- package/lib/aws/compute/deployment.js +1 -1
- package/lib/aws/compute/domain-name.js +1 -1
- package/lib/aws/compute/event-invoke-config.js +1 -1
- package/lib/aws/compute/event-source-filter.js +2 -2
- package/lib/aws/compute/event-source-mapping.d.ts +10 -0
- package/lib/aws/compute/event-source-mapping.js +20 -23
- package/lib/aws/compute/event-sources/s3-onfailure-destination.js +1 -1
- package/lib/aws/compute/event-sources/s3.js +1 -1
- package/lib/aws/compute/event-sources/sqs-dlq.js +1 -1
- package/lib/aws/compute/event-sources/sqs.d.ts +10 -0
- package/lib/aws/compute/event-sources/sqs.js +3 -3
- package/lib/aws/compute/fields.js +4 -4
- package/lib/aws/compute/function-alias.js +1 -1
- package/lib/aws/compute/function-base.js +2 -2
- package/lib/aws/compute/function-destinations/event-bridge.js +1 -1
- package/lib/aws/compute/function-destinations/function.js +1 -1
- package/lib/aws/compute/function-destinations/sqs.js +1 -1
- package/lib/aws/compute/function-nodejs/function.js +1 -1
- package/lib/aws/compute/function-url.js +1 -1
- package/lib/aws/compute/function.js +3 -3
- package/lib/aws/compute/gateway-response.js +2 -2
- package/lib/aws/compute/handler.js +1 -1
- package/lib/aws/compute/instance-types.js +1 -1
- package/lib/aws/compute/instance.js +1 -1
- package/lib/aws/compute/integration.js +1 -1
- package/lib/aws/compute/integrations/aws.js +1 -1
- package/lib/aws/compute/integrations/http.js +1 -1
- package/lib/aws/compute/integrations/lambda.js +1 -1
- package/lib/aws/compute/integrations/mock.js +1 -1
- package/lib/aws/compute/integrations/stepfunctions.js +1 -1
- package/lib/aws/compute/ip-addresses.js +2 -2
- package/lib/aws/compute/ipam.js +1 -1
- package/lib/aws/compute/key-pair.js +1 -1
- package/lib/aws/compute/lambda-api.js +1 -1
- package/lib/aws/compute/launch-template.js +2 -2
- package/lib/aws/compute/lb-shared/base-listener.js +1 -1
- package/lib/aws/compute/lb-shared/base-load-balancer.js +2 -2
- package/lib/aws/compute/lb-shared/base-target-group.js +1 -1
- package/lib/aws/compute/lb-shared/listener-certificate.js +1 -1
- package/lib/aws/compute/lb-shared/load-balancer-targets.js +2 -2
- package/lib/aws/compute/lb-targets/alb-target.js +3 -3
- package/lib/aws/compute/lb-targets/instance-target.js +2 -2
- package/lib/aws/compute/lb-targets/ip-target.js +1 -1
- package/lib/aws/compute/lb-targets/lambda-target.js +1 -1
- package/lib/aws/compute/load-balancer.js +3 -3
- package/lib/aws/compute/machine-image/amazon-linux-2022.js +2 -2
- package/lib/aws/compute/machine-image/amazon-linux-2023.js +2 -2
- package/lib/aws/compute/machine-image/amazon-linux2.js +2 -2
- package/lib/aws/compute/machine-image/common.js +1 -1
- package/lib/aws/compute/machine-image/machine-image.js +8 -8
- package/lib/aws/compute/method.js +1 -1
- package/lib/aws/compute/model.js +3 -3
- package/lib/aws/compute/nat.js +5 -5
- package/lib/aws/compute/network-acl-types.js +2 -2
- package/lib/aws/compute/network-acl.js +3 -3
- package/lib/aws/compute/nlb/network-listener-action.js +1 -1
- package/lib/aws/compute/nlb/network-listener.js +1 -1
- package/lib/aws/compute/nlb/network-load-balancer.js +1 -1
- package/lib/aws/compute/nlb/network-target-group.js +1 -1
- package/lib/aws/compute/peer.js +1 -1
- package/lib/aws/compute/placement-group.js +1 -1
- package/lib/aws/compute/port.js +1 -1
- package/lib/aws/compute/prefix-list.js +1 -1
- package/lib/aws/compute/requestvalidator.js +1 -1
- package/lib/aws/compute/resource.js +3 -3
- package/lib/aws/compute/restapi.js +3 -3
- package/lib/aws/compute/route.js +8 -8
- package/lib/aws/compute/runtime.js +1 -1
- package/lib/aws/compute/scalable-target.js +1 -1
- package/lib/aws/compute/schedule.js +1 -1
- package/lib/aws/compute/security-group.js +1 -1
- package/lib/aws/compute/stage.js +2 -2
- package/lib/aws/compute/state-graph.js +1 -1
- package/lib/aws/compute/state-machine-fragment.js +1 -1
- package/lib/aws/compute/state-machine.js +4 -4
- package/lib/aws/compute/states/choice.js +1 -1
- package/lib/aws/compute/states/custom-state.js +1 -1
- package/lib/aws/compute/states/distributed-map/item-batcher.js +1 -1
- package/lib/aws/compute/states/distributed-map/item-reader.js +5 -5
- package/lib/aws/compute/states/distributed-map/result-writer.js +1 -1
- package/lib/aws/compute/states/distributed-map.js +1 -1
- package/lib/aws/compute/states/fail.js +1 -1
- package/lib/aws/compute/states/map-base.js +1 -1
- package/lib/aws/compute/states/map.js +1 -1
- package/lib/aws/compute/states/parallel.js +1 -1
- package/lib/aws/compute/states/pass.js +2 -2
- package/lib/aws/compute/states/state.js +1 -1
- package/lib/aws/compute/states/succeed.js +1 -1
- package/lib/aws/compute/states/task-base.js +2 -2
- package/lib/aws/compute/states/task.js +1 -1
- package/lib/aws/compute/states/wait.js +2 -2
- package/lib/aws/compute/step-scaling-action.js +1 -1
- package/lib/aws/compute/step-scaling-policy.js +1 -1
- package/lib/aws/compute/stepfunctions-api.js +1 -1
- package/lib/aws/compute/subnet-v2.js +2 -2
- package/lib/aws/compute/subnet.js +1 -1
- package/lib/aws/compute/target-tracking-scaling-policy.js +1 -1
- package/lib/aws/compute/task-credentials.js +1 -1
- package/lib/aws/compute/task-input.js +1 -1
- package/lib/aws/compute/tasks/aws-sdk/call-aws-service.js +1 -1
- package/lib/aws/compute/tasks/eventbridge/put-events.js +1 -1
- package/lib/aws/compute/tasks/http/invoke.js +1 -1
- package/lib/aws/compute/tasks/lambda/invoke.js +1 -1
- package/lib/aws/compute/tasks/sqs/send-message.js +10 -13
- package/lib/aws/compute/tasks/stepfunctions/invoke-activity.js +1 -1
- package/lib/aws/compute/tasks/stepfunctions/start-execution.js +1 -1
- package/lib/aws/compute/types.js +1 -1
- package/lib/aws/compute/usage-plan.js +1 -1
- package/lib/aws/compute/user-data.js +3 -3
- package/lib/aws/compute/volume.js +2 -2
- package/lib/aws/compute/vpc-endpoint-service.js +1 -1
- package/lib/aws/compute/vpc-endpoint.js +6 -6
- package/lib/aws/compute/vpc-flow-logs.js +4 -4
- package/lib/aws/compute/vpc-link.js +1 -1
- package/lib/aws/compute/vpc-v2-base.js +1 -1
- package/lib/aws/compute/vpc-v2.js +2 -2
- package/lib/aws/compute/vpc.js +4 -4
- package/lib/aws/compute/vpn.js +3 -3
- package/lib/aws/edge/certificate.js +1 -1
- package/lib/aws/edge/distribution.js +3 -3
- package/lib/aws/edge/dns-alias-record-targets.js +6 -6
- package/lib/aws/edge/dns-record.js +13 -13
- package/lib/aws/edge/dns-zone.js +1 -1
- package/lib/aws/edge/function.js +2 -2
- package/lib/aws/edge/key-value-store.js +4 -4
- package/lib/aws/edge/origin.js +3 -3
- package/lib/aws/edge/response-headers-policy.js +1 -1
- package/lib/aws/encryption/alias.js +1 -1
- package/lib/aws/encryption/key.js +1 -1
- package/lib/aws/encryption/via-service-principal.js +1 -1
- package/lib/aws/environment-aware.d.ts +41 -0
- package/lib/aws/environment-aware.js +3 -0
- package/lib/aws/iam/grant.d.ts +34 -0
- package/lib/aws/iam/grant.js +27 -6
- package/lib/aws/iam/group.js +1 -1
- package/lib/aws/iam/instance-profile.js +1 -1
- package/lib/aws/iam/managed-policy.js +1 -1
- package/lib/aws/iam/oidc-provider.js +1 -1
- package/lib/aws/iam/policy-document.js +1 -1
- package/lib/aws/iam/policy-statement.js +1 -1
- package/lib/aws/iam/policy.js +1 -1
- package/lib/aws/iam/principals.js +20 -20
- package/lib/aws/iam/role.js +1 -1
- package/lib/aws/iam/saml-provider.js +2 -2
- package/lib/aws/iam/unknown-principal.js +1 -1
- package/lib/aws/iam/user.js +1 -1
- package/lib/aws/index.d.ts +1 -0
- package/lib/aws/index.js +2 -1
- package/lib/aws/network/simple-ipv4-vpc.js +1 -1
- package/lib/aws/network/subnet-group.js +3 -3
- package/lib/aws/network/subnet.js +4 -4
- package/lib/aws/notify/archive.js +1 -1
- package/lib/aws/notify/connection.js +3 -3
- package/lib/aws/notify/event-bus.d.ts +1 -1
- package/lib/aws/notify/event-bus.js +4 -4
- package/lib/aws/notify/event-pattern.js +1 -1
- package/lib/aws/notify/index.d.ts +3 -1
- package/lib/aws/notify/index.js +5 -5
- package/lib/aws/notify/input.js +2 -2
- package/lib/aws/notify/kinesis-stream.js +1 -1
- package/lib/aws/notify/notification-rule.js +1 -1
- package/lib/aws/notify/policy.js +1 -1
- package/lib/aws/notify/queue-base.d.ts +241 -0
- package/lib/aws/notify/queue-base.js +161 -0
- package/lib/aws/notify/queue-policy.js +1 -1
- package/lib/aws/notify/queue.d.ts +157 -190
- package/lib/aws/notify/queue.js +239 -186
- package/lib/aws/notify/resource-policy.js +1 -1
- package/lib/aws/notify/rule.js +1 -1
- package/lib/aws/notify/schedule.js +1 -1
- package/lib/aws/notify/sqs-augmentations.generated.d.ts +3 -3
- package/lib/aws/notify/sqs-augmentations.generated.js +23 -26
- package/lib/aws/notify/sqs-grants.generated.d.ts +72 -0
- package/lib/aws/notify/sqs-grants.generated.js +139 -0
- package/lib/aws/notify/subscription-filter.js +1 -1
- package/lib/aws/notify/subscription.js +4 -4
- package/lib/aws/notify/subscriptions/email.js +1 -1
- package/lib/aws/notify/subscriptions/lambda.js +1 -1
- package/lib/aws/notify/subscriptions/sms.js +1 -1
- package/lib/aws/notify/subscriptions/sqs.js +30 -27
- package/lib/aws/notify/subscriptions/subscription.d.ts +1 -1
- package/lib/aws/notify/subscriptions/subscription.js +1 -1
- package/lib/aws/notify/subscriptions/url.js +1 -1
- package/lib/aws/notify/targets/event-bus.d.ts +1 -1
- package/lib/aws/notify/targets/event-bus.js +2 -2
- package/lib/aws/notify/targets/function.js +1 -1
- package/lib/aws/notify/targets/log-group.js +2 -2
- package/lib/aws/notify/targets/sqs.js +12 -14
- package/lib/aws/notify/targets/state-machine.js +1 -1
- package/lib/aws/notify/topic-base.js +1 -1
- package/lib/aws/notify/topic.js +1 -1
- package/lib/aws/storage/assets/image-asset.js +3 -3
- package/lib/aws/storage/assets/s3.js +1 -1
- package/lib/aws/storage/auth-token.js +2 -2
- package/lib/aws/storage/billing.js +1 -1
- package/lib/aws/storage/bucket-notifications.js +1 -1
- package/lib/aws/storage/bucket-policy.js +1 -1
- package/lib/aws/storage/bucket-source.js +1 -1
- package/lib/aws/storage/bucket.js +2 -2
- package/lib/aws/storage/capacity.js +1 -1
- package/lib/aws/storage/ecr-repository.js +3 -3
- package/lib/aws/storage/encryption.js +1 -1
- package/lib/aws/storage/notification-targets/function.js +1 -1
- package/lib/aws/storage/notification-targets/queue.js +17 -21
- package/lib/aws/storage/origin-access-identity.js +1 -1
- package/lib/aws/storage/parameter.js +2 -2
- package/lib/aws/storage/table.js +3 -3
- package/lib/bundling.js +3 -3
- package/lib/construct-base.js +2 -2
- package/lib/duration.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/expiration.js +1 -1
- package/lib/fs/ignore.js +4 -4
- package/lib/fs/index.js +1 -1
- package/lib/helpers-internal/index.d.ts +1 -0
- package/lib/helpers-internal/index.js +16 -1
- package/lib/helpers-internal/validate-all-props.d.ts +29 -0
- package/lib/helpers-internal/validate-all-props.js +23 -0
- package/lib/size.js +1 -1
- package/lib/stack-base.js +1 -1
- package/lib/terra-func.js +1 -1
- package/lib/time-zone.js +1 -1
- package/package.json +1 -1
- package/lib/aws/notify/queue-config.generated.d.ts +0 -98
- package/lib/aws/notify/queue-config.generated.js +0 -3
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { sqsQueue } from "@cdktf/provider-aws";
|
|
2
2
|
import { Construct } from "constructs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
3
|
+
import { Duration } from "../../duration";
|
|
4
|
+
import { IQueue, QueueBase, QueueEncryption } from "./queue-base";
|
|
5
|
+
import { AwsConstructProps } from "../aws-construct";
|
|
6
|
+
import * as kms from "../encryption";
|
|
7
|
+
/**
|
|
8
|
+
* Properties for creating a new Queue
|
|
9
|
+
*/
|
|
10
|
+
export interface QueueProps extends AwsConstructProps {
|
|
7
11
|
/**
|
|
8
12
|
* Queue Name prefix
|
|
9
13
|
*
|
|
@@ -16,7 +20,58 @@ export interface QueueProps extends AwsConstructProps, SqsQueueConfig {
|
|
|
16
20
|
* For a FIFO (first-in-first-out) queue, the name must end with the .fifo
|
|
17
21
|
* @default - GridUUID + Stack Unique Name
|
|
18
22
|
*/
|
|
19
|
-
readonly
|
|
23
|
+
readonly queueName?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The number of seconds that Amazon SQS retains a message.
|
|
26
|
+
*
|
|
27
|
+
* You can specify an integer value from 60 seconds (1 minute) to 1209600
|
|
28
|
+
* seconds (14 days). The default value is 345600 seconds (4 days).
|
|
29
|
+
*
|
|
30
|
+
* @default Duration.days(4)
|
|
31
|
+
*/
|
|
32
|
+
readonly retentionPeriod?: Duration;
|
|
33
|
+
/**
|
|
34
|
+
* The time in seconds that the delivery of all messages in the queue is delayed.
|
|
35
|
+
*
|
|
36
|
+
* You can specify an integer value of 0 to 900 (15 minutes). The default
|
|
37
|
+
* value is 0.
|
|
38
|
+
*
|
|
39
|
+
* @default 0
|
|
40
|
+
*/
|
|
41
|
+
readonly deliveryDelay?: Duration;
|
|
42
|
+
/**
|
|
43
|
+
* The limit of how many bytes that a message can contain before Amazon SQS rejects it.
|
|
44
|
+
*
|
|
45
|
+
* You can specify an integer value from 1024 bytes (1 KiB) to 1048576 bytes
|
|
46
|
+
* (1 MiB). The default value is 1048576 (1 MiB).
|
|
47
|
+
*
|
|
48
|
+
* @default 1MiB
|
|
49
|
+
*/
|
|
50
|
+
readonly maxMessageSizeBytes?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Default wait time for ReceiveMessage calls.
|
|
53
|
+
*
|
|
54
|
+
* Does not wait if set to 0, otherwise waits this amount of seconds
|
|
55
|
+
* by default for messages to arrive.
|
|
56
|
+
*
|
|
57
|
+
* For more information, see Amazon SQS Long Poll.
|
|
58
|
+
*
|
|
59
|
+
* @default 0
|
|
60
|
+
*/
|
|
61
|
+
readonly receiveMessageWaitTime?: Duration;
|
|
62
|
+
/**
|
|
63
|
+
* Timeout of processing a single message.
|
|
64
|
+
*
|
|
65
|
+
* After dequeuing, the processor has this much time to handle the message
|
|
66
|
+
* and delete it from the queue before it becomes visible again for dequeueing
|
|
67
|
+
* by another processor.
|
|
68
|
+
*
|
|
69
|
+
* Values must be from 0 to 43200 seconds (12 hours). If you don't specify
|
|
70
|
+
* a value, AWS CloudFormation uses the default value of 30 seconds.
|
|
71
|
+
*
|
|
72
|
+
* @default Duration.seconds(30)
|
|
73
|
+
*/
|
|
74
|
+
readonly visibilityTimeout?: Duration;
|
|
20
75
|
/**
|
|
21
76
|
* Send messages to this queue if they were unsuccessfully dequeued a number of times.
|
|
22
77
|
*
|
|
@@ -28,18 +83,40 @@ export interface QueueProps extends AwsConstructProps, SqsQueueConfig {
|
|
|
28
83
|
*/
|
|
29
84
|
readonly deadLetterQueue?: DeadLetterQueue;
|
|
30
85
|
/**
|
|
31
|
-
*
|
|
32
|
-
* redrive permission and which source queues can specify dead-letter queues.
|
|
86
|
+
* Whether the contents of the queue are encrypted, and by what type of key.
|
|
33
87
|
*
|
|
34
|
-
*
|
|
88
|
+
* Be aware that encryption is not available in all regions, please see the docs
|
|
89
|
+
* for current availability details.
|
|
35
90
|
*
|
|
36
|
-
*
|
|
91
|
+
* @default SQS_MANAGED (SSE-SQS) for newly created queues
|
|
37
92
|
*/
|
|
38
|
-
readonly
|
|
93
|
+
readonly encryption?: QueueEncryption;
|
|
94
|
+
/**
|
|
95
|
+
* External KMS key to use for queue encryption.
|
|
96
|
+
*
|
|
97
|
+
* Individual messages will be encrypted using data keys. The data keys in
|
|
98
|
+
* turn will be encrypted using this key, and reused for a maximum of
|
|
99
|
+
* `dataKeyReuseSecs` seconds.
|
|
100
|
+
*
|
|
101
|
+
* If the 'encryptionMasterKey' property is set, 'encryption' type will be
|
|
102
|
+
* implicitly set to "KMS".
|
|
103
|
+
*
|
|
104
|
+
* @default If encryption is set to KMS and not specified, a key will be created.
|
|
105
|
+
*/
|
|
106
|
+
readonly encryptionMasterKey?: kms.IKey;
|
|
107
|
+
/**
|
|
108
|
+
* The length of time that Amazon SQS reuses a data key before calling KMS again.
|
|
109
|
+
*
|
|
110
|
+
* The value must be an integer between 60 (1 minute) and 86,400 (24
|
|
111
|
+
* hours). The default is 300 (5 minutes).
|
|
112
|
+
*
|
|
113
|
+
* @default Duration.minutes(5)
|
|
114
|
+
*/
|
|
115
|
+
readonly dataKeyReuse?: Duration;
|
|
39
116
|
/**
|
|
40
117
|
* Whether this a first-in-first-out (FIFO) queue.
|
|
41
118
|
*
|
|
42
|
-
* @default false, unless
|
|
119
|
+
* @default false, unless queueName ends in '.fifo' or 'contentBasedDeduplication' is true.
|
|
43
120
|
*/
|
|
44
121
|
readonly fifo?: boolean;
|
|
45
122
|
/**
|
|
@@ -75,201 +152,89 @@ export interface QueueProps extends AwsConstructProps, SqsQueueConfig {
|
|
|
75
152
|
* @default FifoThroughputLimit.PER_QUEUE
|
|
76
153
|
*/
|
|
77
154
|
readonly fifoThroughputLimit?: FifoThroughputLimit;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Outputs which may be registered for output via the Grid.
|
|
81
|
-
*/
|
|
82
|
-
export interface QueueOutputs {
|
|
83
155
|
/**
|
|
84
|
-
*
|
|
156
|
+
* Policy to apply when the queue is removed from the stack
|
|
157
|
+
*
|
|
158
|
+
* Even though queues are technically stateful, their contents are transient and it
|
|
159
|
+
* is common to add and remove Queues while rearchitecting your application. The
|
|
160
|
+
* default is therefore `DESTROY`. Change it to `RETAIN` if the messages are so
|
|
161
|
+
* valuable that accidentally losing them would be unacceptable.
|
|
162
|
+
*
|
|
163
|
+
* @default RemovalPolicy.DESTROY
|
|
85
164
|
*/
|
|
86
|
-
readonly name: string;
|
|
87
165
|
/**
|
|
88
|
-
*
|
|
166
|
+
* Enforce encryption of data in transit.
|
|
167
|
+
* @see https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-security-best-practices.html#enforce-encryption-data-in-transit
|
|
168
|
+
*
|
|
169
|
+
* @default false
|
|
89
170
|
*/
|
|
90
|
-
readonly
|
|
171
|
+
readonly enforceSSL?: boolean;
|
|
91
172
|
/**
|
|
92
|
-
*
|
|
173
|
+
* The string that includes the parameters for the permissions for the dead-letter queue
|
|
174
|
+
* redrive permission and which source queues can specify dead-letter queues.
|
|
175
|
+
*
|
|
176
|
+
* @default - All source queues can designate this queue as their dead-letter queue.
|
|
177
|
+
*
|
|
178
|
+
* {@link https://registry.terraform.io/providers/hashicorp/aws/5.68.0/docs/resources/sqs_queue#redrive_allow_policy SqsQueue#redrive_allow_policy}
|
|
93
179
|
*/
|
|
94
|
-
readonly
|
|
180
|
+
readonly redriveAllowPolicy?: RedriveAllowPolicy;
|
|
95
181
|
}
|
|
96
182
|
/**
|
|
97
|
-
*
|
|
183
|
+
* A new Amazon SQS queue
|
|
98
184
|
*/
|
|
99
|
-
export
|
|
100
|
-
/** Strongly typed outputs */
|
|
101
|
-
readonly queueOutputs: QueueOutputs;
|
|
102
|
-
/**
|
|
103
|
-
* The ARN of this queue
|
|
104
|
-
* @attribute
|
|
105
|
-
*/
|
|
106
|
-
readonly queueArn: string;
|
|
107
|
-
/**
|
|
108
|
-
* The URL of this queue
|
|
109
|
-
* @attribute
|
|
110
|
-
*/
|
|
111
|
-
readonly queueUrl: string;
|
|
112
|
-
/**
|
|
113
|
-
* The name of this queue
|
|
114
|
-
* @attribute
|
|
115
|
-
*/
|
|
116
|
-
readonly queueName: string;
|
|
185
|
+
export declare class Queue extends QueueBase {
|
|
117
186
|
/**
|
|
118
|
-
*
|
|
187
|
+
* Uniquely identifies this class.
|
|
119
188
|
*/
|
|
120
|
-
readonly
|
|
189
|
+
static readonly PROPERTY_INJECTION_ID: string;
|
|
121
190
|
/**
|
|
122
|
-
*
|
|
191
|
+
* Import an existing SQS queue provided an ARN
|
|
192
|
+
*
|
|
193
|
+
* @param scope The parent creating construct
|
|
194
|
+
* @param id The construct's name
|
|
195
|
+
* @param queueArn queue ARN (i.e. arn:aws:sqs:us-east-2:444455556666:queue1)
|
|
123
196
|
*/
|
|
124
|
-
|
|
197
|
+
static fromQueueArn(scope: Construct, id: string, queueArn: string): IQueue;
|
|
198
|
+
readonly resource: sqsQueue.SqsQueue;
|
|
125
199
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* This will grant the following permissions:
|
|
129
|
-
*
|
|
130
|
-
* - sqs:ChangeMessageVisibility
|
|
131
|
-
* - sqs:DeleteMessage
|
|
132
|
-
* - sqs:ReceiveMessage
|
|
133
|
-
* - sqs:GetQueueAttributes
|
|
134
|
-
* - sqs:GetQueueUrl
|
|
135
|
-
*
|
|
136
|
-
* @param grantee Principal to grant consume rights to
|
|
200
|
+
* The ARN of this queue
|
|
137
201
|
*/
|
|
138
|
-
|
|
202
|
+
readonly queueArn: string;
|
|
139
203
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* This will grant the following permissions:
|
|
143
|
-
*
|
|
144
|
-
* - sqs:SendMessage
|
|
145
|
-
* - sqs:GetQueueAttributes
|
|
146
|
-
* - sqs:GetQueueUrl
|
|
147
|
-
*
|
|
148
|
-
* @param grantee Principal to grant send rights to
|
|
204
|
+
* The name of this queue
|
|
149
205
|
*/
|
|
150
|
-
|
|
206
|
+
readonly queueName: string;
|
|
151
207
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* This will grant the following permissions:
|
|
155
|
-
*
|
|
156
|
-
* - sqs:PurgeQueue
|
|
157
|
-
* - sqs:GetQueueAttributes
|
|
158
|
-
* - sqs:GetQueueUrl
|
|
159
|
-
*
|
|
160
|
-
* @param grantee Principal to grant send rights to
|
|
208
|
+
* The URL of this queue
|
|
161
209
|
*/
|
|
162
|
-
|
|
210
|
+
readonly queueUrl: string;
|
|
163
211
|
/**
|
|
164
|
-
*
|
|
165
|
-
* on this SQS queue resource.
|
|
166
|
-
*
|
|
167
|
-
* @param grantee Principal to grant right to
|
|
168
|
-
* @param queueActions The actions to grant
|
|
212
|
+
* If this queue is encrypted, this is the KMS key.
|
|
169
213
|
*/
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* The `Queue` beacon provides an [AWS SQS Queue](https://aws.amazon.com/sqs/).
|
|
174
|
-
*
|
|
175
|
-
* ```ts
|
|
176
|
-
* new notify.Queue(stack, "Queue", {
|
|
177
|
-
* namePrefix: "queue.fifo",
|
|
178
|
-
* messageRetentionSeconds: Duration.days(14).toSeconds(),
|
|
179
|
-
* visibilityTimeoutSeconds: Duration.minutes(15).toSeconds(),
|
|
180
|
-
* });
|
|
181
|
-
* ```
|
|
182
|
-
*
|
|
183
|
-
* @resource aws_sqs_queue
|
|
184
|
-
* @beacon-class notify.IQueue
|
|
185
|
-
*/
|
|
186
|
-
export declare class Queue extends AwsConstructBase implements IQueue {
|
|
187
|
-
readonly resource: sqsQueue.SqsQueue;
|
|
188
|
-
private readonly _outputs;
|
|
189
|
-
get queueOutputs(): QueueOutputs;
|
|
190
|
-
get outputs(): Record<string, any>;
|
|
191
|
-
private policy?;
|
|
192
|
-
get queueArn(): string;
|
|
193
|
-
get queueUrl(): string;
|
|
194
|
-
get queueName(): string;
|
|
195
|
-
readonly deadLetterQueue?: DeadLetterQueue;
|
|
214
|
+
readonly encryptionMasterKey?: kms.IKey;
|
|
196
215
|
/**
|
|
197
216
|
* Whether this queue is an Amazon SQS FIFO queue. If false, this is a standard queue.
|
|
198
217
|
*/
|
|
199
218
|
readonly fifo: boolean;
|
|
200
|
-
constructor(scope: Construct, name: string, props?: QueueProps);
|
|
201
|
-
/**
|
|
202
|
-
* Adds a statement to the IAM resource policy associated with this queue.
|
|
203
|
-
*
|
|
204
|
-
* If this queue was created in this stack (`new Queue`), a queue policy
|
|
205
|
-
* will be automatically created upon the first call to `addToPolicy`.
|
|
206
|
-
*/
|
|
207
|
-
addToResourcePolicy(statement: iam.PolicyStatement): iam.AddToResourcePolicyResult;
|
|
208
|
-
/**
|
|
209
|
-
* Grant permissions to consume messages from a queue
|
|
210
|
-
*
|
|
211
|
-
* This will grant the following permissions:
|
|
212
|
-
*
|
|
213
|
-
* - sqs:ChangeMessageVisibility
|
|
214
|
-
* - sqs:DeleteMessage
|
|
215
|
-
* - sqs:ReceiveMessage
|
|
216
|
-
* - sqs:GetQueueAttributes
|
|
217
|
-
* - sqs:GetQueueUrl
|
|
218
|
-
*
|
|
219
|
-
* If encryption is used, permission to use the key to decrypt the contents of the queue will also be granted to the same principal.
|
|
220
|
-
*
|
|
221
|
-
* This will grant the following KMS permissions:
|
|
222
|
-
*
|
|
223
|
-
* - kms:Decrypt
|
|
224
|
-
*
|
|
225
|
-
* @param grantee Principal to grant consume rights to
|
|
226
|
-
*/
|
|
227
|
-
grantConsumeMessages(grantee: iam.IGrantable): iam.Grant;
|
|
228
219
|
/**
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* This will grant the following permissions:
|
|
232
|
-
*
|
|
233
|
-
* - sqs:SendMessage
|
|
234
|
-
* - sqs:GetQueueAttributes
|
|
235
|
-
* - sqs:GetQueueUrl
|
|
236
|
-
*
|
|
237
|
-
* If encryption is used, permission to use the key to encrypt/decrypt the contents of the queue will also be granted to the same principal.
|
|
238
|
-
*
|
|
239
|
-
* This will grant the following KMS permissions:
|
|
240
|
-
*
|
|
241
|
-
* - kms:Decrypt
|
|
242
|
-
* - kms:Encrypt
|
|
243
|
-
* - kms:ReEncrypt*
|
|
244
|
-
* - kms:GenerateDataKey*
|
|
245
|
-
*
|
|
246
|
-
* @param grantee Principal to grant send rights to
|
|
220
|
+
* Whether the contents of the queue are encrypted, and by what type of key.
|
|
247
221
|
*/
|
|
248
|
-
|
|
222
|
+
readonly encryptionType?: QueueEncryption;
|
|
249
223
|
/**
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
* This will grant the following permissions:
|
|
253
|
-
*
|
|
254
|
-
* - sqs:PurgeQueue
|
|
255
|
-
* - sqs:GetQueueAttributes
|
|
256
|
-
* - sqs:GetQueueUrl
|
|
257
|
-
*
|
|
258
|
-
* @param grantee Principal to grant send rights to
|
|
259
|
-
*/
|
|
260
|
-
grantPurge(grantee: iam.IGrantable): iam.Grant;
|
|
261
|
-
/**
|
|
262
|
-
* Grant the actions defined in queueActions to the identity Principal given
|
|
263
|
-
* on this SQS queue resource.
|
|
264
|
-
*
|
|
265
|
-
* @param grantee Principal to grant right to
|
|
266
|
-
* @param actions The actions to grant
|
|
224
|
+
* If this queue is configured with a dead-letter queue, this is the dead-letter queue settings.
|
|
267
225
|
*/
|
|
268
|
-
|
|
226
|
+
readonly deadLetterQueue?: DeadLetterQueue;
|
|
227
|
+
protected readonly autoCreatePolicy = true;
|
|
228
|
+
private readonly physicalName;
|
|
229
|
+
constructor(scope: Construct, id: string, props?: QueueProps);
|
|
269
230
|
/**
|
|
270
231
|
* Look at the props, see if the FIFO props agree, and return the correct subset of props
|
|
271
232
|
*/
|
|
272
233
|
private determineFifoProps;
|
|
234
|
+
/**
|
|
235
|
+
* Adds an iam statement to enforce encryption of data in transit.
|
|
236
|
+
*/
|
|
237
|
+
private enforceSSLStatement;
|
|
273
238
|
}
|
|
274
239
|
/**
|
|
275
240
|
* Dead letter queue settings
|
|
@@ -310,23 +275,6 @@ export interface RedriveAllowPolicy {
|
|
|
310
275
|
*/
|
|
311
276
|
readonly sourceQueues?: IQueue[];
|
|
312
277
|
}
|
|
313
|
-
/**
|
|
314
|
-
* The permission type that defines which source queues can specify the current queue as the dead-letter queue
|
|
315
|
-
*/
|
|
316
|
-
export declare enum RedrivePermission {
|
|
317
|
-
/**
|
|
318
|
-
* Any source queues in this AWS account in the same Region can specify this queue as the dead-letter queue
|
|
319
|
-
*/
|
|
320
|
-
ALLOW_ALL = "allowAll",
|
|
321
|
-
/**
|
|
322
|
-
* No source queues can specify this queue as the dead-letter queue
|
|
323
|
-
*/
|
|
324
|
-
DENY_ALL = "denyAll",
|
|
325
|
-
/**
|
|
326
|
-
* Only queues specified by the `sourceQueueArns` parameter can specify this queue as the dead-letter queue
|
|
327
|
-
*/
|
|
328
|
-
BY_QUEUE = "byQueue"
|
|
329
|
-
}
|
|
330
278
|
/**
|
|
331
279
|
* What kind of deduplication scope to apply
|
|
332
280
|
*/
|
|
@@ -353,3 +301,22 @@ export declare enum FifoThroughputLimit {
|
|
|
353
301
|
*/
|
|
354
302
|
PER_MESSAGE_GROUP_ID = "perMessageGroupId"
|
|
355
303
|
}
|
|
304
|
+
/**
|
|
305
|
+
* The permission type that defines which source queues can specify the current queue as the dead-letter queue
|
|
306
|
+
*/
|
|
307
|
+
export declare enum RedrivePermission {
|
|
308
|
+
/**
|
|
309
|
+
* Any source queues in this AWS account in the same Region can specify this queue as the dead-letter queue
|
|
310
|
+
*/
|
|
311
|
+
ALLOW_ALL = "allowAll",
|
|
312
|
+
/**
|
|
313
|
+
* No source queues can specify this queue as the dead-letter queue
|
|
314
|
+
*/
|
|
315
|
+
DENY_ALL = "denyAll",
|
|
316
|
+
/**
|
|
317
|
+
* Only queues specified by the `sourceQueueArns` parameter can specify this queue as the dead-letter queue
|
|
318
|
+
*/
|
|
319
|
+
BY_QUEUE = "byQueue"
|
|
320
|
+
}
|
|
321
|
+
export declare function validateQueueProps(scope: Construct, props: QueueProps): void;
|
|
322
|
+
export declare function validateRedriveAllowPolicy(scope: Construct, policy: RedriveAllowPolicy): void;
|