Class CfnQueue
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IQueueRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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 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();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.sqs.IQueueRef
IQueueRef.Jsii$Default, IQueueRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnQueue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnQueue(software.amazon.jsii.JsiiObjectRef objRef) Create a newAWS::SQS::Queue.CfnQueue(software.constructs.Construct scope, String id, CfnQueueProps props) Create a newAWS::SQS::Queue. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForQueue(IQueueRef resource) Returns the Amazon Resource Name (ARN) of the queue.Returns the queue name.Returns the URLs of the queues from the policy.For first-in-first-out (FIFO) queues, specifies whether to enable content-based deduplication.For high throughput for FIFO queues, specifies whether message deduplication occurs at the message group or queue level.The time in seconds for which the delivery of all messages in the queue is delayed.If set to true, creates a FIFO queue.For high throughput for FIFO queues, specifies whether the FIFO queue throughput quota applies to the entire queue or per message group.The length of time in seconds for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS again.The ID of an AWS Key Management Service (KMS) for Amazon SQS , or a custom KMS.The limit of how many bytes that a message can contain before Amazon SQS rejects it.The number of seconds that Amazon SQS retains a message.A name for the queue.A reference to a Queue resource.Specifies the duration, in seconds, that the ReceiveMessage action call waits until a message is in the queue in order to include it in the response, rather than returning an empty response if a message isn't yet available.The string that includes the parameters for the permissions for the dead-letter queue redrive permission and which source queues can specify dead-letter queues as a JSON object.The string that includes the parameters for the dead-letter queue functionality of the source queue as a JSON object.Enables server-side queue encryption using SQS owned encryption keys.getTags()Tag Manager which manages the tags for this resource.The tags that you attach to this queue.The length of time during which a message will be unavailable after a message is delivered from the queue.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanisCfnQueue(Object x) Checks whether the given object is a CfnQueue.renderProperties(Map<String, Object> props) voidFor first-in-first-out (FIFO) queues, specifies whether to enable content-based deduplication.voidFor first-in-first-out (FIFO) queues, specifies whether to enable content-based deduplication.voidsetDeduplicationScope(String value) For high throughput for FIFO queues, specifies whether message deduplication occurs at the message group or queue level.voidsetDelaySeconds(Number value) The time in seconds for which the delivery of all messages in the queue is delayed.voidsetFifoQueue(Boolean value) If set to true, creates a FIFO queue.voidsetFifoQueue(IResolvable value) If set to true, creates a FIFO queue.voidsetFifoThroughputLimit(String value) For high throughput for FIFO queues, specifies whether the FIFO queue throughput quota applies to the entire queue or per message group.voidThe length of time in seconds for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS again.voidsetKmsMasterKeyId(String value) The ID of an AWS Key Management Service (KMS) for Amazon SQS , or a custom KMS.voidsetMaximumMessageSize(Number value) The limit of how many bytes that a message can contain before Amazon SQS rejects it.voidsetMessageRetentionPeriod(Number value) The number of seconds that Amazon SQS retains a message.voidsetQueueName(String value) A name for the queue.voidSpecifies the duration, in seconds, that the ReceiveMessage action call waits until a message is in the queue in order to include it in the response, rather than returning an empty response if a message isn't yet available.voidsetRedriveAllowPolicy(Object value) The string that includes the parameters for the permissions for the dead-letter queue redrive permission and which source queues can specify dead-letter queues as a JSON object.voidsetRedrivePolicy(Object value) The string that includes the parameters for the dead-letter queue functionality of the source queue as a JSON object.voidsetSqsManagedSseEnabled(Boolean value) Enables server-side queue encryption using SQS owned encryption keys.voidEnables server-side queue encryption using SQS owned encryption keys.voidsetTagsRaw(List<CfnTag> value) The tags that you attach to this queue.voidsetVisibilityTimeout(Number value) The length of time during which a message will be unavailable after a message is delivered from the queue.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnQueue
protected CfnQueue(software.amazon.jsii.JsiiObjectRef objRef) -
CfnQueue
protected CfnQueue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnQueue
@Stability(Stable) public CfnQueue(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnQueueProps props) Create a newAWS::SQS::Queue.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties.
-
CfnQueue
@Stability(Stable) public CfnQueue(@NotNull software.constructs.Construct scope, @NotNull String id) Create a newAWS::SQS::Queue.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
arnForQueue
- Parameters:
resource- This parameter is required.
-
isCfnQueue
Checks whether the given object is a CfnQueue.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
Returns the Amazon Resource Name (ARN) of the queue.For example:
arn:aws:sqs:us-east-2:123456789012:mystack-myqueue-15PG5C2FC1CW8. -
getAttrQueueName
Returns the queue name.For example:
mystack-myqueue-1VF9BKQH5BJVI. -
getAttrQueueUrl
Returns the URLs of the queues from the policy. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getQueueRef
A reference to a Queue resource.- Specified by:
getQueueRefin interfaceIQueueRef
-
getTags
Tag Manager which manages the tags for this resource. -
getContentBasedDeduplication
For first-in-first-out (FIFO) queues, specifies whether to enable content-based deduplication.Returns union: either
BooleanorIResolvable -
setContentBasedDeduplication
For first-in-first-out (FIFO) queues, specifies whether to enable content-based deduplication. -
setContentBasedDeduplication
For first-in-first-out (FIFO) queues, specifies whether to enable content-based deduplication. -
getDeduplicationScope
For high throughput for FIFO queues, specifies whether message deduplication occurs at the message group or queue level. -
setDeduplicationScope
For high throughput for FIFO queues, specifies whether message deduplication occurs at the message group or queue level. -
getDelaySeconds
The time in seconds for which the delivery of all messages in the queue is delayed. -
setDelaySeconds
The time in seconds for which the delivery of all messages in the queue is delayed. -
getFifoQueue
If set to true, creates a FIFO queue.Returns union: either
BooleanorIResolvable -
setFifoQueue
If set to true, creates a FIFO queue. -
setFifoQueue
If set to true, creates a FIFO queue. -
getFifoThroughputLimit
For high throughput for FIFO queues, specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. -
setFifoThroughputLimit
For high throughput for FIFO queues, specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. -
getKmsDataKeyReusePeriodSeconds
The length of time in seconds for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS again. -
setKmsDataKeyReusePeriodSeconds
The length of time in seconds for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS again. -
getKmsMasterKeyId
The ID of an AWS Key Management Service (KMS) for Amazon SQS , or a custom KMS. -
setKmsMasterKeyId
The ID of an AWS Key Management Service (KMS) for Amazon SQS , or a custom KMS. -
getMaximumMessageSize
The limit of how many bytes that a message can contain before Amazon SQS rejects it. -
setMaximumMessageSize
The limit of how many bytes that a message can contain before Amazon SQS rejects it. -
getMessageRetentionPeriod
The number of seconds that Amazon SQS retains a message. -
setMessageRetentionPeriod
The number of seconds that Amazon SQS retains a message. -
getQueueName
A name for the queue. -
setQueueName
A name for the queue. -
getReceiveMessageWaitTimeSeconds
Specifies the duration, in seconds, that the ReceiveMessage action call waits until a message is in the queue in order to include it in the response, rather than returning an empty response if a message isn't yet available. -
setReceiveMessageWaitTimeSeconds
Specifies the duration, in seconds, that the ReceiveMessage action call waits until a message is in the queue in order to include it in the response, rather than returning an empty response if a message isn't yet available. -
getRedriveAllowPolicy
The string that includes the parameters for the permissions for the dead-letter queue redrive permission and which source queues can specify dead-letter queues as a JSON object. -
setRedriveAllowPolicy
The string that includes the parameters for the permissions for the dead-letter queue redrive permission and which source queues can specify dead-letter queues as a JSON object. -
getRedrivePolicy
The string that includes the parameters for the dead-letter queue functionality of the source queue as a JSON object. -
setRedrivePolicy
The string that includes the parameters for the dead-letter queue functionality of the source queue as a JSON object. -
getSqsManagedSseEnabled
Enables server-side queue encryption using SQS owned encryption keys.Returns union: either
BooleanorIResolvable -
setSqsManagedSseEnabled
Enables server-side queue encryption using SQS owned encryption keys. -
setSqsManagedSseEnabled
Enables server-side queue encryption using SQS owned encryption keys. -
getTagsRaw
The tags that you attach to this queue. -
setTagsRaw
The tags that you attach to this queue. -
getVisibilityTimeout
The length of time during which a message will be unavailable after a message is delivered from the queue. -
setVisibilityTimeout
The length of time during which a message will be unavailable after a message is delivered from the queue.
-