CfnQueue L1 construct
The AWS::SQS::Queue resource creates an Amazon SQS standard or FIFO queue.
Keep the following caveats in mind:
- If you don't specify the
FifoQueueproperty, Amazon SQS creates a standard queue.
You can't change the queue type after you create it and you can't convert an existing standard queue into a FIFO queue. You must either create a new FIFO queue for your application or delete your existing standard queue and recreate it as a FIFO queue. For more information, see Moving from a standard queue to a FIFO queue in the Amazon SQS Developer Guide .
- If you don't provide a value for a property, the queue is created with the default value for the property.
- If you delete a queue, you must wait at least 60 seconds before creating a queue with the same name.
- To successfully create a new queue, you must provide a queue name that adheres to the limits related to queues and is unique within the scope of your queues.
For more information about creating FIFO (first-in-first-out) queues, see Creating an Amazon SQS queue ( CloudFormation ) in the Amazon SQS Developer Guide .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sqs as sqs } from 'aws-cdk-lib';
declare const redriveAllowPolicy: any;
declare const redrivePolicy: any;
const cfnQueue = new sqs.CfnQueue(this, 'MyCfnQueue', /* all optional props */ {
contentBasedDeduplication: false,
deduplicationScope: 'deduplicationScope',
delaySeconds: 123,
fifoQueue: false,
fifoThroughputLimit: 'fifoThroughputLimit',
kmsDataKeyReusePeriodSeconds: 123,
kmsMasterKeyId: 'kmsMasterKeyId',
maximumMessageSize: 123,
messageRetentionPeriod: 123,
queueName: 'queueName',
receiveMessageWaitTimeSeconds: 123,
redriveAllowPolicy: redriveAllowPolicy,
redrivePolicy: redrivePolicy,
sqsManagedSseEnabled: false,
tags: [{
key: 'key',
value: 'value',
}],
visibilityTimeout: 123,
});
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sqs as sqs
# redrive_allow_policy: Any
# redrive_policy: Any
cfn_queue = sqs.CfnQueue(self, "MyCfnQueue",
content_based_deduplication=False,
deduplication_scope="deduplicationScope",
delay_seconds=123,
fifo_queue=False,
fifo_throughput_limit="fifoThroughputLimit",
kms_data_key_reuse_period_seconds=123,
kms_master_key_id="kmsMasterKeyId",
maximum_message_size=123,
message_retention_period=123,
queue_name="queueName",
receive_message_wait_time_seconds=123,
redrive_allow_policy=redrive_allow_policy,
redrive_policy=redrive_policy,
sqs_managed_sse_enabled=False,
tags=[CfnTag(
key="key",
value="value"
)],
visibility_timeout=123
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sqs.*;
Object redriveAllowPolicy;
Object redrivePolicy;
CfnQueue cfnQueue = CfnQueue.Builder.create(this, "MyCfnQueue")
.contentBasedDeduplication(false)
.deduplicationScope("deduplicationScope")
.delaySeconds(123)
.fifoQueue(false)
.fifoThroughputLimit("fifoThroughputLimit")
.kmsDataKeyReusePeriodSeconds(123)
.kmsMasterKeyId("kmsMasterKeyId")
.maximumMessageSize(123)
.messageRetentionPeriod(123)
.queueName("queueName")
.receiveMessageWaitTimeSeconds(123)
.redriveAllowPolicy(redriveAllowPolicy)
.redrivePolicy(redrivePolicy)
.sqsManagedSseEnabled(false)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.visibilityTimeout(123)
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SQS;
var redriveAllowPolicy;
var redrivePolicy;
var cfnQueue = new CfnQueue(this, "MyCfnQueue", new CfnQueueProps {
ContentBasedDeduplication = false,
DeduplicationScope = "deduplicationScope",
DelaySeconds = 123,
FifoQueue = false,
FifoThroughputLimit = "fifoThroughputLimit",
KmsDataKeyReusePeriodSeconds = 123,
KmsMasterKeyId = "kmsMasterKeyId",
MaximumMessageSize = 123,
MessageRetentionPeriod = 123,
QueueName = "queueName",
ReceiveMessageWaitTimeSeconds = 123,
RedriveAllowPolicy = redriveAllowPolicy,
RedrivePolicy = redrivePolicy,
SqsManagedSseEnabled = false,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VisibilityTimeout = 123
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var redriveAllowPolicy interface{}
var redrivePolicy interface{}
cfnQueue := awscdk.Aws_sqs.NewCfnQueue(this, jsii.String("MyCfnQueue"), &CfnQueueProps{
ContentBasedDeduplication: jsii.Boolean(false),
DeduplicationScope: jsii.String("deduplicationScope"),
DelaySeconds: jsii.Number(123),
FifoQueue: jsii.Boolean(false),
FifoThroughputLimit: jsii.String("fifoThroughputLimit"),
KmsDataKeyReusePeriodSeconds: jsii.Number(123),
KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
MaximumMessageSize: jsii.Number(123),
MessageRetentionPeriod: jsii.Number(123),
QueueName: jsii.String("queueName"),
ReceiveMessageWaitTimeSeconds: jsii.Number(123),
RedriveAllowPolicy: redriveAllowPolicy,
RedrivePolicy: redrivePolicy,
SqsManagedSseEnabled: jsii.Boolean(false),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
VisibilityTimeout: jsii.Number(123),
})
Initializer
new CfnQueue(scope: Construct, id: string, props?: CfnQueueProps)
CfnQueue(scope: Construct, id: str, props: typing.Optional[CfnQueueProps] = None)
new CfnQueue(Construct scope, String id, CfnQueueProps props)
new CfnQueue(Construct scope, string id, CfnQueueProps? props = null)
NewCfnQueue(Scope Construct, Id *string, Props CfnQueueProps)
Construct Props
contentBasedDeduplicationoptionalboolean | IResolvablecontent_based_deduplicationoptionaltyping.Union[bool, IResolvable]contentBasedDeduplicationoptionalBooleanContentBasedDeduplicationoptionalboolContentBasedDeduplicationoptionalinterface{}#notes
During the deduplication interval, Amazon SQS treats messages that are sent with identical content as duplicates and delivers only one copy of the message. For more information, see the ContentBasedDeduplication attribute for the [CreateQueue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html) action in the Amazon SQS API Reference .
deduplicationScopeoptionalstringdeduplication_scopeoptionalstrdeduplicationScopeoptionalStringDeduplicationScopeoptionalstringDeduplicationScopeoptional*string#notes
Valid values are messageGroup and queue .
To enable high throughput for a FIFO queue, set this attribute to messageGroup and set the FifoThroughputLimit attribute to perMessageGroupId . If you set these attributes to anything other than these values, normal throughput is in effect and deduplication occurs as specified. For more information, see High throughput for FIFO queues and Quotas related to messages in the Amazon SQS Developer Guide .
delaySecondsoptionalnumberdelay_secondsoptionalint | floatdelaySecondsoptionalNumberDelaySecondsoptionaldoubleDelaySecondsoptional*float64#You can specify an integer value of 0 to 900 (15 minutes). The default value is 0 .
fifoQueueoptionalboolean | IResolvablefifo_queueoptionaltyping.Union[bool, IResolvable]fifoQueueoptionalBooleanFifoQueueoptionalboolFifoQueueoptionalinterface{}#notes
If you don't specify this property, Amazon SQS creates a standard queue. For more information, see Amazon SQS FIFO queues in the Amazon SQS Developer Guide .
fifoThroughputLimitoptionalstringfifo_throughput_limitoptionalstrfifoThroughputLimitoptionalStringFifoThroughputLimitoptionalstringFifoThroughputLimitoptional*string#notes
Valid values are perQueue and perMessageGroupId .
To enable high throughput for a FIFO queue, set this attribute to perMessageGroupId and set the DeduplicationScope attribute to messageGroup . If you set these attributes to anything other than these values, normal throughput is in effect and deduplication occurs as specified. For more information, see High throughput for FIFO queues and Quotas related to messages in the Amazon SQS Developer Guide .
kmsDataKeyReusePeriodSecondsoptionalnumberkms_data_key_reuse_period_secondsoptionalint | floatkmsDataKeyReusePeriodSecondsoptionalNumberKmsDataKeyReusePeriodSecondsoptionaldoubleKmsDataKeyReusePeriodSecondsoptional*float64#notes
The value must be an integer between 60 (1 minute) and 86,400 (24 hours). The default is 300 (5 minutes).
A shorter time period provides better security, but results in more calls to AWS , which might incur charges after Free Tier. For more information, see Encryption at rest in the Amazon SQS Developer Guide .
kmsMasterKeyIdoptionalstring | IAliasRef | IKeyRefkms_master_key_idoptionaltyping.Union[str, IAliasRef, IKeyRef]kmsMasterKeyIdoptionalStringKmsMasterKeyIdoptionalstringKmsMasterKeyIdoptionalinterface{}#notes
To use the AWS managed KMS for Amazon SQS , specify a (default) alias ARN, alias name (for example alias/aws/sqs ), key ARN, or key ID. For more information, see the following:
- Encryption at rest in the Amazon SQS Developer Guide
- CreateQueue in the Amazon SQS API Reference
- Request Parameters in the AWS Key Management Service API Reference
- The Key Management Service (KMS) section of the Security best practices for AWS Key Management Service in the AWS Key Management Service Developer Guide
maximumMessageSizeoptionalnumbermaximum_message_sizeoptionalint | floatmaximumMessageSizeoptionalNumberMaximumMessageSizeoptionaldoubleMaximumMessageSizeoptional*float64#You can specify an integer from 1,024 bytes (1 KiB) to 1,048,576 bytes (1 MiB). Default: 1,048,576 bytes (1 MiB).
messageRetentionPeriodoptionalnumbermessage_retention_periodoptionalint | floatmessageRetentionPeriodoptionalNumberMessageRetentionPeriodoptionaldoubleMessageRetentionPeriodoptional*float64#You can specify an integer value from 60 seconds (1 minute) to 1,209,600 seconds (14 days). The default value is 345,600 seconds (4 days).
queueNameoptionalstringqueue_nameoptionalstrqueueNameoptionalStringQueueNameoptionalstringQueueNameoptional*string#notes
To create a FIFO queue, the name of your FIFO queue must end with the .fifo suffix. For more information, see Amazon SQS FIFO queues in the Amazon SQS Developer Guide .
If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the queue name. For more information, see Name type in the CloudFormation User Guide .
If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
receiveMessageWaitTimeSecondsoptionalnumberreceive_message_wait_time_secondsoptionalint | floatreceiveMessageWaitTimeSecondsoptionalNumberReceiveMessageWaitTimeSecondsoptionaldoubleReceiveMessageWaitTimeSecondsoptional*float64#notes
You can specify an integer from 1 to 20. Short polling is used as the default or when you specify 0 for this property. For more information, see Consuming messages using long polling in the Amazon SQS Developer Guide .
redriveAllowPolicyoptionalanyredrive_allow_policyoptionalAnyredriveAllowPolicyoptionalObjectRedriveAllowPolicyoptionalobjectRedriveAllowPolicyoptionalinterface{}#notes
The parameters are as follows:
redrivePermission: The permission type that defines which source queues can specify the current queue as the dead-letter queue. Valid values are:allowAll: (Default) Any source queues in this AWS account in the same Region can specify this queue as the dead-letter queue.denyAll: No source queues can specify this queue as the dead-letter queue.byQueue: Only queues specified by thesourceQueueArnsparameter can specify this queue as the dead-letter queue.sourceQueueArns: The Amazon Resource Names (ARN)s of the source queues that can specify this queue as the dead-letter queue and redrive messages. You can specify this parameter only when theredrivePermissionparameter is set tobyQueue. You can specify up to 10 source queue ARNs. To allow more than 10 source queues to specify dead-letter queues, set theredrivePermissionparameter toallowAll.
redrivePolicyoptionalanyredrive_policyoptionalAnyredrivePolicyoptionalObjectRedrivePolicyoptionalobjectRedrivePolicyoptionalinterface{}#notes
The parameters are as follows:
deadLetterTargetArn: The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value ofmaxReceiveCountis exceeded.maxReceiveCount: The number of times a message is received by a consumer of the source queue before being moved to the dead-letter queue. When theReceiveCountfor a message exceeds themaxReceiveCountfor a queue, Amazon SQS moves the message to the dead-letter-queue.
The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the dead-letter queue of a standard queue must also be a standard queue.
JSON
{ "deadLetterTargetArn" : *String* , "maxReceiveCount" : *Integer* }
YAML
deadLetterTargetArn : *String*
maxReceiveCount : *Integer*
sqsManagedSseEnabledoptionalboolean | IResolvablesqs_managed_sse_enabledoptionaltyping.Union[bool, IResolvable]sqsManagedSseEnabledoptionalBooleanSqsManagedSseEnabledoptionalboolSqsManagedSseEnabledoptionalinterface{}#tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#For more information, see Resource tag in the CloudFormation User Guide .
visibilityTimeoutoptionalnumbervisibility_timeoutoptionalint | floatvisibilityTimeoutoptionalNumberVisibilityTimeoutoptionaldoubleVisibilityTimeoutoptional*float64#notes
This blocks other components from receiving the same message and gives the initial component time to process and delete the message from the queue.
Values must be from 0 to 43,200 seconds (12 hours). If you don't specify a value, AWS CloudFormation uses the default value of 30 seconds.
For more information about Amazon SQS queue visibility timeouts, see Visibility timeout in the Amazon SQS Developer Guide .
Properties
For example: arn:aws:sqs:us-east-2:123456789012:mystack-myqueue-15PG5C2FC1CW8 .
For example: mystack-myqueue-1VF9BKQH5BJVI .
CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#cfnOptionsICfnResourceOptionscfn_optionsICfnResourceOptionscfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptions#cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#contentBasedDeduplicationmay be undefinedboolean | IResolvablecontent_based_deduplicationmay be undefinedtyping.Union[bool, IResolvable]contentBasedDeduplicationmay be undefinedBooleanContentBasedDeduplicationmay be undefinedboolContentBasedDeduplicationmay be undefinedinterface{}#creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string#deduplicationScopemay be undefinedstringdeduplication_scopemay be undefinedstrdeduplicationScopemay be undefinedStringDeduplicationScopemay be undefinedstringDeduplicationScopemay be undefined*string#delaySecondsmay be undefinednumberdelay_secondsmay be undefinedint | floatdelaySecondsmay be undefinedNumberDelaySecondsmay be undefineddoubleDelaySecondsmay be undefined*float64#fifoQueuemay be undefinedboolean | IResolvablefifo_queuemay be undefinedtyping.Union[bool, IResolvable]fifoQueuemay be undefinedBooleanFifoQueuemay be undefinedboolFifoQueuemay be undefinedinterface{}#fifoThroughputLimitmay be undefinedstringfifo_throughput_limitmay be undefinedstrfifoThroughputLimitmay be undefinedStringFifoThroughputLimitmay be undefinedstringFifoThroughputLimitmay be undefined*string#kmsDataKeyReusePeriodSecondsmay be undefinednumberkms_data_key_reuse_period_secondsmay be undefinedint | floatkmsDataKeyReusePeriodSecondsmay be undefinedNumberKmsDataKeyReusePeriodSecondsmay be undefineddoubleKmsDataKeyReusePeriodSecondsmay be undefined*float64#kmsMasterKeyIdmay be undefinedstringkms_master_key_idmay be undefinedstrkmsMasterKeyIdmay be undefinedStringKmsMasterKeyIdmay be undefinedstringKmsMasterKeyIdmay be undefined*string#The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId).
maximumMessageSizemay be undefinednumbermaximum_message_sizemay be undefinedint | floatmaximumMessageSizemay be undefinedNumberMaximumMessageSizemay be undefineddoubleMaximumMessageSizemay be undefined*float64#messageRetentionPeriodmay be undefinednumbermessage_retention_periodmay be undefinedint | floatmessageRetentionPeriodmay be undefinedNumberMessageRetentionPeriodmay be undefineddoubleMessageRetentionPeriodmay be undefined*float64#queueNamemay be undefinedstringqueue_namemay be undefinedstrqueueNamemay be undefinedStringQueueNamemay be undefinedstringQueueNamemay be undefined*string#queueRefQueueReferencequeue_refQueueReferencequeueRefQueueReferenceQueueRefQueueReferenceQueueRefQueueReference#receiveMessageWaitTimeSecondsmay be undefinednumberreceive_message_wait_time_secondsmay be undefinedint | floatreceiveMessageWaitTimeSecondsmay be undefinedNumberReceiveMessageWaitTimeSecondsmay be undefineddoubleReceiveMessageWaitTimeSecondsmay be undefined*float64#redriveAllowPolicyanyredrive_allow_policyAnyredriveAllowPolicyObjectRedriveAllowPolicyobjectRedriveAllowPolicyinterface{}#If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).
sqsManagedSseEnabledmay be undefinedboolean | IResolvablesqs_managed_sse_enabledmay be undefinedtyping.Union[bool, IResolvable]sqsManagedSseEnabledmay be undefinedBooleanSqsManagedSseEnabledmay be undefinedboolSqsManagedSseEnabledmay be undefinedinterface{}#CfnElements must be defined within a stack scope (directly or indirectly).
tagsRawmay be undefinedCfnTag[]tags_rawmay be undefinedtyping.List[CfnTag]tagsRawmay be undefinedList<CfnTag>TagsRawmay be undefinedCfnTag[]TagsRawmay be undefined*[]CfnTag#visibilityTimeoutmay be undefinednumbervisibility_timeoutmay be undefinedint | floatvisibilityTimeoutmay be undefinedNumberVisibilityTimeoutmay be undefineddoubleVisibilityTimeoutmay be undefined*float64#Methods
addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#1 parameter
Parameters
pathpathpathpathPath— The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.
addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#notes
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.
addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#notes · 2 parameters
To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).
If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.
For example,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"Properties": {
"GlobalSecondaryIndexes": [
{
"Projection": {
"NonKeyAttributes": [ "myattribute" ]
...
}
...
},
{
"ProjectionType": "INCLUDE"
...
},
]
...
}
The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.
Parameters
pathpathpathpathPath— - The path of the property, you can use dot notation to override values in complex types.valuevaluevaluevalueValue— - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#1 parameter
Parameters
propertyPathproperty_pathpropertyPathpropertyPathPropertyPath— The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#Syntactic sugar for addOverride("Properties.<...>", value).
2 parameters
Parameters
propertyPathproperty_pathpropertyPathpropertyPathPropertyPath— The path of the property.valuevaluevaluevalueValue— The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#notes
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.
applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.
1 parameter
Parameters
strengthstrengthstrengthstrengthStrength— - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#notes
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.
1 parameter
Parameters
attributeNameattribute_nameattributeNameattributeNameAttributeName— The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#1 parameter
Parameters
inspectorinspectorinspectorinspectorInspector— tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.
returns
Returns: The construct as a stack element or undefined if it is not a stack element.
isCfnQueue(x: any): boolean@staticmethod def is_cfn_queue(x: Any) -> boolpublic static Boolean isCfnQueue(Object x)public static bool IsCfnQueue(object x)func IsCfnQueue(X interface{}) *boolstatic#isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.
overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#1 parameter
Parameters
newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId— The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#2 parameters
Parameters
targettargettargettargetTarget— The dependency to replace.newTargetnew_targetnewTargetnewTargetNewTarget— The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#returns
Returns: a string representation of this resource
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.