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

com.pulumi.azure.securitycenter.kotlin.ContactArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.securitycenter.kotlin

import com.pulumi.azure.securitycenter.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Manages the subscription's Security Center Contact.
 * > **NOTE:** Owner access permission is required.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.securitycenter.Contact("example", {
 *     name: "contact",
 *     email: "[email protected]",
 *     phone: "+1-555-555-5555",
 *     alertNotifications: true,
 *     alertsToAdmins: true,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.securitycenter.Contact("example",
 *     name="contact",
 *     email="[email protected]",
 *     phone="+1-555-555-5555",
 *     alert_notifications=True,
 *     alerts_to_admins=True)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.SecurityCenter.Contact("example", new()
 *     {
 *         Name = "contact",
 *         Email = "[email protected]",
 *         Phone = "+1-555-555-5555",
 *         AlertNotifications = true,
 *         AlertsToAdmins = true,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/securitycenter"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := securitycenter.NewContact(ctx, "example", &securitycenter.ContactArgs{
 * 			Name:               pulumi.String("contact"),
 * 			Email:              pulumi.String("[email protected]"),
 * 			Phone:              pulumi.String("+1-555-555-5555"),
 * 			AlertNotifications: pulumi.Bool(true),
 * 			AlertsToAdmins:     pulumi.Bool(true),
 * 		})
 * 		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.azure.securitycenter.Contact;
 * import com.pulumi.azure.securitycenter.ContactArgs;
 * 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()
 *             .name("contact")
 *             .email("[email protected]")
 *             .phone("+1-555-555-5555")
 *             .alertNotifications(true)
 *             .alertsToAdmins(true)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:securitycenter:Contact
 *     properties:
 *       name: contact
 *       email: [email protected]
 *       phone: +1-555-555-5555
 *       alertNotifications: true
 *       alertsToAdmins: true
 * ```
 * 
 * ## Import
 * The contact can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:securitycenter/contact:Contact example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/securityContacts/default1
 * ```
 * @property alertNotifications Whether to send security alerts notifications to the security contact.
 * @property alertsToAdmins Whether to send security alerts notifications to subscription admins.
 * @property email The email of the Security Center Contact.
 * @property name The name of the Security Center Contact. Defaults to `default1`.
 * @property phone The phone number of the Security Center Contact.
 */
public data class ContactArgs(
    public val alertNotifications: Output? = null,
    public val alertsToAdmins: Output? = null,
    public val email: Output? = null,
    public val name: Output? = null,
    public val phone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.securitycenter.ContactArgs =
        com.pulumi.azure.securitycenter.ContactArgs.builder()
            .alertNotifications(alertNotifications?.applyValue({ args0 -> args0 }))
            .alertsToAdmins(alertsToAdmins?.applyValue({ args0 -> args0 }))
            .email(email?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .phone(phone?.applyValue({ args0 -> args0 })).build()
}

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

    private var alertsToAdmins: Output? = null

    private var email: Output? = null

    private var name: Output? = null

    private var phone: Output? = null

    /**
     * @param value Whether to send security alerts notifications to the security contact.
     */
    @JvmName("mvfwmfubrxjgbgqk")
    public suspend fun alertNotifications(`value`: Output) {
        this.alertNotifications = value
    }

    /**
     * @param value Whether to send security alerts notifications to subscription admins.
     */
    @JvmName("ruepkgxrwxdhmdjn")
    public suspend fun alertsToAdmins(`value`: Output) {
        this.alertsToAdmins = value
    }

    /**
     * @param value The email of the Security Center Contact.
     */
    @JvmName("ehvdxlfssfrqauef")
    public suspend fun email(`value`: Output) {
        this.email = value
    }

    /**
     * @param value The name of the Security Center Contact. Defaults to `default1`.
     */
    @JvmName("oposfqpujeuitqay")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The phone number of the Security Center Contact.
     */
    @JvmName("alfedxuwgoopmfmy")
    public suspend fun phone(`value`: Output) {
        this.phone = value
    }

    /**
     * @param value Whether to send security alerts notifications to the security contact.
     */
    @JvmName("qvjpcayerqtqroxd")
    public suspend fun alertNotifications(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alertNotifications = mapped
    }

    /**
     * @param value Whether to send security alerts notifications to subscription admins.
     */
    @JvmName("ejwbarmtjnfssexi")
    public suspend fun alertsToAdmins(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alertsToAdmins = mapped
    }

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

    /**
     * @param value The name of the Security Center Contact. Defaults to `default1`.
     */
    @JvmName("laxitxkqwqgeikep")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The phone number of the Security Center Contact.
     */
    @JvmName("lnhbwuneeofbswmv")
    public suspend fun phone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.phone = mapped
    }

    internal fun build(): ContactArgs = ContactArgs(
        alertNotifications = alertNotifications,
        alertsToAdmins = alertsToAdmins,
        email = email,
        name = name,
        phone = phone,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy