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

com.pulumi.azurenative.cdn.kotlin.ProfileArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.cdn.kotlin

import com.pulumi.azurenative.cdn.ProfileArgs.builder
import com.pulumi.azurenative.cdn.kotlin.inputs.ManagedServiceIdentityArgs
import com.pulumi.azurenative.cdn.kotlin.inputs.ManagedServiceIdentityArgsBuilder
import com.pulumi.azurenative.cdn.kotlin.inputs.SkuArgs
import com.pulumi.azurenative.cdn.kotlin.inputs.SkuArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A profile is a logical grouping of endpoints that share the same settings.
 * Azure REST API version: 2023-05-01. Prior API version in Azure Native 1.x: 2020-09-01.
 * Other available API versions: 2016-04-02, 2020-09-01, 2023-07-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview.
 * ## Example Usage
 * ### Profiles_Create
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var profile = new AzureNative.Cdn.Profile("profile", new()
 *     {
 *         Location = "global",
 *         ProfileName = "profile1",
 *         ResourceGroupName = "RG",
 *         Sku = new AzureNative.Cdn.Inputs.SkuArgs
 *         {
 *             Name = AzureNative.Cdn.SkuName.Premium_AzureFrontDoor,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	cdn "github.com/pulumi/pulumi-azure-native-sdk/cdn/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cdn.NewProfile(ctx, "profile", &cdn.ProfileArgs{
 * 			Location:          pulumi.String("global"),
 * 			ProfileName:       pulumi.String("profile1"),
 * 			ResourceGroupName: pulumi.String("RG"),
 * 			Sku: &cdn.SkuArgs{
 * 				Name: pulumi.String(cdn.SkuName_Premium_AzureFrontDoor),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.cdn.Profile;
 * import com.pulumi.azurenative.cdn.ProfileArgs;
 * import com.pulumi.azurenative.cdn.inputs.SkuArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var profile = new Profile("profile", ProfileArgs.builder()
 *             .location("global")
 *             .profileName("profile1")
 *             .resourceGroupName("RG")
 *             .sku(SkuArgs.builder()
 *                 .name("Premium_AzureFrontDoor")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:cdn:Profile profile1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}
 * ```
 * @property identity Managed service identity (system assigned and/or user assigned identities).
 * @property location Resource location.
 * @property originResponseTimeoutSeconds Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.
 * @property profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
 * @property resourceGroupName Name of the Resource group within the Azure subscription.
 * @property sku The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile.
 * @property tags Resource tags.
 */
public data class ProfileArgs(
    public val identity: Output? = null,
    public val location: Output? = null,
    public val originResponseTimeoutSeconds: Output? = null,
    public val profileName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cdn.ProfileArgs =
        com.pulumi.azurenative.cdn.ProfileArgs.builder()
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .originResponseTimeoutSeconds(originResponseTimeoutSeconds?.applyValue({ args0 -> args0 }))
            .profileName(profileName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ProfileArgs].
 */
@PulumiTagMarker
public class ProfileArgsBuilder internal constructor() {
    private var identity: Output? = null

    private var location: Output? = null

    private var originResponseTimeoutSeconds: Output? = null

    private var profileName: Output? = null

    private var resourceGroupName: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Managed service identity (system assigned and/or user assigned identities).
     */
    @JvmName("ojcxpxqdpqeiqbgj")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value Resource location.
     */
    @JvmName("cmhfbesmscfbvmlt")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.
     */
    @JvmName("degynvookojbcokb")
    public suspend fun originResponseTimeoutSeconds(`value`: Output) {
        this.originResponseTimeoutSeconds = value
    }

    /**
     * @param value Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
     */
    @JvmName("liacmabktmxjftla")
    public suspend fun profileName(`value`: Output) {
        this.profileName = value
    }

    /**
     * @param value Name of the Resource group within the Azure subscription.
     */
    @JvmName("lehscdiptljsjplk")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile.
     */
    @JvmName("ulbiiekabyaugthq")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("htdheeekmviiomyc")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Managed service identity (system assigned and/or user assigned identities).
     */
    @JvmName("lsteyyrumjgtjhdv")
    public suspend fun identity(`value`: ManagedServiceIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument Managed service identity (system assigned and/or user assigned identities).
     */
    @JvmName("soexjmnashxloxpq")
    public suspend fun identity(argument: suspend ManagedServiceIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = ManagedServiceIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value Resource location.
     */
    @JvmName("nicmbuxvwwanceil")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.
     */
    @JvmName("rjdwlekafsxxreqd")
    public suspend fun originResponseTimeoutSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.originResponseTimeoutSeconds = mapped
    }

    /**
     * @param value Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
     */
    @JvmName("jnlgyhhttiadejxi")
    public suspend fun profileName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.profileName = mapped
    }

    /**
     * @param value Name of the Resource group within the Azure subscription.
     */
    @JvmName("taqkvovjjbqjwvde")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile.
     */
    @JvmName("qxynqubcurpituau")
    public suspend fun sku(`value`: SkuArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param argument The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile.
     */
    @JvmName("rhegskylkibgmjad")
    public suspend fun sku(argument: suspend SkuArgsBuilder.() -> Unit) {
        val toBeMapped = SkuArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sku = mapped
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("pnevtqhspwvvaico")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("tsegytgryjabyuby")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ProfileArgs = ProfileArgs(
        identity = identity,
        location = location,
        originResponseTimeoutSeconds = originResponseTimeoutSeconds,
        profileName = profileName,
        resourceGroupName = resourceGroupName,
        sku = sku,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy