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

com.pulumi.aws.apprunner.kotlin.AutoScalingConfigurationVersionArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.apprunner.kotlin

import com.pulumi.aws.apprunner.AutoScalingConfigurationVersionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an App Runner AutoScaling Configuration Version.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.apprunner.AutoScalingConfigurationVersion("example", {
 *     autoScalingConfigurationName: "example",
 *     maxConcurrency: 50,
 *     maxSize: 10,
 *     minSize: 2,
 *     tags: {
 *         Name: "example-apprunner-autoscaling",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.apprunner.AutoScalingConfigurationVersion("example",
 *     auto_scaling_configuration_name="example",
 *     max_concurrency=50,
 *     max_size=10,
 *     min_size=2,
 *     tags={
 *         "Name": "example-apprunner-autoscaling",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.AppRunner.AutoScalingConfigurationVersion("example", new()
 *     {
 *         AutoScalingConfigurationName = "example",
 *         MaxConcurrency = 50,
 *         MaxSize = 10,
 *         MinSize = 2,
 *         Tags =
 *         {
 *             { "Name", "example-apprunner-autoscaling" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apprunner"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := apprunner.NewAutoScalingConfigurationVersion(ctx, "example", &apprunner.AutoScalingConfigurationVersionArgs{
 * 			AutoScalingConfigurationName: pulumi.String("example"),
 * 			MaxConcurrency:               pulumi.Int(50),
 * 			MaxSize:                      pulumi.Int(10),
 * 			MinSize:                      pulumi.Int(2),
 * 			Tags: pulumi.StringMap{
 * 				"Name": pulumi.String("example-apprunner-autoscaling"),
 * 			},
 * 		})
 * 		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.aws.apprunner.AutoScalingConfigurationVersion;
 * import com.pulumi.aws.apprunner.AutoScalingConfigurationVersionArgs;
 * 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 AutoScalingConfigurationVersion("example", AutoScalingConfigurationVersionArgs.builder()
 *             .autoScalingConfigurationName("example")
 *             .maxConcurrency(50)
 *             .maxSize(10)
 *             .minSize(2)
 *             .tags(Map.of("Name", "example-apprunner-autoscaling"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:apprunner:AutoScalingConfigurationVersion
 *     properties:
 *       autoScalingConfigurationName: example
 *       maxConcurrency: 50
 *       maxSize: 10
 *       minSize: 2
 *       tags:
 *         Name: example-apprunner-autoscaling
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import App Runner AutoScaling Configuration Versions using the `arn`. For example:
 * ```sh
 * $ pulumi import aws:apprunner/autoScalingConfigurationVersion:AutoScalingConfigurationVersion example "arn:aws:apprunner:us-east-1:1234567890:autoscalingconfiguration/example/1/69bdfe0115224b0db49398b7beb68e0f
 * ```
 * @property autoScalingConfigurationName Name of the auto scaling configuration.
 * @property maxConcurrency Maximal number of concurrent requests that you want an instance to process. When the number of concurrent requests goes over this limit, App Runner scales up your service.
 * @property maxSize Maximal number of instances that App Runner provisions for your service.
 * @property minSize Minimal number of instances that App Runner provisions for your service.
 * @property tags Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 */
public data class AutoScalingConfigurationVersionArgs(
    public val autoScalingConfigurationName: Output? = null,
    public val maxConcurrency: Output? = null,
    public val maxSize: Output? = null,
    public val minSize: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.apprunner.AutoScalingConfigurationVersionArgs =
        com.pulumi.aws.apprunner.AutoScalingConfigurationVersionArgs.builder()
            .autoScalingConfigurationName(autoScalingConfigurationName?.applyValue({ args0 -> args0 }))
            .maxConcurrency(maxConcurrency?.applyValue({ args0 -> args0 }))
            .maxSize(maxSize?.applyValue({ args0 -> args0 }))
            .minSize(minSize?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [AutoScalingConfigurationVersionArgs].
 */
@PulumiTagMarker
public class AutoScalingConfigurationVersionArgsBuilder internal constructor() {
    private var autoScalingConfigurationName: Output? = null

    private var maxConcurrency: Output? = null

    private var maxSize: Output? = null

    private var minSize: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Name of the auto scaling configuration.
     */
    @JvmName("gaudkkeeeodvlamv")
    public suspend fun autoScalingConfigurationName(`value`: Output) {
        this.autoScalingConfigurationName = value
    }

    /**
     * @param value Maximal number of concurrent requests that you want an instance to process. When the number of concurrent requests goes over this limit, App Runner scales up your service.
     */
    @JvmName("yrlwxmhsmyijsmnf")
    public suspend fun maxConcurrency(`value`: Output) {
        this.maxConcurrency = value
    }

    /**
     * @param value Maximal number of instances that App Runner provisions for your service.
     */
    @JvmName("qkkcxvktlayqoxfq")
    public suspend fun maxSize(`value`: Output) {
        this.maxSize = value
    }

    /**
     * @param value Minimal number of instances that App Runner provisions for your service.
     */
    @JvmName("efplvhlykvuaqbdw")
    public suspend fun minSize(`value`: Output) {
        this.minSize = value
    }

    /**
     * @param value Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("lkxktrykxsnnliji")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Name of the auto scaling configuration.
     */
    @JvmName("jkbqaeepnjwxtxtk")
    public suspend fun autoScalingConfigurationName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoScalingConfigurationName = mapped
    }

    /**
     * @param value Maximal number of concurrent requests that you want an instance to process. When the number of concurrent requests goes over this limit, App Runner scales up your service.
     */
    @JvmName("qrdoomudyojstmil")
    public suspend fun maxConcurrency(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxConcurrency = mapped
    }

    /**
     * @param value Maximal number of instances that App Runner provisions for your service.
     */
    @JvmName("vytkaoyveddaomrc")
    public suspend fun maxSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxSize = mapped
    }

    /**
     * @param value Minimal number of instances that App Runner provisions for your service.
     */
    @JvmName("hrucfocrlnhknqdc")
    public suspend fun minSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minSize = mapped
    }

    /**
     * @param value Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("nroarrrtgxhtbork")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("fblchjrnivvcqgha")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AutoScalingConfigurationVersionArgs = AutoScalingConfigurationVersionArgs(
        autoScalingConfigurationName = autoScalingConfigurationName,
        maxConcurrency = maxConcurrency,
        maxSize = maxSize,
        minSize = minSize,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy