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

com.pulumi.azure.storage.kotlin.inputs.GetAccountSASPlainArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.storage.kotlin.inputs

import com.pulumi.azure.storage.inputs.GetAccountSASPlainArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * A collection of arguments for invoking getAccountSAS.
 * @property connectionString The connection string for the storage account to which this SAS applies. Typically directly from the `primary_connection_string` attribute of a `azure.storage.Account` resource.
 * @property expiry The expiration time and date of this SAS. Must be a valid ISO-8601 format time/date string.
 * > **NOTE:** The [ISO-8601 Time offset from UTC](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) is currently not supported by the service, which will result into 409 error.
 * @property httpsOnly Only permit `https` access. If `false`, both `http` and `https` are permitted. Defaults to `true`.
 * @property ipAddresses IP address, or a range of IP addresses, from which to accept requests. When specifying a range, note that the range is inclusive.
 * @property permissions A `permissions` block as defined below.
 * @property resourceTypes A `resource_types` block as defined below.
 * @property services A `services` block as defined below.
 * @property signedVersion Specifies the signed storage service version to use to authorize requests made with this account SAS. Defaults to `2017-07-29`.
 * @property start The starting time and date of validity of this SAS. Must be a valid ISO-8601 format time/date string.
 */
public data class GetAccountSASPlainArgs(
    public val connectionString: String,
    public val expiry: String,
    public val httpsOnly: Boolean? = null,
    public val ipAddresses: String? = null,
    public val permissions: GetAccountSASPermissions,
    public val resourceTypes: GetAccountSASResourceTypes,
    public val services: GetAccountSASServices,
    public val signedVersion: String? = null,
    public val start: String,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.storage.inputs.GetAccountSASPlainArgs =
        com.pulumi.azure.storage.inputs.GetAccountSASPlainArgs.builder()
            .connectionString(connectionString.let({ args0 -> args0 }))
            .expiry(expiry.let({ args0 -> args0 }))
            .httpsOnly(httpsOnly?.let({ args0 -> args0 }))
            .ipAddresses(ipAddresses?.let({ args0 -> args0 }))
            .permissions(permissions.let({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceTypes(resourceTypes.let({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .services(services.let({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .signedVersion(signedVersion?.let({ args0 -> args0 }))
            .start(start.let({ args0 -> args0 })).build()
}

/**
 * Builder for [GetAccountSASPlainArgs].
 */
@PulumiTagMarker
public class GetAccountSASPlainArgsBuilder internal constructor() {
    private var connectionString: String? = null

    private var expiry: String? = null

    private var httpsOnly: Boolean? = null

    private var ipAddresses: String? = null

    private var permissions: GetAccountSASPermissions? = null

    private var resourceTypes: GetAccountSASResourceTypes? = null

    private var services: GetAccountSASServices? = null

    private var signedVersion: String? = null

    private var start: String? = null

    /**
     * @param value The connection string for the storage account to which this SAS applies. Typically directly from the `primary_connection_string` attribute of a `azure.storage.Account` resource.
     */
    @JvmName("igiogumdwaqfcwyb")
    public suspend fun connectionString(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.connectionString = mapped
    }

    /**
     * @param value The expiration time and date of this SAS. Must be a valid ISO-8601 format time/date string.
     * > **NOTE:** The [ISO-8601 Time offset from UTC](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) is currently not supported by the service, which will result into 409 error.
     */
    @JvmName("rlokjiunyrlalubh")
    public suspend fun expiry(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.expiry = mapped
    }

    /**
     * @param value Only permit `https` access. If `false`, both `http` and `https` are permitted. Defaults to `true`.
     */
    @JvmName("qvrjmfgkfdajliyx")
    public suspend fun httpsOnly(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.httpsOnly = mapped
    }

    /**
     * @param value IP address, or a range of IP addresses, from which to accept requests. When specifying a range, note that the range is inclusive.
     */
    @JvmName("djgojcxwrmgyesjx")
    public suspend fun ipAddresses(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.ipAddresses = mapped
    }

    /**
     * @param value A `permissions` block as defined below.
     */
    @JvmName("earsqfkcinccnnlf")
    public suspend fun permissions(`value`: GetAccountSASPermissions) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.permissions = mapped
    }

    /**
     * @param argument A `permissions` block as defined below.
     */
    @JvmName("hautydgolrcgeyhh")
    public suspend fun permissions(argument: suspend GetAccountSASPermissionsBuilder.() -> Unit) {
        val toBeMapped = GetAccountSASPermissionsBuilder().applySuspend { argument() }.build()
        val mapped = toBeMapped
        this.permissions = mapped
    }

    /**
     * @param value A `resource_types` block as defined below.
     */
    @JvmName("cxobarvumhumouck")
    public suspend fun resourceTypes(`value`: GetAccountSASResourceTypes) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.resourceTypes = mapped
    }

    /**
     * @param argument A `resource_types` block as defined below.
     */
    @JvmName("vmysqvnohbxldcut")
    public suspend fun resourceTypes(argument: suspend GetAccountSASResourceTypesBuilder.() -> Unit) {
        val toBeMapped = GetAccountSASResourceTypesBuilder().applySuspend { argument() }.build()
        val mapped = toBeMapped
        this.resourceTypes = mapped
    }

    /**
     * @param value A `services` block as defined below.
     */
    @JvmName("ujvoawpopxecmuos")
    public suspend fun services(`value`: GetAccountSASServices) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.services = mapped
    }

    /**
     * @param argument A `services` block as defined below.
     */
    @JvmName("todklolrakgpwjle")
    public suspend fun services(argument: suspend GetAccountSASServicesBuilder.() -> Unit) {
        val toBeMapped = GetAccountSASServicesBuilder().applySuspend { argument() }.build()
        val mapped = toBeMapped
        this.services = mapped
    }

    /**
     * @param value Specifies the signed storage service version to use to authorize requests made with this account SAS. Defaults to `2017-07-29`.
     */
    @JvmName("ymgnqulddqrsfssq")
    public suspend fun signedVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.signedVersion = mapped
    }

    /**
     * @param value The starting time and date of validity of this SAS. Must be a valid ISO-8601 format time/date string.
     */
    @JvmName("ebhibnhlwdvxyifl")
    public suspend fun start(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.start = mapped
    }

    internal fun build(): GetAccountSASPlainArgs = GetAccountSASPlainArgs(
        connectionString = connectionString ?: throw PulumiNullFieldException("connectionString"),
        expiry = expiry ?: throw PulumiNullFieldException("expiry"),
        httpsOnly = httpsOnly,
        ipAddresses = ipAddresses,
        permissions = permissions ?: throw PulumiNullFieldException("permissions"),
        resourceTypes = resourceTypes ?: throw PulumiNullFieldException("resourceTypes"),
        services = services ?: throw PulumiNullFieldException("services"),
        signedVersion = signedVersion,
        start = start ?: throw PulumiNullFieldException("start"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy