AwsSqs

Service-level AWS SQS queue component.

Remarks

This component creates a primary SQS queue with stackAndPurpose naming and encryption-safe defaults. It can optionally manage a matching dead-letter queue and wire redrivePolicy.

Naming:

  • Root type token: ${namespace}:aws:AwsSqs. The sqs capability uses the shared args.name identity, producing ${env}-${projectHash}-sqs-<sanitised identity>.
  • Direct aws.sqs.Queue children are parented by AwsSqs. The primary queue uses the raw tuple [args.name]; the optional DLQ adds the required static dlq capability discriminator to distinguish the same qualified child type, [args.name, 'dlq']. The optional aws.sqs.QueuePolicy uses [args.name]; its distinct qualified type means no extra discriminator is required.
  • args.name is shared logical/provider identity: it builds the root and the stackAndPurpose provider names. It must be a plain string and remains subject to the SQS 59-character purpose budget that reserves space for the derived FIFO DLQ suffix.
  • The primary queue AWS name uses the stackAndPurpose style ${env}-${projectHash}-<purpose>; FIFO queues additionally carry the AWS-required .fifo suffix.
  • The optional managed dead-letter queue folds the Dlq qualifier into the purpose (no extra hyphen segment): ${env}-${projectHash}-<purpose>Dlq (and ${env}-${projectHash}-<purpose>Dlq.fifo for FIFO).
  • aws.sqs.QueuePolicy has no component-controlled provider name. Its queueUrl and rendered policy are semantic provider inputs; the provider assigns the policy resource identifier.

Example

CODE
const ordersQueue = new AwsSqs({
  name: 'orders',
  queueType: 'standard',
  deadLetterQueue: {},
});

Constructors

new AwsSqs( args: AwsSqsArgs, options?: ComponentResourceOptions, ): AwsSqs

Parameters

  • args (AwsSqsArgs) — Component inputs for primary queue and optional dead-letter queue orchestration.The component logical name is derived from args.name.
  • options (ComponentResourceOptions, optional) — Optional settings controlling resource behaviour.

Returns

AwsSqs

Hierarchy

  • ComponentResource
  • AwsSqs

Properties

deadLetterQueue: Queue | undefined

readonly

Dead-letter queue resource when enabled.

deadLetterQueueArn: Output<string> | undefined

readonly

ARN of the dead-letter queue when enabled.

deadLetterQueueName: Output<string> | undefined

readonly

Name of the dead-letter queue when enabled.

deadLetterQueueUrl: Output<string> | undefined

readonly

URL of the dead-letter queue when enabled.

queue: Queue

readonly

The primary SQS queue resource.

queueArn: Output<string>

readonly

ARN of the primary queue.

queueName: Output<string>

readonly

Name of the primary queue.

queuePolicy: QueuePolicy | undefined

readonly

Optional queue policy resource when configured.

queueUrl: Output<string>

readonly

URL of the primary queue.

urn: Output<string>

readonly

Inherited from urn

The stable logical URN used to distinctly address a resource, both before and after deployments.

Methods

getData(): Promise<any>

protectedasync

Inherited from getData

Retrieves the data produces by initialize. The data is immediately available in a derived class's constructor after the super(...) call to ComponentResource.

Returns

  • Promise<any>

getProvider(moduleMember: string): ProviderResource | undefined

Inherited from getProvider

Returns the provider for the given module member, if one exists.

Parameters

  • moduleMember (string)

Returns

  • ProviderResource | undefined

initialize( args: Inputs, opts?: ComponentResourceOptions, name?: string, type?: string, ): Promise<any>

protectedasync

Inherited from initialize

Can be overridden by a subclass to asynchronously initialize data for this component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use getData.

Parameters

  • args (Inputs)
  • opts (ComponentResourceOptions, optional)
  • name (string, optional)
  • type (string, optional)

Returns

  • Promise<any>

registerOutputs( outputs?: Inputs | Promise<Inputs> | Output<Inputs>, ): void

protected

Inherited from registerOutputs

Registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

Component resources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

Parameters

  • outputs (Inputs | Promise<Inputs> | Output<Inputs>, optional)

Returns

  • void

Static Methods

isInstance(obj: any): obj is ComponentResource<any>

static

Inherited from isInstance

Returns true if the given object is a CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

Parameters

  • obj (any)

Returns

  • obj is ComponentResource<any>