import * as sqs from "@distilled.cloud/aws/sqs"; import * as Effect from "effect/Effect"; import * as Binding from "../../Binding.ts"; import type { Queue } from "./Queue.ts"; export interface GetQueueAttributesRequest extends Omit { } /** * Runtime binding for `sqs:GetQueueAttributes`. * * Bind this operation to a {@link Queue} inside a function runtime to read * live queue attributes — e.g. `ApproximateNumberOfMessages` for queue-depth * monitoring or backpressure decisions. The binding grants the host function * `sqs:GetQueueAttributes` on the queue. Provide the * `GetQueueAttributesHttp` layer on the Function to implement the binding. * ### Reading Queue Attributes * **Example:** Monitor Queue Depth * ```typescript * // init (provide SQS.GetQueueAttributesHttp on the Function) * const getQueueAttributes = yield* SQS.GetQueueAttributes(queue); * * // runtime * const result = yield* getQueueAttributes({ * AttributeNames: ["ApproximateNumberOfMessages"], * }); * const depth = Number(result.Attributes?.ApproximateNumberOfMessages ?? 0); * ``` * * @binding */ export interface GetQueueAttributes extends Binding.Service Effect.Effect<(request?: GetQueueAttributesRequest) => Effect.Effect>> { } export declare const GetQueueAttributes: GetQueueAttributes; //# sourceMappingURL=GetQueueAttributes.d.ts.map