Skip to content

Queue

This class encapsulates and extends the ROS resource type ALIYUN::AMQP::Queue.

Initializers

import ros_cdk_amqp
ros_cdk_amqp.Queue(
  scope: Construct,
  id: str,
  instance_id: typing.Union[str, IResolvable],
  queue_name: typing.Union[str, IResolvable],
  virtual_host: typing.Union[str, IResolvable],
  auto_delete_state: typing.Union[bool, IResolvable] = None,
  auto_expire_state: typing.Union[typing.Union[int, float], IResolvable] = None,
  dead_letter_exchange: typing.Union[str, IResolvable] = None,
  dead_letter_routing_key: typing.Union[str, IResolvable] = None,
  exclusive_state: typing.Union[bool, IResolvable] = None,
  maximum_priority: typing.Union[typing.Union[int, float], IResolvable] = None,
  max_length: typing.Union[typing.Union[int, float], IResolvable] = None,
  message_ttl: typing.Union[typing.Union[int, float], IResolvable] = None,
  enable_resource_property_constraint: bool = None
)
Name Type Description
scope ros_cdk_core.Construct No description.
id str No description.
instance_id typing.Union[str, ros_cdk_core.IResolvable] Property instanceId: InstanceId.
queue_name typing.Union[str, ros_cdk_core.IResolvable] Property queueName: The name of the queue to create.
virtual_host typing.Union[str, ros_cdk_core.IResolvable] Property virtualHost: The name of the vhost to which the queue belongs.
auto_delete_state typing.Union[bool, ros_cdk_core.IResolvable] Property autoDeleteState: Specifies whether the Auto Delete attribute is configured.
auto_expire_state typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property autoExpireState: The auto-expiration time for the queue.
dead_letter_exchange typing.Union[str, ros_cdk_core.IResolvable] Property deadLetterExchange: The dead-letter exchange.
dead_letter_routing_key typing.Union[str, ros_cdk_core.IResolvable] Property deadLetterRoutingKey: The dead-letter routing key.
exclusive_state typing.Union[bool, ros_cdk_core.IResolvable] Property exclusiveState: Specifies whether the queue is an exclusive queue.
maximum_priority typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property maximumPriority: The priority of the queue.
max_length typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property maxLength: This parameter is not supported in the current version.
message_ttl typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property messageTtl: The message TTL of the queue If a message is retained in the Queue longer than the configured message lifetime, the message expires.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

instance_idRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property instanceId: InstanceId.


queue_nameRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property queueName: The name of the queue to create.

  • The queue name can contain only letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@). The name must be 1 to 255 characters in length.
  • After a queue is created, its name cannot be changed. To change the name, delete the queue and create a new one.

virtual_hostRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property virtualHost: The name of the vhost to which the queue belongs.

The name can contain only letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@). The name must be 1 to 255 characters in length.


auto_delete_stateOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property autoDeleteState: Specifies whether the Auto Delete attribute is configured.

Valid values: true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled. false: The Auto Delete attribute is not configured.


auto_expire_stateOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property autoExpireState: The auto-expiration time for the queue.

The queue is automatically deleted if it is not accessed within the specified time period. Unit: milliseconds.

This feature must be enabled before you can use this parameter. To enable the feature, .


dead_letter_exchangeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property deadLetterExchange: The dead-letter exchange.

A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.


dead_letter_routing_keyOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property deadLetterRoutingKey: The dead-letter routing key.

The key can contain only letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@). The key must be 1 to 255 characters in length.


exclusive_stateOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property exclusiveState: Specifies whether the queue is an exclusive queue.

Valid values:

  • true: The queue is an exclusive queue. An exclusive queue can be used only by the connection that declares it. The queue is automatically deleted after the connection is closed.
  • false: The queue is not an exclusive queue.

maximum_priorityOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property maximumPriority: The priority of the queue.

The recommended value is an integer from 1 to 10.

This parameter is used for message priority. It is supported only by dedicated instances and can be used only after the message priority feature is enabled. To enable the feature, .


max_lengthOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property maxLength: This parameter is not supported in the current version.

The maximum number of messages that can be stored in the queue. If this limit is exceeded, the earliest messages in the queue are deleted.


message_ttlOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property messageTtl: The message TTL of the queue If a message is retained in the Queue longer than the configured message lifetime, the message expires.

The value of message lifetime must be a non-negative integer, up to 1 day. The unit is milliseconds


enable_resource_property_constraintOptional

  • Type: bool

Methods

Name Description
to_string Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
add_condition No description.
add_count No description.
add_dependency No description.
add_resource_desc No description.
apply_removal_policy No description.
fetch_condition No description.
fetch_dependency No description.
fetch_resource_desc No description.
get_att No description.
set_metadata No description.

to_string

def to_string() -> str

Returns a string representation of this construct.

synthesize

def synthesize(
  session: ISynthesisSession
) -> None

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

fetch_condition

def fetch_condition() -> RosCondition

fetch_dependency

def fetch_dependency() -> typing.List[str]

fetch_resource_desc

def fetch_resource_desc() -> str

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

Name Description
is_construct Return whether the given object is a Construct.

is_construct

import ros_cdk_amqp
ros_cdk_amqp.Queue.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
env ros_cdk_core.IResourceEnvironment The environment this resource belongs to.
ref str No description.
stack ros_cdk_core.Stack The stack in which this resource is defined.
resource ros_cdk_core.RosResource No description.
attr_queue_name typing.Union[str, ros_cdk_core.IResolvable] Attribute QueueName: The name of the queue.
props QueueProps No description.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


envRequired

env: IResourceEnvironment
  • Type: ros_cdk_core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_queue_nameRequired

attr_queue_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute QueueName: The name of the queue.


propsRequired

props: QueueProps