All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.sqs.kotlin.SqsFunctions.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.sqs.kotlin

import com.pulumi.awsnative.sqs.SqsFunctions.getQueueInlinePolicyPlain
import com.pulumi.awsnative.sqs.SqsFunctions.getQueuePlain
import com.pulumi.awsnative.sqs.kotlin.inputs.GetQueueInlinePolicyPlainArgs
import com.pulumi.awsnative.sqs.kotlin.inputs.GetQueueInlinePolicyPlainArgsBuilder
import com.pulumi.awsnative.sqs.kotlin.inputs.GetQueuePlainArgs
import com.pulumi.awsnative.sqs.kotlin.inputs.GetQueuePlainArgsBuilder
import com.pulumi.awsnative.sqs.kotlin.outputs.GetQueueInlinePolicyResult
import com.pulumi.awsnative.sqs.kotlin.outputs.GetQueueResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.awsnative.sqs.kotlin.outputs.GetQueueInlinePolicyResult.Companion.toKotlin as getQueueInlinePolicyResultToKotlin
import com.pulumi.awsnative.sqs.kotlin.outputs.GetQueueResult.Companion.toKotlin as getQueueResultToKotlin

public object SqsFunctions {
    /**
     * The ``AWS::SQS::Queue`` resource creates an SQS standard or FIFO queue.
     *  Keep the following caveats in mind:
     *   +  If you don't specify the ``FifoQueue`` property, SQS creates a standard queue.
     *   You can't change the queue type after you create it and you can't convert an existing standard queue into a FIFO queue. You must either create a new FIFO queue for your application or delete your existing standard queue and recreate it as a FIFO queue. For more information, see [Moving from a standard queue to a FIFO queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-moving.html) in the *Developer Guide*.
     *    +  If you don't provide a value for a property, the queue is created with the default value for the property.
     *   +  If you delete a queue, you must wait at least 60 seconds before creating a queue with the same name.
     *   +  To successfully create a new queue, you must provide a queue name that adheres to the [limits related to queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) and is unique within the scope of your queues.
     *  For more information about creating FIFO (first-in-first-out) queues, see [Creating an queue ()](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/screate-queue-cloudformation.html) in the *Developer Guide*.
     * @param argument null
     * @return null
     */
    public suspend fun getQueue(argument: GetQueuePlainArgs): GetQueueResult =
        getQueueResultToKotlin(getQueuePlain(argument.toJava()).await())

    /**
     * @see [getQueue].
     * @param queueUrl Returns the URLs of the queues from the policy.
     * @return null
     */
    public suspend fun getQueue(queueUrl: String): GetQueueResult {
        val argument = GetQueuePlainArgs(
            queueUrl = queueUrl,
        )
        return getQueueResultToKotlin(getQueuePlain(argument.toJava()).await())
    }

    /**
     * @see [getQueue].
     * @param argument Builder for [com.pulumi.awsnative.sqs.kotlin.inputs.GetQueuePlainArgs].
     * @return null
     */
    public suspend fun getQueue(argument: suspend GetQueuePlainArgsBuilder.() -> Unit): GetQueueResult {
        val builder = GetQueuePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getQueueResultToKotlin(getQueuePlain(builtArgument.toJava()).await())
    }

    /**
     * Schema for SQS QueueInlinePolicy
     * @param argument null
     * @return null
     */
    public suspend fun getQueueInlinePolicy(argument: GetQueueInlinePolicyPlainArgs): GetQueueInlinePolicyResult =
        getQueueInlinePolicyResultToKotlin(getQueueInlinePolicyPlain(argument.toJava()).await())

    /**
     * @see [getQueueInlinePolicy].
     * @param queue The URL of the SQS queue.
     * @return null
     */
    public suspend fun getQueueInlinePolicy(queue: String): GetQueueInlinePolicyResult {
        val argument = GetQueueInlinePolicyPlainArgs(
            queue = queue,
        )
        return getQueueInlinePolicyResultToKotlin(getQueueInlinePolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getQueueInlinePolicy].
     * @param argument Builder for [com.pulumi.awsnative.sqs.kotlin.inputs.GetQueueInlinePolicyPlainArgs].
     * @return null
     */
    public suspend fun getQueueInlinePolicy(argument: suspend GetQueueInlinePolicyPlainArgsBuilder.() -> Unit): GetQueueInlinePolicyResult {
        val builder = GetQueueInlinePolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getQueueInlinePolicyResultToKotlin(getQueueInlinePolicyPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy