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

com.pulumi.aws.datazone.kotlin.DomainArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.aws.datazone.kotlin

import com.pulumi.aws.datazone.DomainArgs.builder
import com.pulumi.aws.datazone.kotlin.inputs.DomainSingleSignOnArgs
import com.pulumi.aws.datazone.kotlin.inputs.DomainSingleSignOnArgsBuilder
import com.pulumi.aws.datazone.kotlin.inputs.DomainTimeoutsArgs
import com.pulumi.aws.datazone.kotlin.inputs.DomainTimeoutsArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource for managing an AWS DataZone Domain.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const domainExecutionRole = new aws.iam.Role("domain_execution_role", {
 *     name: "my_domain_execution_role",
 *     assumeRolePolicy: JSON.stringify({
 *         Version: "2012-10-17",
 *         Statement: [
 *             {
 *                 Action: [
 *                     "sts:AssumeRole",
 *                     "sts:TagSession",
 *                 ],
 *                 Effect: "Allow",
 *                 Principal: {
 *                     Service: "datazone.amazonaws.com",
 *                 },
 *             },
 *             {
 *                 Action: [
 *                     "sts:AssumeRole",
 *                     "sts:TagSession",
 *                 ],
 *                 Effect: "Allow",
 *                 Principal: {
 *                     Service: "cloudformation.amazonaws.com",
 *                 },
 *             },
 *         ],
 *     }),
 *     inlinePolicies: [{
 *         name: "domain_execution_policy",
 *         policy: JSON.stringify({
 *             Version: "2012-10-17",
 *             Statement: [{
 *                 Action: [
 *                     "datazone:*",
 *                     "ram:*",
 *                     "sso:*",
 *                     "kms:*",
 *                 ],
 *                 Effect: "Allow",
 *                 Resource: "*",
 *             }],
 *         }),
 *     }],
 * });
 * const example = new aws.datazone.Domain("example", {
 *     name: "example",
 *     domainExecutionRole: domainExecutionRole.arn,
 * });
 * ```
 * ```python
 * import pulumi
 * import json
 * import pulumi_aws as aws
 * domain_execution_role = aws.iam.Role("domain_execution_role",
 *     name="my_domain_execution_role",
 *     assume_role_policy=json.dumps({
 *         "Version": "2012-10-17",
 *         "Statement": [
 *             {
 *                 "Action": [
 *                     "sts:AssumeRole",
 *                     "sts:TagSession",
 *                 ],
 *                 "Effect": "Allow",
 *                 "Principal": {
 *                     "Service": "datazone.amazonaws.com",
 *                 },
 *             },
 *             {
 *                 "Action": [
 *                     "sts:AssumeRole",
 *                     "sts:TagSession",
 *                 ],
 *                 "Effect": "Allow",
 *                 "Principal": {
 *                     "Service": "cloudformation.amazonaws.com",
 *                 },
 *             },
 *         ],
 *     }),
 *     inline_policies=[{
 *         "name": "domain_execution_policy",
 *         "policy": json.dumps({
 *             "Version": "2012-10-17",
 *             "Statement": [{
 *                 "Action": [
 *                     "datazone:*",
 *                     "ram:*",
 *                     "sso:*",
 *                     "kms:*",
 *                 ],
 *                 "Effect": "Allow",
 *                 "Resource": "*",
 *             }],
 *         }),
 *     }])
 * example = aws.datazone.Domain("example",
 *     name="example",
 *     domain_execution_role=domain_execution_role.arn)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using System.Text.Json;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var domainExecutionRole = new Aws.Iam.Role("domain_execution_role", new()
 *     {
 *         Name = "my_domain_execution_role",
 *         AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary
 *         {
 *             ["Version"] = "2012-10-17",
 *             ["Statement"] = new[]
 *             {
 *                 new Dictionary
 *                 {
 *                     ["Action"] = new[]
 *                     {
 *                         "sts:AssumeRole",
 *                         "sts:TagSession",
 *                     },
 *                     ["Effect"] = "Allow",
 *                     ["Principal"] = new Dictionary
 *                     {
 *                         ["Service"] = "datazone.amazonaws.com",
 *                     },
 *                 },
 *                 new Dictionary
 *                 {
 *                     ["Action"] = new[]
 *                     {
 *                         "sts:AssumeRole",
 *                         "sts:TagSession",
 *                     },
 *                     ["Effect"] = "Allow",
 *                     ["Principal"] = new Dictionary
 *                     {
 *                         ["Service"] = "cloudformation.amazonaws.com",
 *                     },
 *                 },
 *             },
 *         }),
 *         InlinePolicies = new[]
 *         {
 *             new Aws.Iam.Inputs.RoleInlinePolicyArgs
 *             {
 *                 Name = "domain_execution_policy",
 *                 Policy = JsonSerializer.Serialize(new Dictionary
 *                 {
 *                     ["Version"] = "2012-10-17",
 *                     ["Statement"] = new[]
 *                     {
 *                         new Dictionary
 *                         {
 *                             ["Action"] = new[]
 *                             {
 *                                 "datazone:*",
 *                                 "ram:*",
 *                                 "sso:*",
 *                                 "kms:*",
 *                             },
 *                             ["Effect"] = "Allow",
 *                             ["Resource"] = "*",
 *                         },
 *                     },
 *                 }),
 *             },
 *         },
 *     });
 *     var example = new Aws.DataZone.Domain("example", new()
 *     {
 *         Name = "example",
 *         DomainExecutionRole = domainExecutionRole.Arn,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"encoding/json"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datazone"
 * 	"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": []string{
 * 						"sts:AssumeRole",
 * 						"sts:TagSession",
 * 					},
 * 					"Effect": "Allow",
 * 					"Principal": map[string]interface{}{
 * 						"Service": "datazone.amazonaws.com",
 * 					},
 * 				},
 * 				map[string]interface{}{
 * 					"Action": []string{
 * 						"sts:AssumeRole",
 * 						"sts:TagSession",
 * 					},
 * 					"Effect": "Allow",
 * 					"Principal": map[string]interface{}{
 * 						"Service": "cloudformation.amazonaws.com",
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		json0 := string(tmpJSON0)
 * 		tmpJSON1, err := json.Marshal(map[string]interface{}{
 * 			"Version": "2012-10-17",
 * 			"Statement": []map[string]interface{}{
 * 				map[string]interface{}{
 * 					"Action": []string{
 * 						"datazone:*",
 * 						"ram:*",
 * 						"sso:*",
 * 						"kms:*",
 * 					},
 * 					"Effect":   "Allow",
 * 					"Resource": "*",
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		json1 := string(tmpJSON1)
 * 		domainExecutionRole, err := iam.NewRole(ctx, "domain_execution_role", &iam.RoleArgs{
 * 			Name:             pulumi.String("my_domain_execution_role"),
 * 			AssumeRolePolicy: pulumi.String(json0),
 * 			InlinePolicies: iam.RoleInlinePolicyArray{
 * 				&iam.RoleInlinePolicyArgs{
 * 					Name:   pulumi.String("domain_execution_policy"),
 * 					Policy: pulumi.String(json1),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = datazone.NewDomain(ctx, "example", &datazone.DomainArgs{
 * 			Name:                pulumi.String("example"),
 * 			DomainExecutionRole: domainExecutionRole.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.iam.inputs.RoleInlinePolicyArgs;
 * import com.pulumi.aws.datazone.Domain;
 * import com.pulumi.aws.datazone.DomainArgs;
 * 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 domainExecutionRole = new Role("domainExecutionRole", RoleArgs.builder()
 *             .name("my_domain_execution_role")
 *             .assumeRolePolicy(serializeJson(
 *                 jsonObject(
 *                     jsonProperty("Version", "2012-10-17"),
 *                     jsonProperty("Statement", jsonArray(
 *                         jsonObject(
 *                             jsonProperty("Action", jsonArray(
 *                                 "sts:AssumeRole",
 *                                 "sts:TagSession"
 *                             )),
 *                             jsonProperty("Effect", "Allow"),
 *                             jsonProperty("Principal", jsonObject(
 *                                 jsonProperty("Service", "datazone.amazonaws.com")
 *                             ))
 *                         ),
 *                         jsonObject(
 *                             jsonProperty("Action", jsonArray(
 *                                 "sts:AssumeRole",
 *                                 "sts:TagSession"
 *                             )),
 *                             jsonProperty("Effect", "Allow"),
 *                             jsonProperty("Principal", jsonObject(
 *                                 jsonProperty("Service", "cloudformation.amazonaws.com")
 *                             ))
 *                         )
 *                     ))
 *                 )))
 *             .inlinePolicies(RoleInlinePolicyArgs.builder()
 *                 .name("domain_execution_policy")
 *                 .policy(serializeJson(
 *                     jsonObject(
 *                         jsonProperty("Version", "2012-10-17"),
 *                         jsonProperty("Statement", jsonArray(jsonObject(
 *                             jsonProperty("Action", jsonArray(
 *                                 "datazone:*",
 *                                 "ram:*",
 *                                 "sso:*",
 *                                 "kms:*"
 *                             )),
 *                             jsonProperty("Effect", "Allow"),
 *                             jsonProperty("Resource", "*")
 *                         )))
 *                     )))
 *                 .build())
 *             .build());
 *         var example = new Domain("example", DomainArgs.builder()
 *             .name("example")
 *             .domainExecutionRole(domainExecutionRole.arn())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   domainExecutionRole:
 *     type: aws:iam:Role
 *     name: domain_execution_role
 *     properties:
 *       name: my_domain_execution_role
 *       assumeRolePolicy:
 *         fn::toJSON:
 *           Version: 2012-10-17
 *           Statement:
 *             - Action:
 *                 - sts:AssumeRole
 *                 - sts:TagSession
 *               Effect: Allow
 *               Principal:
 *                 Service: datazone.amazonaws.com
 *             - Action:
 *                 - sts:AssumeRole
 *                 - sts:TagSession
 *               Effect: Allow
 *               Principal:
 *                 Service: cloudformation.amazonaws.com
 *       inlinePolicies:
 *         - name: domain_execution_policy
 *           policy:
 *             fn::toJSON:
 *               Version: 2012-10-17
 *               Statement:
 *                 - Action:
 *                     - datazone:*
 *                     - ram:*
 *                     - sso:*
 *                     - kms:*
 *                   Effect: Allow
 *                   Resource: '*'
 *   example:
 *     type: aws:datazone:Domain
 *     properties:
 *       name: example
 *       domainExecutionRole: ${domainExecutionRole.arn}
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import DataZone Domain using the `domain_id`. For example:
 * ```sh
 * $ pulumi import aws:datazone/domain:Domain example domain-id-12345678
 * ```
 * @property description Description of the Domain.
 * @property domainExecutionRole ARN of the role used by DataZone to configure the Domain.
 * The following arguments are optional:
 * @property kmsKeyIdentifier ARN of the KMS key used to encrypt the Amazon DataZone domain, metadata and reporting data.
 * @property name Name of the Domain.
 * @property singleSignOn Single sign on options, used to [enable AWS IAM Identity Center](https://docs.aws.amazon.com/datazone/latest/userguide/enable-IAM-identity-center-for-datazone.html) for DataZone.
 * @property skipDeletionCheck Whether to skip the deletion check for the Domain.
 * @property tags
 * @property timeouts
 */
public data class DomainArgs(
    public val description: Output? = null,
    public val domainExecutionRole: Output? = null,
    public val kmsKeyIdentifier: Output? = null,
    public val name: Output? = null,
    public val singleSignOn: Output? = null,
    public val skipDeletionCheck: Output? = null,
    public val tags: Output>? = null,
    public val timeouts: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.datazone.DomainArgs =
        com.pulumi.aws.datazone.DomainArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .domainExecutionRole(domainExecutionRole?.applyValue({ args0 -> args0 }))
            .kmsKeyIdentifier(kmsKeyIdentifier?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .singleSignOn(singleSignOn?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .skipDeletionCheck(skipDeletionCheck?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .timeouts(timeouts?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var domainExecutionRole: Output? = null

    private var kmsKeyIdentifier: Output? = null

    private var name: Output? = null

    private var singleSignOn: Output? = null

    private var skipDeletionCheck: Output? = null

    private var tags: Output>? = null

    private var timeouts: Output? = null

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

    /**
     * @param value ARN of the role used by DataZone to configure the Domain.
     * The following arguments are optional:
     */
    @JvmName("voutcnfeskrtmfov")
    public suspend fun domainExecutionRole(`value`: Output) {
        this.domainExecutionRole = value
    }

    /**
     * @param value ARN of the KMS key used to encrypt the Amazon DataZone domain, metadata and reporting data.
     */
    @JvmName("vnjkupeuebhxeife")
    public suspend fun kmsKeyIdentifier(`value`: Output) {
        this.kmsKeyIdentifier = value
    }

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

    /**
     * @param value Single sign on options, used to [enable AWS IAM Identity Center](https://docs.aws.amazon.com/datazone/latest/userguide/enable-IAM-identity-center-for-datazone.html) for DataZone.
     */
    @JvmName("sjseygpjjmxmlscj")
    public suspend fun singleSignOn(`value`: Output) {
        this.singleSignOn = value
    }

    /**
     * @param value Whether to skip the deletion check for the Domain.
     */
    @JvmName("dsvsmbesocdwchrx")
    public suspend fun skipDeletionCheck(`value`: Output) {
        this.skipDeletionCheck = value
    }

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

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

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

    /**
     * @param value ARN of the role used by DataZone to configure the Domain.
     * The following arguments are optional:
     */
    @JvmName("yjxbuoekspyhdqdh")
    public suspend fun domainExecutionRole(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainExecutionRole = mapped
    }

    /**
     * @param value ARN of the KMS key used to encrypt the Amazon DataZone domain, metadata and reporting data.
     */
    @JvmName("kwqttephncmbwkue")
    public suspend fun kmsKeyIdentifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyIdentifier = mapped
    }

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

    /**
     * @param value Single sign on options, used to [enable AWS IAM Identity Center](https://docs.aws.amazon.com/datazone/latest/userguide/enable-IAM-identity-center-for-datazone.html) for DataZone.
     */
    @JvmName("hcktqwukhrmlgayv")
    public suspend fun singleSignOn(`value`: DomainSingleSignOnArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.singleSignOn = mapped
    }

    /**
     * @param argument Single sign on options, used to [enable AWS IAM Identity Center](https://docs.aws.amazon.com/datazone/latest/userguide/enable-IAM-identity-center-for-datazone.html) for DataZone.
     */
    @JvmName("xmepipsctfwuujdl")
    public suspend fun singleSignOn(argument: suspend DomainSingleSignOnArgsBuilder.() -> Unit) {
        val toBeMapped = DomainSingleSignOnArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.singleSignOn = mapped
    }

    /**
     * @param value Whether to skip the deletion check for the Domain.
     */
    @JvmName("igjydpefywllsbct")
    public suspend fun skipDeletionCheck(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skipDeletionCheck = mapped
    }

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

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

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

    /**
     * @param argument
     */
    @JvmName("xgkcgskkkucqbyib")
    public suspend fun timeouts(argument: suspend DomainTimeoutsArgsBuilder.() -> Unit) {
        val toBeMapped = DomainTimeoutsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timeouts = mapped
    }

    internal fun build(): DomainArgs = DomainArgs(
        description = description,
        domainExecutionRole = domainExecutionRole,
        kmsKeyIdentifier = kmsKeyIdentifier,
        name = name,
        singleSignOn = singleSignOn,
        skipDeletionCheck = skipDeletionCheck,
        tags = tags,
        timeouts = timeouts,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy