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

com.pulumi.aws.grafana.kotlin.WorkspaceArgs.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.grafana.kotlin

import com.pulumi.aws.grafana.WorkspaceArgs.builder
import com.pulumi.aws.grafana.kotlin.inputs.WorkspaceNetworkAccessControlArgs
import com.pulumi.aws.grafana.kotlin.inputs.WorkspaceNetworkAccessControlArgsBuilder
import com.pulumi.aws.grafana.kotlin.inputs.WorkspaceVpcConfigurationArgs
import com.pulumi.aws.grafana.kotlin.inputs.WorkspaceVpcConfigurationArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides an Amazon Managed Grafana workspace resource.
 * ## Example Usage
 * ### Basic configuration
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const assume = new aws.iam.Role("assume", {
 *     name: "grafana-assume",
 *     assumeRolePolicy: JSON.stringify({
 *         Version: "2012-10-17",
 *         Statement: [{
 *             Action: "sts:AssumeRole",
 *             Effect: "Allow",
 *             Sid: "",
 *             Principal: {
 *                 Service: "grafana.amazonaws.com",
 *             },
 *         }],
 *     }),
 * });
 * const example = new aws.grafana.Workspace("example", {
 *     accountAccessType: "CURRENT_ACCOUNT",
 *     authenticationProviders: ["SAML"],
 *     permissionType: "SERVICE_MANAGED",
 *     roleArn: assume.arn,
 * });
 * ```
 * ```python
 * import pulumi
 * import json
 * import pulumi_aws as aws
 * assume = aws.iam.Role("assume",
 *     name="grafana-assume",
 *     assume_role_policy=json.dumps({
 *         "Version": "2012-10-17",
 *         "Statement": [{
 *             "Action": "sts:AssumeRole",
 *             "Effect": "Allow",
 *             "Sid": "",
 *             "Principal": {
 *                 "Service": "grafana.amazonaws.com",
 *             },
 *         }],
 *     }))
 * example = aws.grafana.Workspace("example",
 *     account_access_type="CURRENT_ACCOUNT",
 *     authentication_providers=["SAML"],
 *     permission_type="SERVICE_MANAGED",
 *     role_arn=assume.arn)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using System.Text.Json;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var assume = new Aws.Iam.Role("assume", new()
 *     {
 *         Name = "grafana-assume",
 *         AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary
 *         {
 *             ["Version"] = "2012-10-17",
 *             ["Statement"] = new[]
 *             {
 *                 new Dictionary
 *                 {
 *                     ["Action"] = "sts:AssumeRole",
 *                     ["Effect"] = "Allow",
 *                     ["Sid"] = "",
 *                     ["Principal"] = new Dictionary
 *                     {
 *                         ["Service"] = "grafana.amazonaws.com",
 *                     },
 *                 },
 *             },
 *         }),
 *     });
 *     var example = new Aws.Grafana.Workspace("example", new()
 *     {
 *         AccountAccessType = "CURRENT_ACCOUNT",
 *         AuthenticationProviders = new[]
 *         {
 *             "SAML",
 *         },
 *         PermissionType = "SERVICE_MANAGED",
 *         RoleArn = assume.Arn,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"encoding/json"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/grafana"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		tmpJSON0, err := json.Marshal(map[string]interface{}{
 * 			"Version": "2012-10-17",
 * 			"Statement": []map[string]interface{}{
 * 				map[string]interface{}{
 * 					"Action": "sts:AssumeRole",
 * 					"Effect": "Allow",
 * 					"Sid":    "",
 * 					"Principal": map[string]interface{}{
 * 						"Service": "grafana.amazonaws.com",
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		json0 := string(tmpJSON0)
 * 		assume, err := iam.NewRole(ctx, "assume", &iam.RoleArgs{
 * 			Name:             pulumi.String("grafana-assume"),
 * 			AssumeRolePolicy: pulumi.String(json0),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = grafana.NewWorkspace(ctx, "example", &grafana.WorkspaceArgs{
 * 			AccountAccessType: pulumi.String("CURRENT_ACCOUNT"),
 * 			AuthenticationProviders: pulumi.StringArray{
 * 				pulumi.String("SAML"),
 * 			},
 * 			PermissionType: pulumi.String("SERVICE_MANAGED"),
 * 			RoleArn:        assume.Arn,
 * 		})
 * 		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.iam.Role;
 * import com.pulumi.aws.iam.RoleArgs;
 * import com.pulumi.aws.grafana.Workspace;
 * import com.pulumi.aws.grafana.WorkspaceArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * 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 assume = new Role("assume", RoleArgs.builder()
 *             .name("grafana-assume")
 *             .assumeRolePolicy(serializeJson(
 *                 jsonObject(
 *                     jsonProperty("Version", "2012-10-17"),
 *                     jsonProperty("Statement", jsonArray(jsonObject(
 *                         jsonProperty("Action", "sts:AssumeRole"),
 *                         jsonProperty("Effect", "Allow"),
 *                         jsonProperty("Sid", ""),
 *                         jsonProperty("Principal", jsonObject(
 *                             jsonProperty("Service", "grafana.amazonaws.com")
 *                         ))
 *                     )))
 *                 )))
 *             .build());
 *         var example = new Workspace("example", WorkspaceArgs.builder()
 *             .accountAccessType("CURRENT_ACCOUNT")
 *             .authenticationProviders("SAML")
 *             .permissionType("SERVICE_MANAGED")
 *             .roleArn(assume.arn())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:grafana:Workspace
 *     properties:
 *       accountAccessType: CURRENT_ACCOUNT
 *       authenticationProviders:
 *         - SAML
 *       permissionType: SERVICE_MANAGED
 *       roleArn: ${assume.arn}
 *   assume:
 *     type: aws:iam:Role
 *     properties:
 *       name: grafana-assume
 *       assumeRolePolicy:
 *         fn::toJSON:
 *           Version: 2012-10-17
 *           Statement:
 *             - Action: sts:AssumeRole
 *               Effect: Allow
 *               Sid:
 *               Principal:
 *                 Service: grafana.amazonaws.com
 * ```
 * 
 * ### Workspace configuration options
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.grafana.Workspace("example", {
 *     accountAccessType: "CURRENT_ACCOUNT",
 *     authenticationProviders: ["SAML"],
 *     permissionType: "SERVICE_MANAGED",
 *     roleArn: assume.arn,
 *     configuration: JSON.stringify({
 *         plugins: {
 *             pluginAdminEnabled: true,
 *         },
 *         unifiedAlerting: {
 *             enabled: false,
 *         },
 *     }),
 * });
 * ```
 * ```python
 * import pulumi
 * import json
 * import pulumi_aws as aws
 * example = aws.grafana.Workspace("example",
 *     account_access_type="CURRENT_ACCOUNT",
 *     authentication_providers=["SAML"],
 *     permission_type="SERVICE_MANAGED",
 *     role_arn=assume["arn"],
 *     configuration=json.dumps({
 *         "plugins": {
 *             "pluginAdminEnabled": True,
 *         },
 *         "unifiedAlerting": {
 *             "enabled": False,
 *         },
 *     }))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using System.Text.Json;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Grafana.Workspace("example", new()
 *     {
 *         AccountAccessType = "CURRENT_ACCOUNT",
 *         AuthenticationProviders = new[]
 *         {
 *             "SAML",
 *         },
 *         PermissionType = "SERVICE_MANAGED",
 *         RoleArn = assume.Arn,
 *         Configuration = JsonSerializer.Serialize(new Dictionary
 *         {
 *             ["plugins"] = new Dictionary
 *             {
 *                 ["pluginAdminEnabled"] = true,
 *             },
 *             ["unifiedAlerting"] = new Dictionary
 *             {
 *                 ["enabled"] = false,
 *             },
 *         }),
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"encoding/json"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/grafana"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		tmpJSON0, err := json.Marshal(map[string]interface{}{
 * 			"plugins": map[string]interface{}{
 * 				"pluginAdminEnabled": true,
 * 			},
 * 			"unifiedAlerting": map[string]interface{}{
 * 				"enabled": false,
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		json0 := string(tmpJSON0)
 * 		_, err = grafana.NewWorkspace(ctx, "example", &grafana.WorkspaceArgs{
 * 			AccountAccessType: pulumi.String("CURRENT_ACCOUNT"),
 * 			AuthenticationProviders: pulumi.StringArray{
 * 				pulumi.String("SAML"),
 * 			},
 * 			PermissionType: pulumi.String("SERVICE_MANAGED"),
 * 			RoleArn:        pulumi.Any(assume.Arn),
 * 			Configuration:  pulumi.String(json0),
 * 		})
 * 		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.grafana.Workspace;
 * import com.pulumi.aws.grafana.WorkspaceArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * 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 Workspace("example", WorkspaceArgs.builder()
 *             .accountAccessType("CURRENT_ACCOUNT")
 *             .authenticationProviders("SAML")
 *             .permissionType("SERVICE_MANAGED")
 *             .roleArn(assume.arn())
 *             .configuration(serializeJson(
 *                 jsonObject(
 *                     jsonProperty("plugins", jsonObject(
 *                         jsonProperty("pluginAdminEnabled", true)
 *                     )),
 *                     jsonProperty("unifiedAlerting", jsonObject(
 *                         jsonProperty("enabled", false)
 *                     ))
 *                 )))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:grafana:Workspace
 *     properties:
 *       accountAccessType: CURRENT_ACCOUNT
 *       authenticationProviders:
 *         - SAML
 *       permissionType: SERVICE_MANAGED
 *       roleArn: ${assume.arn}
 *       configuration:
 *         fn::toJSON:
 *           plugins:
 *             pluginAdminEnabled: true
 *           unifiedAlerting:
 *             enabled: false
 * ```
 * 
 * The optional argument `configuration` is a JSON string that enables the unified `Grafana Alerting` (Grafana version 10 or newer) and `Plugins Management` (Grafana version 9 or newer) on the Grafana Workspaces.
 * For more information about using Grafana alerting, and the effects of turning it on or off, see [Alerts in Grafana version 10](https://docs.aws.amazon.com/grafana/latest/userguide/v10-alerts.html).
 * ## Import
 * Using `pulumi import`, import Grafana Workspace using the workspace's `id`. For example:
 * ```sh
 * $ pulumi import aws:grafana/workspace:Workspace example g-2054c75a02
 * ```
 * @property accountAccessType The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizational_units` must also be present.
 * @property authenticationProviders The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
 * @property configuration The configuration string for the workspace that you create. For more information about the format and configuration options available, see [Working in your Grafana workspace](https://docs.aws.amazon.com/grafana/latest/userguide/AMG-configure-workspace.html).
 * @property dataSources The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
 * @property description The workspace description.
 * @property grafanaVersion Specifies the version of Grafana to support in the new workspace. Supported values are `8.4`, `9.4` and `10.4`. If not specified, defaults to the latest version.
 * @property name The Grafana workspace name.
 * @property networkAccessControl Configuration for network access to your workspace.See Network Access Control below.
 * @property notificationDestinations The notification destinations. If a data source is specified here, Amazon Managed Grafana will create IAM roles and permissions needed to use these destinations. Must be set to `SNS`.
 * @property organizationRoleName The role name that the workspace uses to access resources through Amazon Organizations.
 * @property organizationalUnits The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
 * @property permissionType The permission type of the workspace. If `SERVICE_MANAGED` is specified, the IAM roles and IAM policy attachments are generated automatically. If `CUSTOMER_MANAGED` is specified, the IAM roles and IAM policy attachments will not be created.
 * The following arguments are optional:
 * @property roleArn The IAM role ARN that the workspace assumes.
 * @property stackSetName The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace.
 * @property tags Key-value mapping 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
 * @property vpcConfiguration The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below.
 */
public data class WorkspaceArgs(
    public val accountAccessType: Output? = null,
    public val authenticationProviders: Output>? = null,
    public val configuration: Output? = null,
    public val dataSources: Output>? = null,
    public val description: Output? = null,
    public val grafanaVersion: Output? = null,
    public val name: Output? = null,
    public val networkAccessControl: Output? = null,
    public val notificationDestinations: Output>? = null,
    public val organizationRoleName: Output? = null,
    public val organizationalUnits: Output>? = null,
    public val permissionType: Output? = null,
    public val roleArn: Output? = null,
    public val stackSetName: Output? = null,
    public val tags: Output>? = null,
    public val vpcConfiguration: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.grafana.WorkspaceArgs =
        com.pulumi.aws.grafana.WorkspaceArgs.builder()
            .accountAccessType(accountAccessType?.applyValue({ args0 -> args0 }))
            .authenticationProviders(
                authenticationProviders?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .configuration(configuration?.applyValue({ args0 -> args0 }))
            .dataSources(dataSources?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .grafanaVersion(grafanaVersion?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkAccessControl(
                networkAccessControl?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .notificationDestinations(
                notificationDestinations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .organizationRoleName(organizationRoleName?.applyValue({ args0 -> args0 }))
            .organizationalUnits(organizationalUnits?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .permissionType(permissionType?.applyValue({ args0 -> args0 }))
            .roleArn(roleArn?.applyValue({ args0 -> args0 }))
            .stackSetName(stackSetName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .vpcConfiguration(
                vpcConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [WorkspaceArgs].
 */
@PulumiTagMarker
public class WorkspaceArgsBuilder internal constructor() {
    private var accountAccessType: Output? = null

    private var authenticationProviders: Output>? = null

    private var configuration: Output? = null

    private var dataSources: Output>? = null

    private var description: Output? = null

    private var grafanaVersion: Output? = null

    private var name: Output? = null

    private var networkAccessControl: Output? = null

    private var notificationDestinations: Output>? = null

    private var organizationRoleName: Output? = null

    private var organizationalUnits: Output>? = null

    private var permissionType: Output? = null

    private var roleArn: Output? = null

    private var stackSetName: Output? = null

    private var tags: Output>? = null

    private var vpcConfiguration: Output? = null

    /**
     * @param value The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizational_units` must also be present.
     */
    @JvmName("ubawegfjeiurkxrw")
    public suspend fun accountAccessType(`value`: Output) {
        this.accountAccessType = value
    }

    /**
     * @param value The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
     */
    @JvmName("vrvcgdxlnhymtiwl")
    public suspend fun authenticationProviders(`value`: Output>) {
        this.authenticationProviders = value
    }

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

    /**
     * @param values The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
     */
    @JvmName("theaenwwtgvuoqwm")
    public suspend fun authenticationProviders(values: List>) {
        this.authenticationProviders = Output.all(values)
    }

    /**
     * @param value The configuration string for the workspace that you create. For more information about the format and configuration options available, see [Working in your Grafana workspace](https://docs.aws.amazon.com/grafana/latest/userguide/AMG-configure-workspace.html).
     */
    @JvmName("vfknsppfpgbvemkx")
    public suspend fun configuration(`value`: Output) {
        this.configuration = value
    }

    /**
     * @param value The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
     */
    @JvmName("ktshdhfiegvnybdq")
    public suspend fun dataSources(`value`: Output>) {
        this.dataSources = value
    }

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

    /**
     * @param values The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
     */
    @JvmName("eupfrjhwlwgfckmg")
    public suspend fun dataSources(values: List>) {
        this.dataSources = Output.all(values)
    }

    /**
     * @param value The workspace description.
     */
    @JvmName("socohspyrckohoeg")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Specifies the version of Grafana to support in the new workspace. Supported values are `8.4`, `9.4` and `10.4`. If not specified, defaults to the latest version.
     */
    @JvmName("jqovmoimorwkwqbh")
    public suspend fun grafanaVersion(`value`: Output) {
        this.grafanaVersion = value
    }

    /**
     * @param value The Grafana workspace name.
     */
    @JvmName("meqvknmpghavhcmb")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Configuration for network access to your workspace.See Network Access Control below.
     */
    @JvmName("emjbhfphsnjrcjwy")
    public suspend fun networkAccessControl(`value`: Output) {
        this.networkAccessControl = value
    }

    /**
     * @param value The notification destinations. If a data source is specified here, Amazon Managed Grafana will create IAM roles and permissions needed to use these destinations. Must be set to `SNS`.
     */
    @JvmName("dpomqpehcobhpgkb")
    public suspend fun notificationDestinations(`value`: Output>) {
        this.notificationDestinations = value
    }

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

    /**
     * @param values The notification destinations. If a data source is specified here, Amazon Managed Grafana will create IAM roles and permissions needed to use these destinations. Must be set to `SNS`.
     */
    @JvmName("gydebubaxitvmxvl")
    public suspend fun notificationDestinations(values: List>) {
        this.notificationDestinations = Output.all(values)
    }

    /**
     * @param value The role name that the workspace uses to access resources through Amazon Organizations.
     */
    @JvmName("fqjimkmstrtccpsg")
    public suspend fun organizationRoleName(`value`: Output) {
        this.organizationRoleName = value
    }

    /**
     * @param value The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
     */
    @JvmName("qoeipmkjoqbahqag")
    public suspend fun organizationalUnits(`value`: Output>) {
        this.organizationalUnits = value
    }

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

    /**
     * @param values The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
     */
    @JvmName("eelhrjnblqkjnnjc")
    public suspend fun organizationalUnits(values: List>) {
        this.organizationalUnits = Output.all(values)
    }

    /**
     * @param value The permission type of the workspace. If `SERVICE_MANAGED` is specified, the IAM roles and IAM policy attachments are generated automatically. If `CUSTOMER_MANAGED` is specified, the IAM roles and IAM policy attachments will not be created.
     * The following arguments are optional:
     */
    @JvmName("ktuillywfadqxjtx")
    public suspend fun permissionType(`value`: Output) {
        this.permissionType = value
    }

    /**
     * @param value The IAM role ARN that the workspace assumes.
     */
    @JvmName("rgivcuoxltytilha")
    public suspend fun roleArn(`value`: Output) {
        this.roleArn = value
    }

    /**
     * @param value The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace.
     */
    @JvmName("oggausjksakcjwja")
    public suspend fun stackSetName(`value`: Output) {
        this.stackSetName = value
    }

    /**
     * @param value Key-value mapping 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("ucfyjkahjlungayg")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below.
     */
    @JvmName("qebnctjgwlvlnese")
    public suspend fun vpcConfiguration(`value`: Output) {
        this.vpcConfiguration = value
    }

    /**
     * @param value The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizational_units` must also be present.
     */
    @JvmName("deksncqibgxwlcse")
    public suspend fun accountAccessType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountAccessType = mapped
    }

    /**
     * @param value The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
     */
    @JvmName("vvqqfoxbvqaxbmaj")
    public suspend fun authenticationProviders(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authenticationProviders = mapped
    }

    /**
     * @param values The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
     */
    @JvmName("iuhglfcmeydugvoc")
    public suspend fun authenticationProviders(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.authenticationProviders = mapped
    }

    /**
     * @param value The configuration string for the workspace that you create. For more information about the format and configuration options available, see [Working in your Grafana workspace](https://docs.aws.amazon.com/grafana/latest/userguide/AMG-configure-workspace.html).
     */
    @JvmName("iuppwpbngbnaoakq")
    public suspend fun configuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.configuration = mapped
    }

    /**
     * @param value The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
     */
    @JvmName("yhijlytsaeorlbnl")
    public suspend fun dataSources(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataSources = mapped
    }

    /**
     * @param values The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY`
     */
    @JvmName("hriwgbmuvlskgmwc")
    public suspend fun dataSources(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dataSources = mapped
    }

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

    /**
     * @param value Specifies the version of Grafana to support in the new workspace. Supported values are `8.4`, `9.4` and `10.4`. If not specified, defaults to the latest version.
     */
    @JvmName("klamyougowhdbysp")
    public suspend fun grafanaVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.grafanaVersion = mapped
    }

    /**
     * @param value The Grafana workspace name.
     */
    @JvmName("ccqommxlabruhfyy")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Configuration for network access to your workspace.See Network Access Control below.
     */
    @JvmName("udtvqnuwgaiodigk")
    public suspend fun networkAccessControl(`value`: WorkspaceNetworkAccessControlArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkAccessControl = mapped
    }

    /**
     * @param argument Configuration for network access to your workspace.See Network Access Control below.
     */
    @JvmName("wihmlkklpdlcnhbm")
    public suspend fun networkAccessControl(argument: suspend WorkspaceNetworkAccessControlArgsBuilder.() -> Unit) {
        val toBeMapped = WorkspaceNetworkAccessControlArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkAccessControl = mapped
    }

    /**
     * @param value The notification destinations. If a data source is specified here, Amazon Managed Grafana will create IAM roles and permissions needed to use these destinations. Must be set to `SNS`.
     */
    @JvmName("tilyeuuoagsahowo")
    public suspend fun notificationDestinations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationDestinations = mapped
    }

    /**
     * @param values The notification destinations. If a data source is specified here, Amazon Managed Grafana will create IAM roles and permissions needed to use these destinations. Must be set to `SNS`.
     */
    @JvmName("werbfvecldpmkxst")
    public suspend fun notificationDestinations(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.notificationDestinations = mapped
    }

    /**
     * @param value The role name that the workspace uses to access resources through Amazon Organizations.
     */
    @JvmName("ibehnksejbfgchjl")
    public suspend fun organizationRoleName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.organizationRoleName = mapped
    }

    /**
     * @param value The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
     */
    @JvmName("ibtjbugiowchwgvy")
    public suspend fun organizationalUnits(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.organizationalUnits = mapped
    }

    /**
     * @param values The Amazon Organizations organizational units that the workspace is authorized to use data sources from.
     */
    @JvmName("dbfinabnkbcxrjvx")
    public suspend fun organizationalUnits(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.organizationalUnits = mapped
    }

    /**
     * @param value The permission type of the workspace. If `SERVICE_MANAGED` is specified, the IAM roles and IAM policy attachments are generated automatically. If `CUSTOMER_MANAGED` is specified, the IAM roles and IAM policy attachments will not be created.
     * The following arguments are optional:
     */
    @JvmName("rqximioxxsmkyxuh")
    public suspend fun permissionType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.permissionType = mapped
    }

    /**
     * @param value The IAM role ARN that the workspace assumes.
     */
    @JvmName("vkekwrsgiemtujvy")
    public suspend fun roleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleArn = mapped
    }

    /**
     * @param value The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace.
     */
    @JvmName("keiphxlklmygqtka")
    public suspend fun stackSetName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stackSetName = mapped
    }

    /**
     * @param value Key-value mapping 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("ygqsmwmcdijncvmf")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Key-value mapping 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("oyaentdtapfktxum")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below.
     */
    @JvmName("yfwwtswkklwmkejk")
    public suspend fun vpcConfiguration(`value`: WorkspaceVpcConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcConfiguration = mapped
    }

    /**
     * @param argument The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below.
     */
    @JvmName("drfqsmuhvjbegmtg")
    public suspend fun vpcConfiguration(argument: suspend WorkspaceVpcConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = WorkspaceVpcConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.vpcConfiguration = mapped
    }

    internal fun build(): WorkspaceArgs = WorkspaceArgs(
        accountAccessType = accountAccessType,
        authenticationProviders = authenticationProviders,
        configuration = configuration,
        dataSources = dataSources,
        description = description,
        grafanaVersion = grafanaVersion,
        name = name,
        networkAccessControl = networkAccessControl,
        notificationDestinations = notificationDestinations,
        organizationRoleName = organizationRoleName,
        organizationalUnits = organizationalUnits,
        permissionType = permissionType,
        roleArn = roleArn,
        stackSetName = stackSetName,
        tags = tags,
        vpcConfiguration = vpcConfiguration,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy