Show / Hide Table of Contents

Class QueueBase

Reference to a new or existing Amazon SQS queue.

Inheritance
object
Resource
QueueBase
Queue
Implements
IQueue
IResource
IConstruct
IDependable
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.SQS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class QueueBase : Resource, IQueue, IResource, IConstruct, IDependable
Syntax (vb)
Public MustInherit Class QueueBase Inherits Resource Implements IQueue, IResource, IConstruct, IDependable

Synopsis

Constructors

QueueBase(Construct, string, IResourceProps?)

Reference to a new or existing Amazon SQS queue.

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, params 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(Construct, string, IResourceProps?)

Reference to a new or existing Amazon SQS queue.

protected QueueBase(Construct scope, string id, IResourceProps? props = null)
Parameters
scope Construct
id string
props IResourceProps

Properties

AutoCreatePolicy

Controls automatic creation of policy objects.

protected abstract bool AutoCreatePolicy { get; }
Property Value

bool

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

IKey

EncryptionType

Whether the contents of the queue are encrypted, and by what type of key.

public abstract QueueEncryption? EncryptionType { get; }
Property Value

QueueEncryption?

Fifo

Whether this queue is an Amazon SQS FIFO queue.

public abstract bool Fifo { get; }
Property Value

bool

Remarks

If false, this is a standard queue.

QueueArn

The ARN of this queue.

public abstract string QueueArn { get; }
Property Value

string

QueueName

The name of this queue.

public abstract string QueueName { get; }
Property Value

string

QueueUrl

The URL of this queue.

public abstract string QueueUrl { get; }
Property Value

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

IAddToResourcePolicyResult

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, params 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 string[]

The actions to grant.

Returns

Grant

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

Grant

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

      Grant

      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

        Grant

        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 string
            props IMetricOptions
            Returns

            Metric

            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

            Metric

            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

            Metric

            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

            Metric

            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

            Metric

            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

            Metric

            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

            Metric

            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

            Metric

            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

            Metric

            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

            Metric

            Remarks

            Average over 5 minutes

            Implements

            IQueue
            IResource
            Constructs.IConstruct
            Constructs.IDependable
            Back to top Generated by DocFX