Class QueueBase
Reference to a new or existing Amazon SQS queue.
Inherited Members
Namespace: Amazon.CDK.AWS.SQS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class QueueBase : Resource, IQueue, IResource
Syntax (vb)
Public MustInherit Class QueueBase
Inherits Resource
Implements IQueue, IResource
Synopsis
Constructors
QueueBase(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
QueueBase(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
QueueBase(Construct, String, IResourceProps) |
Properties
AutoCreatePolicy | Controls automatic creation of policy objects. |
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. |
Constructors
QueueBase(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected QueueBase(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
QueueBase(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected QueueBase(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
QueueBase(Construct, String, IResourceProps)
protected QueueBase(Construct scope, string id, IResourceProps props = null)
Parameters
- scope Constructs.Construct
- id System.String
- props IResourceProps
Properties
AutoCreatePolicy
Controls automatic creation of policy objects.
protected abstract bool AutoCreatePolicy { get; }
Property Value
System.Boolean
Remarks
Set by subclasses.
EncryptionMasterKey
If this queue is server-side encrypted, this is the KMS encryption key.
public abstract IKey EncryptionMasterKey { get; }
Property Value
EncryptionType
Whether the contents of the queue are encrypted, and by what type of key.
public abstract Nullable<QueueEncryption> EncryptionType { get; }
Property Value
System.Nullable<QueueEncryption>
Fifo
Whether this queue is an Amazon SQS FIFO queue.
public abstract bool Fifo { get; }
Property Value
System.Boolean
Remarks
If false, this is a standard queue.
QueueArn
The ARN of this queue.
public abstract string QueueArn { get; }
Property Value
System.String
QueueName
The name of this queue.
public abstract string QueueName { get; }
Property Value
System.String
QueueUrl
The URL of this queue.
public abstract string QueueUrl { get; }
Property Value
System.String
Methods
AddToResourcePolicy(PolicyStatement)
Adds a statement to the IAM resource policy associated with this queue.
public virtual 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.
public virtual Grant Grant(IGrantable grantee, params string[] actions)
Parameters
- grantee IGrantable
Principal to grant right to.
- actions System.String[]
The actions to grant.
Returns
GrantConsumeMessages(IGrantable)
Grant permissions to consume messages from a queue.
public virtual Grant GrantConsumeMessages(IGrantable grantee)
Parameters
- grantee IGrantable
Principal to grant consume rights to.
Returns
Remarks
This will grant the following permissions:
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:
GrantPurge(IGrantable)
Grant an IAM principal permissions to purge all messages from the queue.
public virtual 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.
public virtual Grant GrantSendMessages(IGrantable grantee)
Parameters
- grantee IGrantable
Principal to grant send rights to.
Returns
Remarks
This will grant the following permissions:
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:
Metric(String, IMetricOptions)
Return the given named metric for this Queue.
public virtual 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.
public virtual 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.
public virtual Metric MetricApproximateNumberOfMessagesDelayed(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Maximum over 5 minutes
MetricApproximateNumberOfMessagesNotVisible(IMetricOptions)
The number of messages that are in flight.
public virtual 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.
public virtual 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.
public virtual Metric MetricNumberOfEmptyReceives(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Sum over 5 minutes
MetricNumberOfMessagesDeleted(IMetricOptions)
The number of messages deleted from the queue.
public virtual 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.
public virtual Metric MetricNumberOfMessagesReceived(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Sum over 5 minutes
MetricNumberOfMessagesSent(IMetricOptions)
The number of messages added to a queue.
public virtual Metric MetricNumberOfMessagesSent(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Sum over 5 minutes
MetricSentMessageSize(IMetricOptions)
The size of messages added to a queue.
public virtual Metric MetricSentMessageSize(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Average over 5 minutes