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

com.pulumi.aws.macie2.kotlin.MemberArgs.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.macie2.kotlin

import com.pulumi.aws.macie2.MemberArgs.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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides a resource to manage an [Amazon Macie Member](https://docs.aws.amazon.com/macie/latest/APIReference/members-id.html).
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.macie2.Account("example", {});
 * const exampleMember = new aws.macie2.Member("example", {
 *     accountId: "AWS ACCOUNT ID",
 *     email: "EMAIL",
 *     invite: true,
 *     invitationMessage: "Message of the invitation",
 *     invitationDisableEmailNotification: true,
 * }, {
 *     dependsOn: [example],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.macie2.Account("example")
 * example_member = aws.macie2.Member("example",
 *     account_id="AWS ACCOUNT ID",
 *     email="EMAIL",
 *     invite=True,
 *     invitation_message="Message of the invitation",
 *     invitation_disable_email_notification=True,
 *     opts = pulumi.ResourceOptions(depends_on=[example]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Macie2.Account("example");
 *     var exampleMember = new Aws.Macie2.Member("example", new()
 *     {
 *         AccountId = "AWS ACCOUNT ID",
 *         Email = "EMAIL",
 *         Invite = true,
 *         InvitationMessage = "Message of the invitation",
 *         InvitationDisableEmailNotification = true,
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             example,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/macie2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := macie2.NewAccount(ctx, "example", nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = macie2.NewMember(ctx, "example", &macie2.MemberArgs{
 * 			AccountId:                          pulumi.String("AWS ACCOUNT ID"),
 * 			Email:                              pulumi.String("EMAIL"),
 * 			Invite:                             pulumi.Bool(true),
 * 			InvitationMessage:                  pulumi.String("Message of the invitation"),
 * 			InvitationDisableEmailNotification: pulumi.Bool(true),
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			example,
 * 		}))
 * 		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.macie2.Account;
 * import com.pulumi.aws.macie2.Member;
 * import com.pulumi.aws.macie2.MemberArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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 Account("example");
 *         var exampleMember = new Member("exampleMember", MemberArgs.builder()
 *             .accountId("AWS ACCOUNT ID")
 *             .email("EMAIL")
 *             .invite(true)
 *             .invitationMessage("Message of the invitation")
 *             .invitationDisableEmailNotification(true)
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(example)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:macie2:Account
 *   exampleMember:
 *     type: aws:macie2:Member
 *     name: example
 *     properties:
 *       accountId: AWS ACCOUNT ID
 *       email: EMAIL
 *       invite: true
 *       invitationMessage: Message of the invitation
 *       invitationDisableEmailNotification: true
 *     options:
 *       dependson:
 *         - ${example}
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import `aws_macie2_member` using the account ID of the member account. For example:
 * ```sh
 * $ pulumi import aws:macie2/member:Member example 123456789012
 * ```
 * @property accountId The AWS account ID for the account.
 * @property email The email address for the account.
 * @property invitationDisableEmailNotification Specifies whether to send an email notification to the root user of each account that the invitation will be sent to. This notification is in addition to an alert that the root user receives in AWS Personal Health Dashboard. To send an email notification to the root user of each account, set this value to `true`.
 * @property invitationMessage A custom message to include in the invitation. Amazon Macie adds this message to the standard content that it sends for an invitation.
 * @property invite Send an invitation to a member
 * @property status Specifies the status for the account. To enable Amazon Macie and start all Macie activities for the account, set this value to `ENABLED`. Valid values are `ENABLED` or `PAUSED`.
 * @property tags A map of key-value pairs that specifies the tags to associate with the account in Amazon Macie.
 */
public data class MemberArgs(
    public val accountId: Output? = null,
    public val email: Output? = null,
    public val invitationDisableEmailNotification: Output? = null,
    public val invitationMessage: Output? = null,
    public val invite: Output? = null,
    public val status: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.macie2.MemberArgs =
        com.pulumi.aws.macie2.MemberArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .email(email?.applyValue({ args0 -> args0 }))
            .invitationDisableEmailNotification(
                invitationDisableEmailNotification?.applyValue({ args0 ->
                    args0
                }),
            )
            .invitationMessage(invitationMessage?.applyValue({ args0 -> args0 }))
            .invite(invite?.applyValue({ args0 -> args0 }))
            .status(status?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [MemberArgs].
 */
@PulumiTagMarker
public class MemberArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var email: Output? = null

    private var invitationDisableEmailNotification: Output? = null

    private var invitationMessage: Output? = null

    private var invite: Output? = null

    private var status: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The AWS account ID for the account.
     */
    @JvmName("rhbmerubckhorxdg")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value The email address for the account.
     */
    @JvmName("ffmvgohfqkppaeyo")
    public suspend fun email(`value`: Output) {
        this.email = value
    }

    /**
     * @param value Specifies whether to send an email notification to the root user of each account that the invitation will be sent to. This notification is in addition to an alert that the root user receives in AWS Personal Health Dashboard. To send an email notification to the root user of each account, set this value to `true`.
     */
    @JvmName("vbubipqepmhhqawh")
    public suspend fun invitationDisableEmailNotification(`value`: Output) {
        this.invitationDisableEmailNotification = value
    }

    /**
     * @param value A custom message to include in the invitation. Amazon Macie adds this message to the standard content that it sends for an invitation.
     */
    @JvmName("mcdhrnkciuofbeoo")
    public suspend fun invitationMessage(`value`: Output) {
        this.invitationMessage = value
    }

    /**
     * @param value Send an invitation to a member
     */
    @JvmName("vuaojqeymupvynrv")
    public suspend fun invite(`value`: Output) {
        this.invite = value
    }

    /**
     * @param value Specifies the status for the account. To enable Amazon Macie and start all Macie activities for the account, set this value to `ENABLED`. Valid values are `ENABLED` or `PAUSED`.
     */
    @JvmName("lshgwvkcqcoubltj")
    public suspend fun status(`value`: Output) {
        this.status = value
    }

    /**
     * @param value A map of key-value pairs that specifies the tags to associate with the account in Amazon Macie.
     */
    @JvmName("xpbaknrfjauirmak")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The AWS account ID for the account.
     */
    @JvmName("caejosxefqlpqfyp")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

    /**
     * @param value The email address for the account.
     */
    @JvmName("uiqwlftttyglikhj")
    public suspend fun email(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.email = mapped
    }

    /**
     * @param value Specifies whether to send an email notification to the root user of each account that the invitation will be sent to. This notification is in addition to an alert that the root user receives in AWS Personal Health Dashboard. To send an email notification to the root user of each account, set this value to `true`.
     */
    @JvmName("nxeyxxrssnpetura")
    public suspend fun invitationDisableEmailNotification(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.invitationDisableEmailNotification = mapped
    }

    /**
     * @param value A custom message to include in the invitation. Amazon Macie adds this message to the standard content that it sends for an invitation.
     */
    @JvmName("nnmeuxhcfmlncqov")
    public suspend fun invitationMessage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.invitationMessage = mapped
    }

    /**
     * @param value Send an invitation to a member
     */
    @JvmName("tlbgoycryhyejnxv")
    public suspend fun invite(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.invite = mapped
    }

    /**
     * @param value Specifies the status for the account. To enable Amazon Macie and start all Macie activities for the account, set this value to `ENABLED`. Valid values are `ENABLED` or `PAUSED`.
     */
    @JvmName("beglrgithaylecuq")
    public suspend fun status(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value A map of key-value pairs that specifies the tags to associate with the account in Amazon Macie.
     */
    @JvmName("kidjfywewohwgmab")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A map of key-value pairs that specifies the tags to associate with the account in Amazon Macie.
     */
    @JvmName("cyprtjeebwtufbvs")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): MemberArgs = MemberArgs(
        accountId = accountId,
        email = email,
        invitationDisableEmailNotification = invitationDisableEmailNotification,
        invitationMessage = invitationMessage,
        invite = invite,
        status = status,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy