Interface IQueue
Represents an SQS queue.
Namespace: Amazon.CDK.AWS.SQS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IQueue : IResource
Syntax (vb)
Public Interface IQueue
Inherits IResource, IConstruct, IDependable
Synopsis
Properties
EncryptionMasterKey | If this queue is server-side encrypted, this is the KMS encryption key. |
EncryptionType | Whether the contents of the queue are encrypted, and by what type of key. |
Fifo | Whether this queue is an Amazon SQS FIFO queue. |
QueueArn | The ARN of this queue. |
QueueName | The name of this queue. |
QueueUrl | The URL of this queue. |
Methods
AddToResourcePolicy(PolicyStatement) | Adds a statement to the IAM resource policy associated with this queue. |
Grant(IGrantable, String[]) | Grant the actions defined in queueActions to the identity Principal given on this SQS queue resource. |
GrantConsumeMessages(IGrantable) | Grant permissions to consume messages from a queue. |
GrantPurge(IGrantable) | Grant an IAM principal permissions to purge all messages from the queue. |
GrantSendMessages(IGrantable) | Grant access to send messages to a queue to the given identity. |
Metric(String, IMetricOptions) | Return the given named metric for this Queue. |
MetricApproximateAgeOfOldestMessage(IMetricOptions) | The approximate age of the oldest non-deleted message in the queue. |
MetricApproximateNumberOfMessagesDelayed(IMetricOptions) | The number of messages in the queue that are delayed and not available for reading immediately. |
MetricApproximateNumberOfMessagesNotVisible(IMetricOptions) | The number of messages that are in flight. |
MetricApproximateNumberOfMessagesVisible(IMetricOptions) | The number of messages available for retrieval from the queue. |
MetricNumberOfEmptyReceives(IMetricOptions) | The number of ReceiveMessage API calls that did not return a message. |
MetricNumberOfMessagesDeleted(IMetricOptions) | The number of messages deleted from the queue. |
MetricNumberOfMessagesReceived(IMetricOptions) | The number of messages returned by calls to the ReceiveMessage action. |
MetricNumberOfMessagesSent(IMetricOptions) | The number of messages added to a queue. |
MetricSentMessageSize(IMetricOptions) | The size of messages added to a queue. |
Properties
EncryptionMasterKey
If this queue is server-side encrypted, this is the KMS encryption key.
virtual IKey EncryptionMasterKey { get; }
Property Value
EncryptionType
Whether the contents of the queue are encrypted, and by what type of key.
virtual Nullable<QueueEncryption> EncryptionType { get; }
Property Value
System.Nullable<QueueEncryption>
Fifo
Whether this queue is an Amazon SQS FIFO queue.
bool Fifo { get; }
Property Value
System.Boolean
Remarks
If false, this is a standard queue.
QueueArn
The ARN of this queue.
string QueueArn { get; }
Property Value
System.String
Remarks
Attribute: true
QueueName
The name of this queue.
string QueueName { get; }
Property Value
System.String
Remarks
Attribute: true
QueueUrl
The URL of this queue.
string QueueUrl { get; }
Property Value
System.String
Remarks
Attribute: true
Methods
AddToResourcePolicy(PolicyStatement)
Adds a statement to the IAM resource policy associated with this queue.
IAddToResourcePolicyResult AddToResourcePolicy(PolicyStatement statement)
Parameters
- statement PolicyStatement
Returns
Remarks
If this queue was created in this stack (new Queue
), a queue policy
will be automatically created upon the first call to addToPolicy
. If
the queue is imported (Queue.import
), then this is a no-op.
Grant(IGrantable, String[])
Grant the actions defined in queueActions to the identity Principal given on this SQS queue resource.
Grant Grant(IGrantable grantee, params string[] queueActions)
Parameters
- grantee IGrantable
Principal to grant right to.
- queueActions System.String[]
The actions to grant.
Returns
GrantConsumeMessages(IGrantable)
Grant permissions to consume messages from a queue.
Grant GrantConsumeMessages(IGrantable grantee)
Parameters
- grantee IGrantable
Principal to grant consume rights to.
Returns
Remarks
This will grant the following permissions:
GrantPurge(IGrantable)
Grant an IAM principal permissions to purge all messages from the queue.
Grant GrantPurge(IGrantable grantee)
Parameters
- grantee IGrantable
Principal to grant send rights to.
Returns
Remarks
This will grant the following permissions:
GrantSendMessages(IGrantable)
Grant access to send messages to a queue to the given identity.
Grant GrantSendMessages(IGrantable grantee)
Parameters
- grantee IGrantable
Principal to grant send rights to.
Returns
Remarks
This will grant the following permissions:
Metric(String, IMetricOptions)
Return the given named metric for this Queue.
Metric Metric(string metricName, IMetricOptions props = null)
Parameters
- metricName System.String
- props IMetricOptions
Returns
MetricApproximateAgeOfOldestMessage(IMetricOptions)
The approximate age of the oldest non-deleted message in the queue.
Metric MetricApproximateAgeOfOldestMessage(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Maximum over 5 minutes
MetricApproximateNumberOfMessagesDelayed(IMetricOptions)
The number of messages in the queue that are delayed and not available for reading immediately.
Metric MetricApproximateNumberOfMessagesDelayed(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Maximum over 5 minutes
MetricApproximateNumberOfMessagesNotVisible(IMetricOptions)
The number of messages that are in flight.
Metric MetricApproximateNumberOfMessagesNotVisible(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Maximum over 5 minutes
MetricApproximateNumberOfMessagesVisible(IMetricOptions)
The number of messages available for retrieval from the queue.
Metric MetricApproximateNumberOfMessagesVisible(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Maximum over 5 minutes
MetricNumberOfEmptyReceives(IMetricOptions)
The number of ReceiveMessage API calls that did not return a message.
Metric MetricNumberOfEmptyReceives(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Sum over 5 minutes
MetricNumberOfMessagesDeleted(IMetricOptions)
The number of messages deleted from the queue.
Metric MetricNumberOfMessagesDeleted(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Sum over 5 minutes
MetricNumberOfMessagesReceived(IMetricOptions)
The number of messages returned by calls to the ReceiveMessage action.
Metric MetricNumberOfMessagesReceived(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Sum over 5 minutes
MetricNumberOfMessagesSent(IMetricOptions)
The number of messages added to a queue.
Metric MetricNumberOfMessagesSent(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Sum over 5 minutes
MetricSentMessageSize(IMetricOptions)
The size of messages added to a queue.
Metric MetricSentMessageSize(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Average over 5 minutes