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

com.pulumi.azurenative.costmanagement.kotlin.ConnectorArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.costmanagement.kotlin

import com.pulumi.azurenative.costmanagement.ConnectorArgs.builder
import com.pulumi.azurenative.costmanagement.kotlin.enums.ConnectorStatus
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The Connector model definition
 * Azure REST API version: 2018-08-01-preview.
 * ## Example Usage
 * ### Connector_Put
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var connector = new AzureNative.CostManagement.Connector("connector", new()
 *     {
 *         ConnectorName = "AWSBillingAccount",
 *         CredentialsKey = "arn:aws:iam::123456789012:role/AzureCostManagementRole",
 *         CredentialsSecret = "external-id",
 *         DisplayName = "AWS-Consolidated-1",
 *         Location = "westus",
 *         ReportId = "HourlyWithResources",
 *         ResourceGroupName = "rg1",
 *         Status = AzureNative.CostManagement.ConnectorStatus.Active,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := costmanagement.NewConnector(ctx, "connector", &costmanagement.ConnectorArgs{
 * 			ConnectorName:     pulumi.String("AWSBillingAccount"),
 * 			CredentialsKey:    pulumi.String("arn:aws:iam::123456789012:role/AzureCostManagementRole"),
 * 			CredentialsSecret: pulumi.String("external-id"),
 * 			DisplayName:       pulumi.String("AWS-Consolidated-1"),
 * 			Location:          pulumi.String("westus"),
 * 			ReportId:          pulumi.String("HourlyWithResources"),
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			Status:            pulumi.String(costmanagement.ConnectorStatusActive),
 * 		})
 * 		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.costmanagement.Connector;
 * import com.pulumi.azurenative.costmanagement.ConnectorArgs;
 * 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 connector = new Connector("connector", ConnectorArgs.builder()
 *             .connectorName("AWSBillingAccount")
 *             .credentialsKey("arn:aws:iam::123456789012:role/AzureCostManagementRole")
 *             .credentialsSecret("external-id")
 *             .displayName("AWS-Consolidated-1")
 *             .location("westus")
 *             .reportId("HourlyWithResources")
 *             .resourceGroupName("rg1")
 *             .status("active")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:costmanagement:Connector AWSBillingAccount /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.CostManagement/connectors/{connectorName}
 * ```
 * @property connectorName Connector Name.
 * @property credentialsKey Credentials authentication key (eg AWS ARN)
 * @property credentialsSecret Credentials secret (eg AWS ExternalId)
 * @property displayName Connector DisplayName (defaults to Name)
 * @property kind Connector kind (eg aws)
 * @property location Connector location
 * @property reportId Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
 * @property resourceGroupName Azure Resource Group Name.
 * @property status Connector status
 * @property tags Resource tags.
 */
public data class ConnectorArgs(
    public val connectorName: Output? = null,
    public val credentialsKey: Output? = null,
    public val credentialsSecret: Output? = null,
    public val displayName: Output? = null,
    public val kind: Output? = null,
    public val location: Output? = null,
    public val reportId: Output? = null,
    public val resourceGroupName: Output? = null,
    public val status: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.costmanagement.ConnectorArgs =
        com.pulumi.azurenative.costmanagement.ConnectorArgs.builder()
            .connectorName(connectorName?.applyValue({ args0 -> args0 }))
            .credentialsKey(credentialsKey?.applyValue({ args0 -> args0 }))
            .credentialsSecret(credentialsSecret?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .reportId(reportId?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .status(
                status?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ConnectorArgs].
 */
@PulumiTagMarker
public class ConnectorArgsBuilder internal constructor() {
    private var connectorName: Output? = null

    private var credentialsKey: Output? = null

    private var credentialsSecret: Output? = null

    private var displayName: Output? = null

    private var kind: Output? = null

    private var location: Output? = null

    private var reportId: Output? = null

    private var resourceGroupName: Output? = null

    private var status: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value Connector Name.
     */
    @JvmName("ddbemqoietcohjqy")
    public suspend fun connectorName(`value`: Output) {
        this.connectorName = value
    }

    /**
     * @param value Credentials authentication key (eg AWS ARN)
     */
    @JvmName("oeiihafhxnctvvxl")
    public suspend fun credentialsKey(`value`: Output) {
        this.credentialsKey = value
    }

    /**
     * @param value Credentials secret (eg AWS ExternalId)
     */
    @JvmName("csiygnsmjaqqnvcp")
    public suspend fun credentialsSecret(`value`: Output) {
        this.credentialsSecret = value
    }

    /**
     * @param value Connector DisplayName (defaults to Name)
     */
    @JvmName("dlhwifneaeqiemmw")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Connector kind (eg aws)
     */
    @JvmName("kpysrauhbfbxrecb")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

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

    /**
     * @param value Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
     */
    @JvmName("pqvhcwxpefwfrnwd")
    public suspend fun reportId(`value`: Output) {
        this.reportId = value
    }

    /**
     * @param value Azure Resource Group Name.
     */
    @JvmName("wbxmxhamnguvfsjw")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Connector status
     */
    @JvmName("owppipsydjmxyefi")
    public suspend fun status(`value`: Output>) {
        this.status = value
    }

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

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

    /**
     * @param value Credentials authentication key (eg AWS ARN)
     */
    @JvmName("qqqkwitrngggvtej")
    public suspend fun credentialsKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.credentialsKey = mapped
    }

    /**
     * @param value Credentials secret (eg AWS ExternalId)
     */
    @JvmName("jwxlsfbnmsobecqj")
    public suspend fun credentialsSecret(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.credentialsSecret = mapped
    }

    /**
     * @param value Connector DisplayName (defaults to Name)
     */
    @JvmName("gfyswhgdxsgwdxmd")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Connector kind (eg aws)
     */
    @JvmName("sjicaydjxnusycec")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

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

    /**
     * @param value Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
     */
    @JvmName("hkosoputowxktaqj")
    public suspend fun reportId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reportId = mapped
    }

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

    /**
     * @param value Connector status
     */
    @JvmName("clvxtbgadqmmgmlp")
    public suspend fun status(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value Connector status
     */
    @JvmName("fgnixfhixogxbchp")
    public fun status(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value Connector status
     */
    @JvmName("wjiulliuccvimfnu")
    public fun status(`value`: ConnectorStatus) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.status = mapped
    }

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

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

    internal fun build(): ConnectorArgs = ConnectorArgs(
        connectorName = connectorName,
        credentialsKey = credentialsKey,
        credentialsSecret = credentialsSecret,
        displayName = displayName,
        kind = kind,
        location = location,
        reportId = reportId,
        resourceGroupName = resourceGroupName,
        status = status,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy