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

com.pulumi.aws.licensemanager.kotlin.LicenseConfigurationArgs.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.licensemanager.kotlin

import com.pulumi.aws.licensemanager.LicenseConfigurationArgs.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.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides a License Manager license configuration resource.
 * > **Note:** Removing the `license_count` attribute is not supported by the License Manager API.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.licensemanager.LicenseConfiguration("example", {
 *     name: "Example",
 *     description: "Example",
 *     licenseCount: 10,
 *     licenseCountHardLimit: true,
 *     licenseCountingType: "Socket",
 *     licenseRules: ["#minimumSockets=2"],
 *     tags: {
 *         foo: "barr",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.licensemanager.LicenseConfiguration("example",
 *     name="Example",
 *     description="Example",
 *     license_count=10,
 *     license_count_hard_limit=True,
 *     license_counting_type="Socket",
 *     license_rules=["#minimumSockets=2"],
 *     tags={
 *         "foo": "barr",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.LicenseManager.LicenseConfiguration("example", new()
 *     {
 *         Name = "Example",
 *         Description = "Example",
 *         LicenseCount = 10,
 *         LicenseCountHardLimit = true,
 *         LicenseCountingType = "Socket",
 *         LicenseRules = new[]
 *         {
 *             "#minimumSockets=2",
 *         },
 *         Tags =
 *         {
 *             { "foo", "barr" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/licensemanager"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := licensemanager.NewLicenseConfiguration(ctx, "example", &licensemanager.LicenseConfigurationArgs{
 * 			Name:                  pulumi.String("Example"),
 * 			Description:           pulumi.String("Example"),
 * 			LicenseCount:          pulumi.Int(10),
 * 			LicenseCountHardLimit: pulumi.Bool(true),
 * 			LicenseCountingType:   pulumi.String("Socket"),
 * 			LicenseRules: pulumi.StringArray{
 * 				pulumi.String("#minimumSockets=2"),
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"foo": pulumi.String("barr"),
 * 			},
 * 		})
 * 		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.licensemanager.LicenseConfiguration;
 * import com.pulumi.aws.licensemanager.LicenseConfigurationArgs;
 * 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 LicenseConfiguration("example", LicenseConfigurationArgs.builder()
 *             .name("Example")
 *             .description("Example")
 *             .licenseCount(10)
 *             .licenseCountHardLimit(true)
 *             .licenseCountingType("Socket")
 *             .licenseRules("#minimumSockets=2")
 *             .tags(Map.of("foo", "barr"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:licensemanager:LicenseConfiguration
 *     properties:
 *       name: Example
 *       description: Example
 *       licenseCount: 10
 *       licenseCountHardLimit: true
 *       licenseCountingType: Socket
 *       licenseRules:
 *         - '#minimumSockets=2'
 *       tags:
 *         foo: barr
 * ```
 * 
 * ## Rules
 * License rules should be in the format of `#RuleType=RuleValue`. Supported rule types:
 * * `minimumVcpus` - Resource must have minimum vCPU count in order to use the license. Default: 1
 * * `maximumVcpus` - Resource must have maximum vCPU count in order to use the license. Default: unbounded, limit: 10000
 * * `minimumCores` - Resource must have minimum core count in order to use the license. Default: 1
 * * `maximumCores` - Resource must have maximum core count in order to use the license. Default: unbounded, limit: 10000
 * * `minimumSockets` - Resource must have minimum socket count in order to use the license. Default: 1
 * * `maximumSockets` - Resource must have maximum socket count in order to use the license. Default: unbounded, limit: 10000
 * * `allowedTenancy` - Defines where the license can be used. If set, restricts license usage to selected tenancies. Specify a comma delimited list of `EC2-Default`, `EC2-DedicatedHost`, `EC2-DedicatedInstance`
 * ## Import
 * Using `pulumi import`, import license configurations using the `id`. For example:
 * ```sh
 * $ pulumi import aws:licensemanager/licenseConfiguration:LicenseConfiguration example arn:aws:license-manager:eu-west-1:123456789012:license-configuration:lic-0123456789abcdef0123456789abcdef
 * ```
 * @property description Description of the license configuration.
 * @property licenseCount Number of licenses managed by the license configuration.
 * @property licenseCountHardLimit Sets the number of available licenses as a hard limit.
 * @property licenseCountingType Dimension to use to track license inventory. Specify either `vCPU`, `Instance`, `Core` or `Socket`.
 * @property licenseRules Array of configured License Manager rules.
 * @property name Name of the license configuration.
 * @property tags A map of tags to assign to the resource. 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 LicenseConfigurationArgs(
    public val description: Output? = null,
    public val licenseCount: Output? = null,
    public val licenseCountHardLimit: Output? = null,
    public val licenseCountingType: Output? = null,
    public val licenseRules: Output>? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.licensemanager.LicenseConfigurationArgs =
        com.pulumi.aws.licensemanager.LicenseConfigurationArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .licenseCount(licenseCount?.applyValue({ args0 -> args0 }))
            .licenseCountHardLimit(licenseCountHardLimit?.applyValue({ args0 -> args0 }))
            .licenseCountingType(licenseCountingType?.applyValue({ args0 -> args0 }))
            .licenseRules(licenseRules?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [LicenseConfigurationArgs].
 */
@PulumiTagMarker
public class LicenseConfigurationArgsBuilder internal constructor() {
    private var description: Output? = null

    private var licenseCount: Output? = null

    private var licenseCountHardLimit: Output? = null

    private var licenseCountingType: Output? = null

    private var licenseRules: Output>? = null

    private var name: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Description of the license configuration.
     */
    @JvmName("vopywotbhuafhvku")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Number of licenses managed by the license configuration.
     */
    @JvmName("fgifoxmbijvkdjhn")
    public suspend fun licenseCount(`value`: Output) {
        this.licenseCount = value
    }

    /**
     * @param value Sets the number of available licenses as a hard limit.
     */
    @JvmName("ccripyqoyteunoib")
    public suspend fun licenseCountHardLimit(`value`: Output) {
        this.licenseCountHardLimit = value
    }

    /**
     * @param value Dimension to use to track license inventory. Specify either `vCPU`, `Instance`, `Core` or `Socket`.
     */
    @JvmName("hnxkbmoxlfuxmvnj")
    public suspend fun licenseCountingType(`value`: Output) {
        this.licenseCountingType = value
    }

    /**
     * @param value Array of configured License Manager rules.
     */
    @JvmName("qvgrnjfxsnajvciq")
    public suspend fun licenseRules(`value`: Output>) {
        this.licenseRules = value
    }

    @JvmName("tfckkkbfpurowbep")
    public suspend fun licenseRules(vararg values: Output) {
        this.licenseRules = Output.all(values.asList())
    }

    /**
     * @param values Array of configured License Manager rules.
     */
    @JvmName("yoikolicrwpfngkp")
    public suspend fun licenseRules(values: List>) {
        this.licenseRules = Output.all(values)
    }

    /**
     * @param value Name of the license configuration.
     */
    @JvmName("dpkxjsnkkugaiedk")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

    /**
     * @param value Description of the license configuration.
     */
    @JvmName("hhjkcgrwodrmtnlo")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Number of licenses managed by the license configuration.
     */
    @JvmName("yasjfeyrbcfvokeb")
    public suspend fun licenseCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.licenseCount = mapped
    }

    /**
     * @param value Sets the number of available licenses as a hard limit.
     */
    @JvmName("lbfcmkdulvtemuml")
    public suspend fun licenseCountHardLimit(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.licenseCountHardLimit = mapped
    }

    /**
     * @param value Dimension to use to track license inventory. Specify either `vCPU`, `Instance`, `Core` or `Socket`.
     */
    @JvmName("cfsdlbspajqojqbk")
    public suspend fun licenseCountingType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.licenseCountingType = mapped
    }

    /**
     * @param value Array of configured License Manager rules.
     */
    @JvmName("legfbhaxpwbakfuy")
    public suspend fun licenseRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.licenseRules = mapped
    }

    /**
     * @param values Array of configured License Manager rules.
     */
    @JvmName("pbkkgjaqhhdlpshw")
    public suspend fun licenseRules(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.licenseRules = mapped
    }

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

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

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

    internal fun build(): LicenseConfigurationArgs = LicenseConfigurationArgs(
        description = description,
        licenseCount = licenseCount,
        licenseCountHardLimit = licenseCountHardLimit,
        licenseCountingType = licenseCountingType,
        licenseRules = licenseRules,
        name = name,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy