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

com.pulumi.alicloud.ga.kotlin.AcceleratorArgs.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: 3.62.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.alicloud.ga.kotlin

import com.pulumi.alicloud.ga.AcceleratorArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides a Global Accelerator (GA) Accelerator resource.
 * For information about Global Accelerator (GA) Accelerator and how to use it, see [What is Accelerator](https://www.alibabacloud.com/help/en/global-accelerator/latest/api-ga-2019-11-20-createaccelerator).
 * > **NOTE:** Available since v1.111.0.
 * ## Example Usage
 * Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as alicloud from "@pulumi/alicloud";
 * const example = new alicloud.ga.Accelerator("example", {
 *     duration: 1,
 *     autoUseCoupon: true,
 *     spec: "1",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_alicloud as alicloud
 * example = alicloud.ga.Accelerator("example",
 *     duration=1,
 *     auto_use_coupon=True,
 *     spec="1")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AliCloud = Pulumi.AliCloud;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new AliCloud.Ga.Accelerator("example", new()
 *     {
 *         Duration = 1,
 *         AutoUseCoupon = true,
 *         Spec = "1",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ga"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ga.NewAccelerator(ctx, "example", &ga.AcceleratorArgs{
 * 			Duration:      pulumi.Int(1),
 * 			AutoUseCoupon: pulumi.Bool(true),
 * 			Spec:          pulumi.String("1"),
 * 		})
 * 		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.alicloud.ga.Accelerator;
 * import com.pulumi.alicloud.ga.AcceleratorArgs;
 * 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 example = new Accelerator("example", AcceleratorArgs.builder()
 *             .duration(1)
 *             .autoUseCoupon(true)
 *             .spec("1")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: alicloud:ga:Accelerator
 *     properties:
 *       duration: 1
 *       autoUseCoupon: true
 *       spec: '1'
 * ```
 * 
 * ## Import
 * Ga Accelerator can be imported using the id, e.g.
 * ```sh
 * $ pulumi import alicloud:ga/accelerator:Accelerator example 
 * ```
 * @property acceleratorName The Name of the GA instance.
 * @property autoRenewDuration Auto renewal period of an instance, in the unit of month. The value range is 1-12.
 * @property autoUseCoupon Use coupons to pay bills automatically. Default value: `false`. Valid values:
 * @property bandwidthBillingType The bandwidth billing method. Default value: `BandwidthPackage`. Valid values:
 * - `BandwidthPackage`: billed based on bandwidth plans.
 * - `CDT`: billed based on data transfer.
 * @property crossBorderMode The type of cross-border acceleration. Default value: `bgpPro`. Valid values: `bgpPro`, `private`. **NOTE:** `cross_border_mode` is valid only when `cross_border_status` is set to `true`.
 * @property crossBorderStatus Indicates whether cross-border acceleration is enabled. Default value: `false`. Valid values:
 * @property description Descriptive information of the global acceleration instance.
 * @property duration The subscription duration.
 * * If the `pricing_cycle` parameter is set to `Month`, the valid values for the `duration` parameter are 1 to 9.
 * * If the `pricing_cycle` parameter is set to `Year`, the valid values for the `duration` parameter are 1 to 3.
 * @property paymentType The payment type. Default value: `Subscription`. Valid values: `PayAsYouGo`, `Subscription`.
 * @property pricingCycle The billing cycle of the GA instance. Default value: `Month`. Valid values:
 * - `Month`: billed on a monthly basis.
 * - `Year`: billed on an annual basis.
 * @property promotionOptionNo The code of the coupon. **NOTE:** The `promotion_option_no` takes effect only for accounts registered on the international site (alibabacloud.com).
 * @property renewalStatus Whether to renew an accelerator automatically or not. Default value: `Normal`. Valid values:
 * - `AutoRenewal`: Enable auto renewal.
 * - `Normal`: Disable auto renewal.
 * - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
 * @property resourceGroupId The ID of the resource group. **Note:** Once you set a value of this property, you cannot set it to an empty string anymore.
 * @property spec The instance type of the GA instance. Specification of global acceleration instance. Valid values:
 * @property tags A mapping of tags to assign to the resource.
 */
public data class AcceleratorArgs(
    public val acceleratorName: Output? = null,
    public val autoRenewDuration: Output? = null,
    public val autoUseCoupon: Output? = null,
    public val bandwidthBillingType: Output? = null,
    public val crossBorderMode: Output? = null,
    public val crossBorderStatus: Output? = null,
    public val description: Output? = null,
    public val duration: Output? = null,
    public val paymentType: Output? = null,
    public val pricingCycle: Output? = null,
    public val promotionOptionNo: Output? = null,
    public val renewalStatus: Output? = null,
    public val resourceGroupId: Output? = null,
    public val spec: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.alicloud.ga.AcceleratorArgs =
        com.pulumi.alicloud.ga.AcceleratorArgs.builder()
            .acceleratorName(acceleratorName?.applyValue({ args0 -> args0 }))
            .autoRenewDuration(autoRenewDuration?.applyValue({ args0 -> args0 }))
            .autoUseCoupon(autoUseCoupon?.applyValue({ args0 -> args0 }))
            .bandwidthBillingType(bandwidthBillingType?.applyValue({ args0 -> args0 }))
            .crossBorderMode(crossBorderMode?.applyValue({ args0 -> args0 }))
            .crossBorderStatus(crossBorderStatus?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .duration(duration?.applyValue({ args0 -> args0 }))
            .paymentType(paymentType?.applyValue({ args0 -> args0 }))
            .pricingCycle(pricingCycle?.applyValue({ args0 -> args0 }))
            .promotionOptionNo(promotionOptionNo?.applyValue({ args0 -> args0 }))
            .renewalStatus(renewalStatus?.applyValue({ args0 -> args0 }))
            .resourceGroupId(resourceGroupId?.applyValue({ args0 -> args0 }))
            .spec(spec?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [AcceleratorArgs].
 */
@PulumiTagMarker
public class AcceleratorArgsBuilder internal constructor() {
    private var acceleratorName: Output? = null

    private var autoRenewDuration: Output? = null

    private var autoUseCoupon: Output? = null

    private var bandwidthBillingType: Output? = null

    private var crossBorderMode: Output? = null

    private var crossBorderStatus: Output? = null

    private var description: Output? = null

    private var duration: Output? = null

    private var paymentType: Output? = null

    private var pricingCycle: Output? = null

    private var promotionOptionNo: Output? = null

    private var renewalStatus: Output? = null

    private var resourceGroupId: Output? = null

    private var spec: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The Name of the GA instance.
     */
    @JvmName("bbrxlviqucxkvudc")
    public suspend fun acceleratorName(`value`: Output) {
        this.acceleratorName = value
    }

    /**
     * @param value Auto renewal period of an instance, in the unit of month. The value range is 1-12.
     */
    @JvmName("fheukphiglvalrvi")
    public suspend fun autoRenewDuration(`value`: Output) {
        this.autoRenewDuration = value
    }

    /**
     * @param value Use coupons to pay bills automatically. Default value: `false`. Valid values:
     */
    @JvmName("jidsqhkypnoeclwa")
    public suspend fun autoUseCoupon(`value`: Output) {
        this.autoUseCoupon = value
    }

    /**
     * @param value The bandwidth billing method. Default value: `BandwidthPackage`. Valid values:
     * - `BandwidthPackage`: billed based on bandwidth plans.
     * - `CDT`: billed based on data transfer.
     */
    @JvmName("mucwerufdfpsrllb")
    public suspend fun bandwidthBillingType(`value`: Output) {
        this.bandwidthBillingType = value
    }

    /**
     * @param value The type of cross-border acceleration. Default value: `bgpPro`. Valid values: `bgpPro`, `private`. **NOTE:** `cross_border_mode` is valid only when `cross_border_status` is set to `true`.
     */
    @JvmName("qsveybfyynngkutu")
    public suspend fun crossBorderMode(`value`: Output) {
        this.crossBorderMode = value
    }

    /**
     * @param value Indicates whether cross-border acceleration is enabled. Default value: `false`. Valid values:
     */
    @JvmName("hptrexvctmkcdain")
    public suspend fun crossBorderStatus(`value`: Output) {
        this.crossBorderStatus = value
    }

    /**
     * @param value Descriptive information of the global acceleration instance.
     */
    @JvmName("sfcfsgmarjxnmlbf")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The subscription duration.
     * * If the `pricing_cycle` parameter is set to `Month`, the valid values for the `duration` parameter are 1 to 9.
     * * If the `pricing_cycle` parameter is set to `Year`, the valid values for the `duration` parameter are 1 to 3.
     */
    @JvmName("iwvhdfxedpemmenw")
    public suspend fun duration(`value`: Output) {
        this.duration = value
    }

    /**
     * @param value The payment type. Default value: `Subscription`. Valid values: `PayAsYouGo`, `Subscription`.
     */
    @JvmName("bvxucyiknuldlksr")
    public suspend fun paymentType(`value`: Output) {
        this.paymentType = value
    }

    /**
     * @param value The billing cycle of the GA instance. Default value: `Month`. Valid values:
     * - `Month`: billed on a monthly basis.
     * - `Year`: billed on an annual basis.
     */
    @JvmName("mhnqcegmbajegvum")
    public suspend fun pricingCycle(`value`: Output) {
        this.pricingCycle = value
    }

    /**
     * @param value The code of the coupon. **NOTE:** The `promotion_option_no` takes effect only for accounts registered on the international site (alibabacloud.com).
     */
    @JvmName("ejlocjntnsrwnvqm")
    public suspend fun promotionOptionNo(`value`: Output) {
        this.promotionOptionNo = value
    }

    /**
     * @param value Whether to renew an accelerator automatically or not. Default value: `Normal`. Valid values:
     * - `AutoRenewal`: Enable auto renewal.
     * - `Normal`: Disable auto renewal.
     * - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
     */
    @JvmName("chgmcmaxqpqemafp")
    public suspend fun renewalStatus(`value`: Output) {
        this.renewalStatus = value
    }

    /**
     * @param value The ID of the resource group. **Note:** Once you set a value of this property, you cannot set it to an empty string anymore.
     */
    @JvmName("rdkiicayrdyywsxb")
    public suspend fun resourceGroupId(`value`: Output) {
        this.resourceGroupId = value
    }

    /**
     * @param value The instance type of the GA instance. Specification of global acceleration instance. Valid values:
     */
    @JvmName("xkwhnalxjpqoaxjr")
    public suspend fun spec(`value`: Output) {
        this.spec = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("oorhvkyvnsvantri")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The Name of the GA instance.
     */
    @JvmName("sdhddawaarphfyeq")
    public suspend fun acceleratorName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.acceleratorName = mapped
    }

    /**
     * @param value Auto renewal period of an instance, in the unit of month. The value range is 1-12.
     */
    @JvmName("gdkykefqyymxvjff")
    public suspend fun autoRenewDuration(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoRenewDuration = mapped
    }

    /**
     * @param value Use coupons to pay bills automatically. Default value: `false`. Valid values:
     */
    @JvmName("hgttaqaleesughax")
    public suspend fun autoUseCoupon(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoUseCoupon = mapped
    }

    /**
     * @param value The bandwidth billing method. Default value: `BandwidthPackage`. Valid values:
     * - `BandwidthPackage`: billed based on bandwidth plans.
     * - `CDT`: billed based on data transfer.
     */
    @JvmName("fekiarahxralajcl")
    public suspend fun bandwidthBillingType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bandwidthBillingType = mapped
    }

    /**
     * @param value The type of cross-border acceleration. Default value: `bgpPro`. Valid values: `bgpPro`, `private`. **NOTE:** `cross_border_mode` is valid only when `cross_border_status` is set to `true`.
     */
    @JvmName("kytgdwknccgchufc")
    public suspend fun crossBorderMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.crossBorderMode = mapped
    }

    /**
     * @param value Indicates whether cross-border acceleration is enabled. Default value: `false`. Valid values:
     */
    @JvmName("rxmnyxwvbbrsvrrm")
    public suspend fun crossBorderStatus(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.crossBorderStatus = mapped
    }

    /**
     * @param value Descriptive information of the global acceleration instance.
     */
    @JvmName("rrmswemqlypsqfea")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The subscription duration.
     * * If the `pricing_cycle` parameter is set to `Month`, the valid values for the `duration` parameter are 1 to 9.
     * * If the `pricing_cycle` parameter is set to `Year`, the valid values for the `duration` parameter are 1 to 3.
     */
    @JvmName("bqoslfyhiatylyth")
    public suspend fun duration(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.duration = mapped
    }

    /**
     * @param value The payment type. Default value: `Subscription`. Valid values: `PayAsYouGo`, `Subscription`.
     */
    @JvmName("ekgfmhepxrbdnhht")
    public suspend fun paymentType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.paymentType = mapped
    }

    /**
     * @param value The billing cycle of the GA instance. Default value: `Month`. Valid values:
     * - `Month`: billed on a monthly basis.
     * - `Year`: billed on an annual basis.
     */
    @JvmName("pvbvhxgidnalrbbq")
    public suspend fun pricingCycle(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pricingCycle = mapped
    }

    /**
     * @param value The code of the coupon. **NOTE:** The `promotion_option_no` takes effect only for accounts registered on the international site (alibabacloud.com).
     */
    @JvmName("qkuilopfdlaslmgl")
    public suspend fun promotionOptionNo(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.promotionOptionNo = mapped
    }

    /**
     * @param value Whether to renew an accelerator automatically or not. Default value: `Normal`. Valid values:
     * - `AutoRenewal`: Enable auto renewal.
     * - `Normal`: Disable auto renewal.
     * - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
     */
    @JvmName("xfpotqtefesfpelh")
    public suspend fun renewalStatus(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.renewalStatus = mapped
    }

    /**
     * @param value The ID of the resource group. **Note:** Once you set a value of this property, you cannot set it to an empty string anymore.
     */
    @JvmName("nvnbrqmlgortfoef")
    public suspend fun resourceGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupId = mapped
    }

    /**
     * @param value The instance type of the GA instance. Specification of global acceleration instance. Valid values:
     */
    @JvmName("inhwystmxfpeohqt")
    public suspend fun spec(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.spec = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("letlkwxrguiflrcu")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("vtxrfeoijdggdyfe")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AcceleratorArgs = AcceleratorArgs(
        acceleratorName = acceleratorName,
        autoRenewDuration = autoRenewDuration,
        autoUseCoupon = autoUseCoupon,
        bandwidthBillingType = bandwidthBillingType,
        crossBorderMode = crossBorderMode,
        crossBorderStatus = crossBorderStatus,
        description = description,
        duration = duration,
        paymentType = paymentType,
        pricingCycle = pricingCycle,
        promotionOptionNo = promotionOptionNo,
        renewalStatus = renewalStatus,
        resourceGroupId = resourceGroupId,
        spec = spec,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy