Class: AWSCDK::SQS::QueueBase
- Inherits:
-
Resource
- Object
- Resource
- AWSCDK::SQS::QueueBase
- Includes:
- IAM::IEncryptedResource, IQueue
- Defined in:
- sqs/queue_base.rb
Overview
Reference to a new or existing Amazon SQS queue.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#add_to_resource_policy(statement) ⇒ AWSCDK::IAM::AddToResourcePolicyResult
Adds a statement to the IAM resource policy associated with this queue.
-
#apply_cross_stack_reference_strength(strength) ⇒ void
Override the cross-stack reference strength for this resource.
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#auto_create_policy ⇒ Boolean
Controls automatic creation of policy objects.
-
#encryption_master_key ⇒ AWSCDK::KMS::IKey?
If this queue is server-side encrypted, this is the KMS encryption key.
-
#encryption_type ⇒ AWSCDK::SQS::QueueEncryption?
Whether the contents of the queue are encrypted, and by what type of key.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#fifo ⇒ Boolean
Whether this queue is an Amazon SQS FIFO queue.
- #generate_physical_name ⇒ String
-
#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g.
bucket.bucketArn). -
#get_resource_name_attribute(name_attr) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g.
bucket.bucketName). -
#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant
Grant the actions defined in queueActions to the identity Principal given on this SQS queue resource.
-
#grant_consume_messages(grantee) ⇒ AWSCDK::IAM::Grant
Grant permissions to consume messages from a queue.
-
#grant_on_key(grantee, *actions) ⇒ AWSCDK::IAM::GrantOnKeyResult
Gives permissions to a grantable entity to perform actions on the encryption key.
-
#grant_purge(grantee) ⇒ AWSCDK::IAM::Grant
Grant an IAM principal permissions to purge all messages from the queue.
-
#grant_send_messages(grantee) ⇒ AWSCDK::IAM::Grant
Grant access to send messages to a queue to the given identity.
-
#grants ⇒ AWSCDK::SQS::QueueGrants
Collection of grant methods for a Queue.
-
#initialize(scope, id, props = nil) ⇒ QueueBase
constructor
A new instance of QueueBase.
-
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric for this Queue.
-
#metric_approximate_age_of_oldest_message(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The approximate age of the oldest non-deleted message in the queue.
-
#metric_approximate_number_of_messages_delayed(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages in the queue that are delayed and not available for reading immediately.
-
#metric_approximate_number_of_messages_not_visible(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages that are in flight.
-
#metric_approximate_number_of_messages_visible(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages available for retrieval from the queue.
-
#metric_number_of_empty_receives(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of ReceiveMessage API calls that did not return a message.
-
#metric_number_of_messages_deleted(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages deleted from the queue.
-
#metric_number_of_messages_received(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages returned by calls to the ReceiveMessage action.
-
#metric_number_of_messages_sent(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages added to a queue.
-
#metric_sent_message_size(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The size of messages added to a queue.
-
#node ⇒ Constructs::Node
The tree node.
-
#physical_name ⇒ String
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
-
#queue_arn ⇒ String
The ARN of this queue.
-
#queue_name ⇒ String
The name of this queue.
-
#queue_ref ⇒ AWSCDK::Interfaces::AWSSQS::QueueReference
A reference to a Queue resource.
-
#queue_url ⇒ String
The URL of this queue.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props = nil) ⇒ QueueBase
Returns a new instance of QueueBase.
13 14 15 16 17 18 19 |
# File 'sqs/queue_base.rb', line 13 def initialize(scope, id, props = nil) props = props.is_a?(Hash) ? ::AWSCDK::ResourceProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZXNvdXJjZVByb3BzIn0=")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'sqs/queue_base.rb', line 21 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :physical_name => { kind: :property, name: "physicalName", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :auto_create_policy => { kind: :property, name: "autoCreatePolicy", is_optional: false }, :fifo => { kind: :property, name: "fifo", is_optional: false }, :grants => { kind: :property, name: "grants", is_optional: false }, :queue_arn => { kind: :property, name: "queueArn", is_optional: false }, :queue_name => { kind: :property, name: "queueName", is_optional: false }, :queue_ref => { kind: :property, name: "queueRef", is_optional: false }, :queue_url => { kind: :property, name: "queueUrl", is_optional: false }, :encryption_master_key => { kind: :property, name: "encryptionMasterKey", is_optional: true }, :encryption_type => { kind: :property, name: "encryptionType", is_optional: true }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :generate_physical_name => { kind: :method, name: "generatePhysicalName", is_optional: false }, :get_resource_arn_attribute => { kind: :method, name: "getResourceArnAttribute", is_optional: false }, :get_resource_name_attribute => { kind: :method, name: "getResourceNameAttribute", is_optional: false }, :add_to_resource_policy => { kind: :method, name: "addToResourcePolicy", is_optional: false }, :grant => { kind: :method, name: "grant", is_optional: false }, :grant_consume_messages => { kind: :method, name: "grantConsumeMessages", is_optional: false }, :grant_on_key => { kind: :method, name: "grantOnKey", is_optional: false }, :grant_purge => { kind: :method, name: "grantPurge", is_optional: false }, :grant_send_messages => { kind: :method, name: "grantSendMessages", is_optional: false }, :metric => { kind: :method, name: "metric", is_optional: false }, :metric_approximate_age_of_oldest_message => { kind: :method, name: "metricApproximateAgeOfOldestMessage", is_optional: false }, :metric_approximate_number_of_messages_delayed => { kind: :method, name: "metricApproximateNumberOfMessagesDelayed", is_optional: false }, :metric_approximate_number_of_messages_not_visible => { kind: :method, name: "metricApproximateNumberOfMessagesNotVisible", is_optional: false }, :metric_approximate_number_of_messages_visible => { kind: :method, name: "metricApproximateNumberOfMessagesVisible", is_optional: false }, :metric_number_of_empty_receives => { kind: :method, name: "metricNumberOfEmptyReceives", is_optional: false }, :metric_number_of_messages_deleted => { kind: :method, name: "metricNumberOfMessagesDeleted", is_optional: false }, :metric_number_of_messages_received => { kind: :method, name: "metricNumberOfMessagesReceived", is_optional: false }, :metric_number_of_messages_sent => { kind: :method, name: "metricNumberOfMessagesSent", is_optional: false }, :metric_sent_message_size => { kind: :method, name: "metricSentMessageSize", is_optional: false }, } end |
Instance Method Details
#add_to_resource_policy(statement) ⇒ AWSCDK::IAM::AddToResourcePolicyResult
Adds a statement to the IAM resource policy associated with this queue.
If this queue was created in this stack (new Queue), a queue policy
will be automatically created upon the first call to add_to_policy. If
the queue is imported (Queue.import), then this is a no-op.
270 271 272 273 |
# File 'sqs/queue_base.rb', line 270 def add_to_resource_policy(statement) Jsii::Type.check_type(statement, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeVN0YXRlbWVudCJ9")), "statement") jsii_call_method("addToResourcePolicy", [statement]) end |
#apply_cross_stack_reference_strength(strength) ⇒ void
This method returns an undefined value.
Override the cross-stack reference strength for this resource.
When set, any cross-stack reference to this resource will use the specified
mechanism instead of the global default determined by the
@aws-cdk/core:defaultCrossStackReferences context key. This is useful for
selectively weakening specific references to avoid the "deadly embrace" problem
without changing the app-wide default.
205 206 207 208 |
# File 'sqs/queue_base.rb', line 205 def apply_cross_stack_reference_strength(strength) Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength") jsii_call_method("applyCrossStackReferenceStrength", [strength]) end |
#apply_removal_policy(policy) ⇒ void
This method returns an undefined value.
Apply the given removal policy to this resource.
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).
222 223 224 225 |
# File 'sqs/queue_base.rb', line 222 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#auto_create_policy ⇒ Boolean
Controls automatic creation of policy objects.
Set by subclasses.
110 111 112 |
# File 'sqs/queue_base.rb', line 110 def auto_create_policy() jsii_get_property("autoCreatePolicy") end |
#encryption_master_key ⇒ AWSCDK::KMS::IKey?
If this queue is server-side encrypted, this is the KMS encryption key.
161 162 163 |
# File 'sqs/queue_base.rb', line 161 def encryption_master_key() jsii_get_property("encryptionMasterKey") end |
#encryption_type ⇒ AWSCDK::SQS::QueueEncryption?
Whether the contents of the queue are encrypted, and by what type of key.
168 169 170 |
# File 'sqs/queue_base.rb', line 168 def encryption_type() jsii_get_property("encryptionType") end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
80 81 82 |
# File 'sqs/queue_base.rb', line 80 def env() jsii_get_property("env") end |
#fifo ⇒ Boolean
Whether this queue is an Amazon SQS FIFO queue.
If false, this is a standard queue.
119 120 121 |
# File 'sqs/queue_base.rb', line 119 def fifo() jsii_get_property("fifo") end |
#generate_physical_name ⇒ String
228 229 230 |
# File 'sqs/queue_base.rb', line 228 def generate_physical_name() jsii_call_method("generatePhysicalName", []) end |
#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. bucket.bucketArn).
Normally, this token will resolve to arn_attr, but if the resource is
referenced across environments, arn_components will be used to synthesize
a concrete ARN with the resource's physical name. Make sure to reference
this.physicalName in arn_components.
242 243 244 245 246 247 |
# File 'sqs/queue_base.rb', line 242 def get_resource_arn_attribute(arn_attr, arn_components) Jsii::Type.check_type(arn_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arnAttr") arn_components = arn_components.is_a?(Hash) ? ::AWSCDK::ARNComponents.new(**arn_components.transform_keys(&:to_sym)) : arn_components Jsii::Type.check_type(arn_components, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Bcm5Db21wb25lbnRzIn0=")), "arnComponents") jsii_call_method("getResourceArnAttribute", [arn_attr, arn_components]) end |
#get_resource_name_attribute(name_attr) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. bucket.bucketName).
Normally, this token will resolve to name_attr, but if the resource is
referenced across environments, it will be resolved to this.physicalName,
which will be a concrete name.
257 258 259 260 |
# File 'sqs/queue_base.rb', line 257 def get_resource_name_attribute(name_attr) Jsii::Type.check_type(name_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nameAttr") jsii_call_method("getResourceNameAttribute", [name_attr]) end |
#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant
Grant the actions defined in queueActions to the identity Principal given on this SQS queue resource.
[disable-awslint:no-grants]
282 283 284 285 286 287 288 |
# File 'sqs/queue_base.rb', line 282 def grant(grantee, *actions) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") actions.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actions[#{index}]") end jsii_call_method("grant", [grantee, *actions]) end |
#grant_consume_messages(grantee) ⇒ AWSCDK::IAM::Grant
Grant permissions to consume messages from a queue.
This will grant the following permissions:
- sqs:ChangeMessageVisibility
- sqs:DeleteMessage
- sqs:ReceiveMessage
- sqs:GetQueueAttributes
- sqs:GetQueueUrl
If encryption is used, permission to use the key to decrypt the contents of the queue will also be granted to the same principal.
This will grant the following KMS permissions:
- kms:Decrypt
The use of this method is discouraged. Please use grants.consumeMessages() instead.
[disable-awslint:no-grants]
312 313 314 315 |
# File 'sqs/queue_base.rb', line 312 def (grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantConsumeMessages", [grantee]) end |
#grant_on_key(grantee, *actions) ⇒ AWSCDK::IAM::GrantOnKeyResult
Gives permissions to a grantable entity to perform actions on the encryption key.
322 323 324 325 326 327 328 |
# File 'sqs/queue_base.rb', line 322 def grant_on_key(grantee, *actions) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") actions.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actions[#{index}]") end jsii_call_method("grantOnKey", [grantee, *actions]) end |
#grant_purge(grantee) ⇒ AWSCDK::IAM::Grant
Grant an IAM principal permissions to purge all messages from the queue.
This will grant the following permissions:
- sqs:PurgeQueue
- sqs:GetQueueAttributes
- sqs:GetQueueUrl
The use of this method is discouraged. Please use grants.purge() instead.
[disable-awslint:no-grants]
344 345 346 347 |
# File 'sqs/queue_base.rb', line 344 def grant_purge(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantPurge", [grantee]) end |
#grant_send_messages(grantee) ⇒ AWSCDK::IAM::Grant
Grant access to send messages to a queue to the given identity.
This will grant the following permissions:
- sqs:SendMessage
- sqs:GetQueueAttributes
- sqs:GetQueueUrl
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.
This will grant the following KMS permissions:
- kms:Decrypt
- kms:Encrypt
- kms:ReEncrypt*
- kms:GenerateDataKey*
The use of this method is discouraged. Please use grants.sendMessages() instead.
[disable-awslint:no-grants]
372 373 374 375 |
# File 'sqs/queue_base.rb', line 372 def (grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantSendMessages", [grantee]) end |
#grants ⇒ AWSCDK::SQS::QueueGrants
Collection of grant methods for a Queue.
126 127 128 |
# File 'sqs/queue_base.rb', line 126 def grants() jsii_get_property("grants") end |
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric for this Queue.
382 383 384 385 386 387 |
# File 'sqs/queue_base.rb', line 382 def metric(metric_name, props = nil) Jsii::Type.check_type(metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metric", [metric_name, props]) end |
#metric_approximate_age_of_oldest_message(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The approximate age of the oldest non-deleted message in the queue.
Maximum over 5 minutes
395 396 397 398 399 |
# File 'sqs/queue_base.rb', line 395 def (props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricApproximateAgeOfOldestMessage", [props]) end |
#metric_approximate_number_of_messages_delayed(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages in the queue that are delayed and not available for reading immediately.
Maximum over 5 minutes
407 408 409 410 411 |
# File 'sqs/queue_base.rb', line 407 def (props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricApproximateNumberOfMessagesDelayed", [props]) end |
#metric_approximate_number_of_messages_not_visible(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages that are in flight.
Maximum over 5 minutes
419 420 421 422 423 |
# File 'sqs/queue_base.rb', line 419 def (props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricApproximateNumberOfMessagesNotVisible", [props]) end |
#metric_approximate_number_of_messages_visible(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages available for retrieval from the queue.
Maximum over 5 minutes
431 432 433 434 435 |
# File 'sqs/queue_base.rb', line 431 def (props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricApproximateNumberOfMessagesVisible", [props]) end |
#metric_number_of_empty_receives(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of ReceiveMessage API calls that did not return a message.
Sum over 5 minutes
443 444 445 446 447 |
# File 'sqs/queue_base.rb', line 443 def metric_number_of_empty_receives(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricNumberOfEmptyReceives", [props]) end |
#metric_number_of_messages_deleted(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages deleted from the queue.
Sum over 5 minutes
455 456 457 458 459 |
# File 'sqs/queue_base.rb', line 455 def (props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricNumberOfMessagesDeleted", [props]) end |
#metric_number_of_messages_received(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages returned by calls to the ReceiveMessage action.
Sum over 5 minutes
467 468 469 470 471 |
# File 'sqs/queue_base.rb', line 467 def (props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricNumberOfMessagesReceived", [props]) end |
#metric_number_of_messages_sent(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages added to a queue.
Sum over 5 minutes
479 480 481 482 483 |
# File 'sqs/queue_base.rb', line 479 def (props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricNumberOfMessagesSent", [props]) end |
#metric_sent_message_size(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The size of messages added to a queue.
Average over 5 minutes
491 492 493 494 495 |
# File 'sqs/queue_base.rb', line 491 def (props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricSentMessageSize", [props]) end |
#node ⇒ Constructs::Node
The tree node.
65 66 67 |
# File 'sqs/queue_base.rb', line 65 def node() jsii_get_property("node") end |
#physical_name ⇒ String
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
This value will resolve to one of the following:
- a concrete value (e.g.
"my-awesome-bucket") undefined, when a name should be generated by CloudFormation- a concrete name generated automatically during synthesis, in cross-environment scenarios.
94 95 96 |
# File 'sqs/queue_base.rb', line 94 def physical_name() jsii_get_property("physicalName") end |
#queue_arn ⇒ String
The ARN of this queue.
133 134 135 |
# File 'sqs/queue_base.rb', line 133 def queue_arn() jsii_get_property("queueArn") end |
#queue_name ⇒ String
The name of this queue.
140 141 142 |
# File 'sqs/queue_base.rb', line 140 def queue_name() jsii_get_property("queueName") end |
#queue_ref ⇒ AWSCDK::Interfaces::AWSSQS::QueueReference
A reference to a Queue resource.
147 148 149 |
# File 'sqs/queue_base.rb', line 147 def queue_ref() jsii_get_property("queueRef") end |
#queue_url ⇒ String
The URL of this queue.
154 155 156 |
# File 'sqs/queue_base.rb', line 154 def queue_url() jsii_get_property("queueUrl") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
101 102 103 |
# File 'sqs/queue_base.rb', line 101 def stack() jsii_get_property("stack") end |
#to_string ⇒ String
Returns a string representation of this construct.
175 176 177 |
# File 'sqs/queue_base.rb', line 175 def to_string() jsii_call_method("toString", []) end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
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.
188 189 190 191 192 193 |
# File 'sqs/queue_base.rb', line 188 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |