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

com.pulumi.azurenative.subscription.kotlin.SubscriptionFunctions.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.subscription.kotlin

import com.pulumi.azurenative.subscription.SubscriptionFunctions.getAliasPlain
import com.pulumi.azurenative.subscription.SubscriptionFunctions.getSubscriptionTarDirectoryPlain
import com.pulumi.azurenative.subscription.kotlin.inputs.GetAliasPlainArgs
import com.pulumi.azurenative.subscription.kotlin.inputs.GetAliasPlainArgsBuilder
import com.pulumi.azurenative.subscription.kotlin.inputs.GetSubscriptionTarDirectoryPlainArgs
import com.pulumi.azurenative.subscription.kotlin.inputs.GetSubscriptionTarDirectoryPlainArgsBuilder
import com.pulumi.azurenative.subscription.kotlin.outputs.GetAliasResult
import com.pulumi.azurenative.subscription.kotlin.outputs.GetSubscriptionTarDirectoryResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azurenative.subscription.kotlin.outputs.GetAliasResult.Companion.toKotlin as getAliasResultToKotlin
import com.pulumi.azurenative.subscription.kotlin.outputs.GetSubscriptionTarDirectoryResult.Companion.toKotlin as getSubscriptionTarDirectoryResultToKotlin

public object SubscriptionFunctions {
    /**
     * Get Alias Subscription.
     * Azure REST API version: 2021-10-01.
     * Other available API versions: 2020-09-01, 2024-08-01-preview.
     * @param argument null
     * @return Subscription Information with the alias.
     */
    public suspend fun getAlias(argument: GetAliasPlainArgs): GetAliasResult =
        getAliasResultToKotlin(getAliasPlain(argument.toJava()).await())

    /**
     * @see [getAlias].
     * @param aliasName AliasName is the name for the subscription creation request. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation.
     * @return Subscription Information with the alias.
     */
    public suspend fun getAlias(aliasName: String): GetAliasResult {
        val argument = GetAliasPlainArgs(
            aliasName = aliasName,
        )
        return getAliasResultToKotlin(getAliasPlain(argument.toJava()).await())
    }

    /**
     * @see [getAlias].
     * @param argument Builder for [com.pulumi.azurenative.subscription.kotlin.inputs.GetAliasPlainArgs].
     * @return Subscription Information with the alias.
     */
    public suspend fun getAlias(argument: suspend GetAliasPlainArgsBuilder.() -> Unit): GetAliasResult {
        val builder = GetAliasPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getAliasResultToKotlin(getAliasPlain(builtArgument.toJava()).await())
    }

    /**
     * The operation to view Initiator Subscription Changed Request
     * Azure REST API version: 2024-08-01-preview.
     * @param argument null
     * @return Subscription Response for Changed Target Directory.
     */
    public suspend fun getSubscriptionTarDirectory(argument: GetSubscriptionTarDirectoryPlainArgs): GetSubscriptionTarDirectoryResult =
        getSubscriptionTarDirectoryResultToKotlin(getSubscriptionTarDirectoryPlain(argument.toJava()).await())

    /**
     * @see [getSubscriptionTarDirectory].
     * @param subscriptionId Subscription Id.
     * @return Subscription Response for Changed Target Directory.
     */
    public suspend fun getSubscriptionTarDirectory(subscriptionId: String? = null): GetSubscriptionTarDirectoryResult {
        val argument = GetSubscriptionTarDirectoryPlainArgs(
            subscriptionId = subscriptionId,
        )
        return getSubscriptionTarDirectoryResultToKotlin(getSubscriptionTarDirectoryPlain(argument.toJava()).await())
    }

    /**
     * @see [getSubscriptionTarDirectory].
     * @param argument Builder for [com.pulumi.azurenative.subscription.kotlin.inputs.GetSubscriptionTarDirectoryPlainArgs].
     * @return Subscription Response for Changed Target Directory.
     */
    public suspend fun getSubscriptionTarDirectory(argument: suspend GetSubscriptionTarDirectoryPlainArgsBuilder.() -> Unit): GetSubscriptionTarDirectoryResult {
        val builder = GetSubscriptionTarDirectoryPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getSubscriptionTarDirectoryResultToKotlin(getSubscriptionTarDirectoryPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy