SecurityContactArgs

data class SecurityContactArgs(val emails: Output<String>? = null, val isEnabled: Output<Boolean>? = null, val notificationsByRole: Output<SecurityContactPropertiesNotificationsByRoleArgs>? = null, val notificationsSources: Output<List<Either<NotificationsSourceAlertArgs, NotificationsSourceAttackPathArgs>>>? = null, val phone: Output<String>? = null, val securityContactName: Output<String>? = null) : ConvertibleToJava<SecurityContactArgs>

Contact details and configurations for notifications coming from Microsoft Defender for Cloud. Uses Azure REST API version 2023-12-01-preview. In version 2.x of the Azure Native provider, it used API version 2020-01-01-preview. Other available API versions: 2017-08-01-preview, 2020-01-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native security [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create security contact data

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var securityContact = new AzureNative.Security.SecurityContact("securityContact", new()
{
Emails = "john@contoso.com;jane@contoso.com",
IsEnabled = true,
NotificationsByRole = new AzureNative.Security.Inputs.SecurityContactPropertiesNotificationsByRoleArgs
{
Roles = new[]
{
AzureNative.Security.SecurityContactRole.Owner,
},
State = AzureNative.Security.State.On,
},
NotificationsSources =
{
new AzureNative.Security.Inputs.NotificationsSourceAttackPathArgs
{
MinimalRiskLevel = AzureNative.Security.MinimalRiskLevel.Critical,
SourceType = "AttackPath",
},
new AzureNative.Security.Inputs.NotificationsSourceAlertArgs
{
MinimalSeverity = AzureNative.Security.MinimalSeverity.Medium,
SourceType = "Alert",
},
},
Phone = "(214)275-4038",
SecurityContactName = "default",
});
});
package main
import (
security "github.com/pulumi/pulumi-azure-native-sdk/security/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := security.NewSecurityContact(ctx, "securityContact", &security.SecurityContactArgs{
Emails: pulumi.String("john@contoso.com;jane@contoso.com"),
IsEnabled: pulumi.Bool(true),
NotificationsByRole: &security.SecurityContactPropertiesNotificationsByRoleArgs{
Roles: pulumi.StringArray{
pulumi.String(security.SecurityContactRoleOwner),
},
State: pulumi.String(security.StateOn),
},
NotificationsSources: pulumi.Array{
security.NotificationsSourceAttackPath{
MinimalRiskLevel: security.MinimalRiskLevelCritical,
SourceType: "AttackPath",
},
security.NotificationsSourceAlert{
MinimalSeverity: security.MinimalSeverityMedium,
SourceType: "Alert",
},
},
Phone: pulumi.String("(214)275-4038"),
SecurityContactName: pulumi.String("default"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.security.SecurityContact;
import com.pulumi.azurenative.security.SecurityContactArgs;
import com.pulumi.azurenative.security.inputs.SecurityContactPropertiesNotificationsByRoleArgs;
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 securityContact = new SecurityContact("securityContact", SecurityContactArgs.builder()
.emails("john@contoso.com;jane@contoso.com")
.isEnabled(true)
.notificationsByRole(SecurityContactPropertiesNotificationsByRoleArgs.builder()
.roles("Owner")
.state("On")
.build())
.notificationsSources(
NotificationsSourceAttackPathArgs.builder()
.minimalRiskLevel("Critical")
.sourceType("AttackPath")
.build(),
NotificationsSourceAlertArgs.builder()
.minimalSeverity("Medium")
.sourceType("Alert")
.build())
.phone("(214)275-4038")
.securityContactName("default")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:security:SecurityContact default /subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}

Constructors

Link copied to clipboard
constructor(emails: Output<String>? = null, isEnabled: Output<Boolean>? = null, notificationsByRole: Output<SecurityContactPropertiesNotificationsByRoleArgs>? = null, notificationsSources: Output<List<Either<NotificationsSourceAlertArgs, NotificationsSourceAttackPathArgs>>>? = null, phone: Output<String>? = null, securityContactName: Output<String>? = null)

Properties

Link copied to clipboard
val emails: Output<String>? = null

List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact.

Link copied to clipboard
val isEnabled: Output<Boolean>? = null

Indicates whether the security contact is enabled.

Link copied to clipboard

Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription.

Link copied to clipboard

A collection of sources types which evaluate the email notification.

Link copied to clipboard
val phone: Output<String>? = null

The security contact's phone number

Link copied to clipboard
val securityContactName: Output<String>? = null

Name of the security contact object

Functions

Link copied to clipboard
open override fun toJava(): SecurityContactArgs