azure-native.security.SecurityContact
Explore with Pulumi AI
Contact details and configurations for notifications coming from Microsoft Defender for Cloud. Azure REST API version: 2020-01-01-preview. Prior API version in Azure Native 1.x: 2020-01-01-preview.
Other available API versions: 2017-08-01-preview, 2023-12-01-preview.
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()
{
AlertNotifications = new AzureNative.Security.Inputs.SecurityContactPropertiesAlertNotificationsArgs
{
MinimalSeverity = AzureNative.Security.MinimalSeverity.Low,
State = AzureNative.Security.State.On,
},
Emails = "john@contoso.com;jane@contoso.com",
NotificationsByRole = new AzureNative.Security.Inputs.SecurityContactPropertiesNotificationsByRoleArgs
{
Roles = new[]
{
AzureNative.Security.Roles.Owner,
},
State = AzureNative.Security.State.On,
},
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{
AlertNotifications: &security.SecurityContactPropertiesAlertNotificationsArgs{
MinimalSeverity: pulumi.String(security.MinimalSeverityLow),
State: pulumi.String(security.StateOn),
},
Emails: pulumi.String("john@contoso.com;jane@contoso.com"),
NotificationsByRole: &security.SecurityContactPropertiesNotificationsByRoleArgs{
Roles: pulumi.StringArray{
pulumi.String(security.RolesOwner),
},
State: pulumi.String(security.StateOn),
},
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.SecurityContactPropertiesAlertNotificationsArgs;
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()
.alertNotifications(SecurityContactPropertiesAlertNotificationsArgs.builder()
.minimalSeverity("Low")
.state("On")
.build())
.emails("john@contoso.com;jane@contoso.com")
.notificationsByRole(SecurityContactPropertiesNotificationsByRoleArgs.builder()
.roles("Owner")
.state("On")
.build())
.phone("(214)275-4038")
.securityContactName("default")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
security_contact = azure_native.security.SecurityContact("securityContact",
alert_notifications={
"minimal_severity": azure_native.security.MinimalSeverity.LOW,
"state": azure_native.security.State.ON,
},
emails="john@contoso.com;jane@contoso.com",
notifications_by_role={
"roles": [azure_native.security.Roles.OWNER],
"state": azure_native.security.State.ON,
},
phone="(214)275-4038",
security_contact_name="default")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const securityContact = new azure_native.security.SecurityContact("securityContact", {
alertNotifications: {
minimalSeverity: azure_native.security.MinimalSeverity.Low,
state: azure_native.security.State.On,
},
emails: "john@contoso.com;jane@contoso.com",
notificationsByRole: {
roles: [azure_native.security.Roles.Owner],
state: azure_native.security.State.On,
},
phone: "(214)275-4038",
securityContactName: "default",
});
resources:
securityContact:
type: azure-native:security:SecurityContact
properties:
alertNotifications:
minimalSeverity: Low
state: On
emails: john@contoso.com;jane@contoso.com
notificationsByRole:
roles:
- Owner
state: On
phone: (214)275-4038
securityContactName: default
Create SecurityContact Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecurityContact(name: string, args?: SecurityContactArgs, opts?: CustomResourceOptions);
@overload
def SecurityContact(resource_name: str,
args: Optional[SecurityContactArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def SecurityContact(resource_name: str,
opts: Optional[ResourceOptions] = None,
alert_notifications: Optional[SecurityContactPropertiesAlertNotificationsArgs] = None,
emails: Optional[str] = None,
notifications_by_role: Optional[SecurityContactPropertiesNotificationsByRoleArgs] = None,
phone: Optional[str] = None,
security_contact_name: Optional[str] = None)
func NewSecurityContact(ctx *Context, name string, args *SecurityContactArgs, opts ...ResourceOption) (*SecurityContact, error)
public SecurityContact(string name, SecurityContactArgs? args = null, CustomResourceOptions? opts = null)
public SecurityContact(String name, SecurityContactArgs args)
public SecurityContact(String name, SecurityContactArgs args, CustomResourceOptions options)
type: azure-native:security:SecurityContact
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SecurityContactArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SecurityContactArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecurityContactArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityContactArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityContactArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var securityContactResource = new AzureNative.Security.SecurityContact("securityContactResource", new()
{
AlertNotifications = new AzureNative.Security.Inputs.SecurityContactPropertiesAlertNotificationsArgs
{
MinimalSeverity = "string",
State = "string",
},
Emails = "string",
NotificationsByRole = new AzureNative.Security.Inputs.SecurityContactPropertiesNotificationsByRoleArgs
{
Roles = new[]
{
"string",
},
State = "string",
},
Phone = "string",
SecurityContactName = "string",
});
example, err := security.NewSecurityContact(ctx, "securityContactResource", &security.SecurityContactArgs{
AlertNotifications: &security.SecurityContactPropertiesAlertNotificationsArgs{
MinimalSeverity: pulumi.String("string"),
State: pulumi.String("string"),
},
Emails: pulumi.String("string"),
NotificationsByRole: &security.SecurityContactPropertiesNotificationsByRoleArgs{
Roles: pulumi.StringArray{
pulumi.String("string"),
},
State: pulumi.String("string"),
},
Phone: pulumi.String("string"),
SecurityContactName: pulumi.String("string"),
})
var securityContactResource = new SecurityContact("securityContactResource", SecurityContactArgs.builder()
.alertNotifications(SecurityContactPropertiesAlertNotificationsArgs.builder()
.minimalSeverity("string")
.state("string")
.build())
.emails("string")
.notificationsByRole(SecurityContactPropertiesNotificationsByRoleArgs.builder()
.roles("string")
.state("string")
.build())
.phone("string")
.securityContactName("string")
.build());
security_contact_resource = azure_native.security.SecurityContact("securityContactResource",
alert_notifications={
"minimal_severity": "string",
"state": "string",
},
emails="string",
notifications_by_role={
"roles": ["string"],
"state": "string",
},
phone="string",
security_contact_name="string")
const securityContactResource = new azure_native.security.SecurityContact("securityContactResource", {
alertNotifications: {
minimalSeverity: "string",
state: "string",
},
emails: "string",
notificationsByRole: {
roles: ["string"],
state: "string",
},
phone: "string",
securityContactName: "string",
});
type: azure-native:security:SecurityContact
properties:
alertNotifications:
minimalSeverity: string
state: string
emails: string
notificationsByRole:
roles:
- string
state: string
phone: string
securityContactName: string
SecurityContact Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SecurityContact resource accepts the following input properties:
- Alert
Notifications Pulumi.Azure Native. Security. Inputs. Security Contact Properties Alert Notifications - Defines whether to send email notifications about new security alerts
- Emails string
- List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact.
- Notifications
By Pulumi.Role Azure Native. Security. Inputs. Security Contact Properties Notifications By Role - Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription.
- Phone string
- The security contact's phone number
- Security
Contact stringName - Name of the security contact object
- Alert
Notifications SecurityContact Properties Alert Notifications Args - Defines whether to send email notifications about new security alerts
- Emails string
- List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact.
- Notifications
By SecurityRole Contact Properties Notifications By Role Args - Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription.
- Phone string
- The security contact's phone number
- Security
Contact stringName - Name of the security contact object
- alert
Notifications SecurityContact Properties Alert Notifications - Defines whether to send email notifications about new security alerts
- emails String
- List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact.
- notifications
By SecurityRole Contact Properties Notifications By Role - Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription.
- phone String
- The security contact's phone number
- security
Contact StringName - Name of the security contact object
- alert
Notifications SecurityContact Properties Alert Notifications - Defines whether to send email notifications about new security alerts
- emails string
- List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact.
- notifications
By SecurityRole Contact Properties Notifications By Role - Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription.
- phone string
- The security contact's phone number
- security
Contact stringName - Name of the security contact object
- alert_
notifications SecurityContact Properties Alert Notifications Args - Defines whether to send email notifications about new security alerts
- emails str
- List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact.
- notifications_
by_ Securityrole Contact Properties Notifications By Role Args - Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription.
- phone str
- The security contact's phone number
- security_
contact_ strname - Name of the security contact object
- alert
Notifications Property Map - Defines whether to send email notifications about new security alerts
- emails String
- List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact.
- notifications
By Property MapRole - Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription.
- phone String
- The security contact's phone number
- security
Contact StringName - Name of the security contact object
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityContact resource produces the following output properties:
Supporting Types
MinimalSeverity, MinimalSeverityArgs
- High
- HighGet notifications on new alerts with High severity
- Medium
- MediumGet notifications on new alerts with medium or high severity
- Low
- LowDon't get notifications on new alerts with low, medium or high severity
- Minimal
Severity High - HighGet notifications on new alerts with High severity
- Minimal
Severity Medium - MediumGet notifications on new alerts with medium or high severity
- Minimal
Severity Low - LowDon't get notifications on new alerts with low, medium or high severity
- High
- HighGet notifications on new alerts with High severity
- Medium
- MediumGet notifications on new alerts with medium or high severity
- Low
- LowDon't get notifications on new alerts with low, medium or high severity
- High
- HighGet notifications on new alerts with High severity
- Medium
- MediumGet notifications on new alerts with medium or high severity
- Low
- LowDon't get notifications on new alerts with low, medium or high severity
- HIGH
- HighGet notifications on new alerts with High severity
- MEDIUM
- MediumGet notifications on new alerts with medium or high severity
- LOW
- LowDon't get notifications on new alerts with low, medium or high severity
- "High"
- HighGet notifications on new alerts with High severity
- "Medium"
- MediumGet notifications on new alerts with medium or high severity
- "Low"
- LowDon't get notifications on new alerts with low, medium or high severity
Roles, RolesArgs
- Account
Admin - AccountAdminIf enabled, send notification on new alerts to the account admins
- Service
Admin - ServiceAdminIf enabled, send notification on new alerts to the service admins
- Owner
- OwnerIf enabled, send notification on new alerts to the subscription owners
- Contributor
- ContributorIf enabled, send notification on new alerts to the subscription contributors
- Roles
Account Admin - AccountAdminIf enabled, send notification on new alerts to the account admins
- Roles
Service Admin - ServiceAdminIf enabled, send notification on new alerts to the service admins
- Roles
Owner - OwnerIf enabled, send notification on new alerts to the subscription owners
- Roles
Contributor - ContributorIf enabled, send notification on new alerts to the subscription contributors
- Account
Admin - AccountAdminIf enabled, send notification on new alerts to the account admins
- Service
Admin - ServiceAdminIf enabled, send notification on new alerts to the service admins
- Owner
- OwnerIf enabled, send notification on new alerts to the subscription owners
- Contributor
- ContributorIf enabled, send notification on new alerts to the subscription contributors
- Account
Admin - AccountAdminIf enabled, send notification on new alerts to the account admins
- Service
Admin - ServiceAdminIf enabled, send notification on new alerts to the service admins
- Owner
- OwnerIf enabled, send notification on new alerts to the subscription owners
- Contributor
- ContributorIf enabled, send notification on new alerts to the subscription contributors
- ACCOUNT_ADMIN
- AccountAdminIf enabled, send notification on new alerts to the account admins
- SERVICE_ADMIN
- ServiceAdminIf enabled, send notification on new alerts to the service admins
- OWNER
- OwnerIf enabled, send notification on new alerts to the subscription owners
- CONTRIBUTOR
- ContributorIf enabled, send notification on new alerts to the subscription contributors
- "Account
Admin" - AccountAdminIf enabled, send notification on new alerts to the account admins
- "Service
Admin" - ServiceAdminIf enabled, send notification on new alerts to the service admins
- "Owner"
- OwnerIf enabled, send notification on new alerts to the subscription owners
- "Contributor"
- ContributorIf enabled, send notification on new alerts to the subscription contributors
SecurityContactPropertiesAlertNotifications, SecurityContactPropertiesAlertNotificationsArgs
- Minimal
Severity string | Pulumi.Azure Native. Security. Minimal Severity - Defines the minimal alert severity which will be sent as email notifications
- State
string | Pulumi.
Azure Native. Security. State - Defines if email notifications will be sent about new security alerts
- Minimal
Severity string | MinimalSeverity - Defines the minimal alert severity which will be sent as email notifications
- State string | State
- Defines if email notifications will be sent about new security alerts
- minimal
Severity String | MinimalSeverity - Defines the minimal alert severity which will be sent as email notifications
- state String | State
- Defines if email notifications will be sent about new security alerts
- minimal
Severity string | MinimalSeverity - Defines the minimal alert severity which will be sent as email notifications
- state string | State
- Defines if email notifications will be sent about new security alerts
- minimal_
severity str | MinimalSeverity - Defines the minimal alert severity which will be sent as email notifications
- state str | State
- Defines if email notifications will be sent about new security alerts
- minimal
Severity String | "High" | "Medium" | "Low" - Defines the minimal alert severity which will be sent as email notifications
- state String | "On" | "Off"
- Defines if email notifications will be sent about new security alerts
SecurityContactPropertiesNotificationsByRole, SecurityContactPropertiesNotificationsByRoleArgs
- Roles
List<Union<string, Pulumi.
Azure Native. Security. Roles>> - Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud. List of allowed RBAC roles:
- State
string | Pulumi.
Azure Native. Security. State - Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with specific RBAC roles on the subscription.
- roles List<Either<String,Roles>>
- Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud. List of allowed RBAC roles:
- state String | State
- Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with specific RBAC roles on the subscription.
- roles Sequence[Union[str, Roles]]
- Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud. List of allowed RBAC roles:
- state str | State
- Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with specific RBAC roles on the subscription.
- roles
List<String | "Account
Admin" | "Service Admin" | "Owner" | "Contributor"> - Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud. List of allowed RBAC roles:
- state String | "On" | "Off"
- Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with specific RBAC roles on the subscription.
SecurityContactPropertiesResponseAlertNotifications, SecurityContactPropertiesResponseAlertNotificationsArgs
- Minimal
Severity string - Defines the minimal alert severity which will be sent as email notifications
- State string
- Defines if email notifications will be sent about new security alerts
- Minimal
Severity string - Defines the minimal alert severity which will be sent as email notifications
- State string
- Defines if email notifications will be sent about new security alerts
- minimal
Severity String - Defines the minimal alert severity which will be sent as email notifications
- state String
- Defines if email notifications will be sent about new security alerts
- minimal
Severity string - Defines the minimal alert severity which will be sent as email notifications
- state string
- Defines if email notifications will be sent about new security alerts
- minimal_
severity str - Defines the minimal alert severity which will be sent as email notifications
- state str
- Defines if email notifications will be sent about new security alerts
- minimal
Severity String - Defines the minimal alert severity which will be sent as email notifications
- state String
- Defines if email notifications will be sent about new security alerts
SecurityContactPropertiesResponseNotificationsByRole, SecurityContactPropertiesResponseNotificationsByRoleArgs
State, StateArgs
- On
- OnSend notification on new alerts to the subscription's admins
- Off
- OffDon't send notification on new alerts to the subscription's admins
- State
On - OnSend notification on new alerts to the subscription's admins
- State
Off - OffDon't send notification on new alerts to the subscription's admins
- On
- OnSend notification on new alerts to the subscription's admins
- Off
- OffDon't send notification on new alerts to the subscription's admins
- On
- OnSend notification on new alerts to the subscription's admins
- Off
- OffDon't send notification on new alerts to the subscription's admins
- ON
- OnSend notification on new alerts to the subscription's admins
- OFF
- OffDon't send notification on new alerts to the subscription's admins
- "On"
- OnSend notification on new alerts to the subscription's admins
- "Off"
- OffDon't send notification on new alerts to the subscription's admins
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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0