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

com.pulumi.aws.ssmcontacts.kotlin.ContactArgs.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.ssmcontacts.kotlin

import com.pulumi.aws.ssmcontacts.ContactArgs.builder
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

/**
 * Resource for managing an AWS SSM Contact.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.ssmcontacts.Contact("example", {
 *     alias: "alias",
 *     type: "PERSONAL",
 * }, {
 *     dependsOn: [exampleAwsSsmincidentsReplicationSet],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.ssmcontacts.Contact("example",
 *     alias="alias",
 *     type="PERSONAL",
 *     opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_replication_set]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.SsmContacts.Contact("example", new()
 *     {
 *         Alias = "alias",
 *         Type = "PERSONAL",
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             exampleAwsSsmincidentsReplicationSet,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssmcontacts"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ssmcontacts.NewContact(ctx, "example", &ssmcontacts.ContactArgs{
 * 			Alias: pulumi.String("alias"),
 * 			Type:  pulumi.String("PERSONAL"),
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			exampleAwsSsmincidentsReplicationSet,
 * 		}))
 * 		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.ssmcontacts.Contact;
 * import com.pulumi.aws.ssmcontacts.ContactArgs;
 * 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 Contact("example", ContactArgs.builder()
 *             .alias("alias")
 *             .type("PERSONAL")
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(exampleAwsSsmincidentsReplicationSet)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:ssmcontacts:Contact
 *     properties:
 *       alias: alias
 *       type: PERSONAL
 *     options:
 *       dependson:
 *         - ${exampleAwsSsmincidentsReplicationSet}
 * ```
 * 
 * ### Usage With All Fields
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.ssmcontacts.Contact("example", {
 *     alias: "alias",
 *     displayName: "displayName",
 *     type: "ESCALATION",
 *     tags: {
 *         key: "value",
 *     },
 * }, {
 *     dependsOn: [exampleAwsSsmincidentsReplicationSet],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.ssmcontacts.Contact("example",
 *     alias="alias",
 *     display_name="displayName",
 *     type="ESCALATION",
 *     tags={
 *         "key": "value",
 *     },
 *     opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_replication_set]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.SsmContacts.Contact("example", new()
 *     {
 *         Alias = "alias",
 *         DisplayName = "displayName",
 *         Type = "ESCALATION",
 *         Tags =
 *         {
 *             { "key", "value" },
 *         },
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             exampleAwsSsmincidentsReplicationSet,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssmcontacts"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ssmcontacts.NewContact(ctx, "example", &ssmcontacts.ContactArgs{
 * 			Alias:       pulumi.String("alias"),
 * 			DisplayName: pulumi.String("displayName"),
 * 			Type:        pulumi.String("ESCALATION"),
 * 			Tags: pulumi.StringMap{
 * 				"key": pulumi.String("value"),
 * 			},
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			exampleAwsSsmincidentsReplicationSet,
 * 		}))
 * 		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.ssmcontacts.Contact;
 * import com.pulumi.aws.ssmcontacts.ContactArgs;
 * 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 Contact("example", ContactArgs.builder()
 *             .alias("alias")
 *             .displayName("displayName")
 *             .type("ESCALATION")
 *             .tags(Map.of("key", "value"))
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(exampleAwsSsmincidentsReplicationSet)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:ssmcontacts:Contact
 *     properties:
 *       alias: alias
 *       displayName: displayName
 *       type: ESCALATION
 *       tags:
 *         key: value
 *     options:
 *       dependson:
 *         - ${exampleAwsSsmincidentsReplicationSet}
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import SSM Contact using the `ARN`. For example:
 * ```sh
 * $ pulumi import aws:ssmcontacts/contact:Contact example {ARNValue}
 * ```
 * @property alias A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (`_`), and hyphens (`-`).
 * @property displayName Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (`_`), hyphens (`-`), periods (`.`), and spaces.
 * @property tags Map of tags to assign to the resource.
 * @property type The type of contact engaged. A single contact is type PERSONAL and an escalation
 * plan is type ESCALATION.
 * The following arguments are optional:
 */
public data class ContactArgs(
    public val alias: Output? = null,
    public val displayName: Output? = null,
    public val tags: Output>? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ssmcontacts.ContactArgs =
        com.pulumi.aws.ssmcontacts.ContactArgs.builder()
            .alias(alias?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ContactArgs].
 */
@PulumiTagMarker
public class ContactArgsBuilder internal constructor() {
    private var alias: Output? = null

    private var displayName: Output? = null

    private var tags: Output>? = null

    private var type: Output? = null

    /**
     * @param value A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (`_`), and hyphens (`-`).
     */
    @JvmName("prtbcxowidshbjnm")
    public suspend fun alias(`value`: Output) {
        this.alias = value
    }

    /**
     * @param value Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (`_`), hyphens (`-`), periods (`.`), and spaces.
     */
    @JvmName("ndnfyaqvesklyeob")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Map of tags to assign to the resource.
     */
    @JvmName("hqlajeufnqgrhytl")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The type of contact engaged. A single contact is type PERSONAL and an escalation
     * plan is type ESCALATION.
     * The following arguments are optional:
     */
    @JvmName("cnfcpklqitgqjxac")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (`_`), and hyphens (`-`).
     */
    @JvmName("obkgkmebprwyboyd")
    public suspend fun alias(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alias = mapped
    }

    /**
     * @param value Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (`_`), hyphens (`-`), periods (`.`), and spaces.
     */
    @JvmName("vvbwelliljdtocdd")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

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

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

    /**
     * @param value The type of contact engaged. A single contact is type PERSONAL and an escalation
     * plan is type ESCALATION.
     * The following arguments are optional:
     */
    @JvmName("jfikgyyrdswkweix")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ContactArgs = ContactArgs(
        alias = alias,
        displayName = displayName,
        tags = tags,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy