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. Thesqscapability uses the sharedargs.nameidentity, producing${env}-${projectHash}-sqs-<sanitised identity>. - Direct
aws.sqs.Queuechildren are parented byAwsSqs. The primary queue uses the raw tuple[args.name]; the optional DLQ adds the required staticdlqcapability discriminator to distinguish the same qualified child type,[args.name, 'dlq']. The optionalaws.sqs.QueuePolicyuses[args.name]; its distinct qualified type means no extra discriminator is required. args.nameis shared logical/provider identity: it builds the root and thestackAndPurposeprovider 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
stackAndPurposestyle${env}-${projectHash}-<purpose>; FIFO queues additionally carry the AWS-required.fifosuffix. - The optional managed dead-letter queue folds the
Dlqqualifier into the purpose (no extra hyphen segment):${env}-${projectHash}-<purpose>Dlq(and${env}-${projectHash}-<purpose>Dlq.fifofor FIFO). aws.sqs.QueuePolicyhas no component-controlled provider name. ItsqueueUrland rendered policy are semantic provider inputs; the provider assigns the policy resource identifier.
Example
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 fromargs.name.options(ComponentResourceOptions, optional) — Optional settings controlling resource behaviour.
Returns
AwsSqs
Hierarchy
ComponentResourceAwsSqs
Properties
deadLetterQueue: Queue | undefined
Dead-letter queue resource when enabled.
deadLetterQueueArn: Output<string> | undefined
ARN of the dead-letter queue when enabled.
deadLetterQueueName: Output<string> | undefined
Name of the dead-letter queue when enabled.
deadLetterQueueUrl: Output<string> | undefined
URL of the dead-letter queue when enabled.
queue: Queue
The primary SQS queue resource.
queueArn: Output<string>
ARN of the primary queue.
queueName: Output<string>
Name of the primary queue.
queuePolicy: QueuePolicy | undefined
Optional queue policy resource when configured.
queueUrl: Output<string>
URL of the primary queue.
urn: Output<string>
Inherited from urn
The stable logical URN used to distinctly address a resource, both before and after deployments.
Methods
getData(): Promise<any>
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>
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
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>
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>