azure logo
Azure Classic v5.38.0, Mar 21 23

azure.securitycenter.Contact

Manages the subscription’s Security Center Contact.

NOTE: Owner access permission is required.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.SecurityCenter.Contact("example", new()
    {
        AlertNotifications = true,
        AlertsToAdmins = true,
        Email = "contact@example.com",
        Phone = "+1-555-555-5555",
    });

});
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{
			AlertNotifications: pulumi.Bool(true),
			AlertsToAdmins:     pulumi.Bool(true),
			Email:              pulumi.String("contact@example.com"),
			Phone:              pulumi.String("+1-555-555-5555"),
		})
		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.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()        
            .alertNotifications(true)
            .alertsToAdmins(true)
            .email("contact@example.com")
            .phone("+1-555-555-5555")
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example = azure.securitycenter.Contact("example",
    alert_notifications=True,
    alerts_to_admins=True,
    email="contact@example.com",
    phone="+1-555-555-5555")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.securitycenter.Contact("example", {
    alertNotifications: true,
    alertsToAdmins: true,
    email: "contact@example.com",
    phone: "+1-555-555-5555",
});
resources:
  example:
    type: azure:securitycenter:Contact
    properties:
      alertNotifications: true
      alertsToAdmins: true
      email: contact@example.com
      phone: +1-555-555-5555

Create Contact Resource

new Contact(name: string, args: ContactArgs, opts?: CustomResourceOptions);
@overload
def Contact(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            alert_notifications: Optional[bool] = None,
            alerts_to_admins: Optional[bool] = None,
            email: Optional[str] = None,
            name: Optional[str] = None,
            phone: Optional[str] = None)
@overload
def Contact(resource_name: str,
            args: ContactArgs,
            opts: Optional[ResourceOptions] = None)
func NewContact(ctx *Context, name string, args ContactArgs, opts ...ResourceOption) (*Contact, error)
public Contact(string name, ContactArgs args, CustomResourceOptions? opts = null)
public Contact(String name, ContactArgs args)
public Contact(String name, ContactArgs args, CustomResourceOptions options)
type: azure:securitycenter:Contact
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ContactArgs
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 ContactArgs
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 ContactArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ContactArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ContactArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Contact Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Contact resource accepts the following input properties:

AlertNotifications bool

Whether to send security alerts notifications to the security contact.

AlertsToAdmins bool

Whether to send security alerts notifications to subscription admins.

Email string

The email of the Security Center Contact.

Name string

The name of the Security Center Contact. Defaults to default1.

Phone string

The phone number of the Security Center Contact.

AlertNotifications bool

Whether to send security alerts notifications to the security contact.

AlertsToAdmins bool

Whether to send security alerts notifications to subscription admins.

Email string

The email of the Security Center Contact.

Name string

The name of the Security Center Contact. Defaults to default1.

Phone string

The phone number of the Security Center Contact.

alertNotifications Boolean

Whether to send security alerts notifications to the security contact.

alertsToAdmins Boolean

Whether to send security alerts notifications to subscription admins.

email String

The email of the Security Center Contact.

name String

The name of the Security Center Contact. Defaults to default1.

phone String

The phone number of the Security Center Contact.

alertNotifications boolean

Whether to send security alerts notifications to the security contact.

alertsToAdmins boolean

Whether to send security alerts notifications to subscription admins.

email string

The email of the Security Center Contact.

name string

The name of the Security Center Contact. Defaults to default1.

phone string

The phone number of the Security Center Contact.

alert_notifications bool

Whether to send security alerts notifications to the security contact.

alerts_to_admins bool

Whether to send security alerts notifications to subscription admins.

email str

The email of the Security Center Contact.

name str

The name of the Security Center Contact. Defaults to default1.

phone str

The phone number of the Security Center Contact.

alertNotifications Boolean

Whether to send security alerts notifications to the security contact.

alertsToAdmins Boolean

Whether to send security alerts notifications to subscription admins.

email String

The email of the Security Center Contact.

name String

The name of the Security Center Contact. Defaults to default1.

phone String

The phone number of the Security Center Contact.

Outputs

All input properties are implicitly available as output properties. Additionally, the Contact resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Contact Resource

Get an existing Contact resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ContactState, opts?: CustomResourceOptions): Contact
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        alert_notifications: Optional[bool] = None,
        alerts_to_admins: Optional[bool] = None,
        email: Optional[str] = None,
        name: Optional[str] = None,
        phone: Optional[str] = None) -> Contact
func GetContact(ctx *Context, name string, id IDInput, state *ContactState, opts ...ResourceOption) (*Contact, error)
public static Contact Get(string name, Input<string> id, ContactState? state, CustomResourceOptions? opts = null)
public static Contact get(String name, Output<String> id, ContactState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AlertNotifications bool

Whether to send security alerts notifications to the security contact.

AlertsToAdmins bool

Whether to send security alerts notifications to subscription admins.

Email string

The email of the Security Center Contact.

Name string

The name of the Security Center Contact. Defaults to default1.

Phone string

The phone number of the Security Center Contact.

AlertNotifications bool

Whether to send security alerts notifications to the security contact.

AlertsToAdmins bool

Whether to send security alerts notifications to subscription admins.

Email string

The email of the Security Center Contact.

Name string

The name of the Security Center Contact. Defaults to default1.

Phone string

The phone number of the Security Center Contact.

alertNotifications Boolean

Whether to send security alerts notifications to the security contact.

alertsToAdmins Boolean

Whether to send security alerts notifications to subscription admins.

email String

The email of the Security Center Contact.

name String

The name of the Security Center Contact. Defaults to default1.

phone String

The phone number of the Security Center Contact.

alertNotifications boolean

Whether to send security alerts notifications to the security contact.

alertsToAdmins boolean

Whether to send security alerts notifications to subscription admins.

email string

The email of the Security Center Contact.

name string

The name of the Security Center Contact. Defaults to default1.

phone string

The phone number of the Security Center Contact.

alert_notifications bool

Whether to send security alerts notifications to the security contact.

alerts_to_admins bool

Whether to send security alerts notifications to subscription admins.

email str

The email of the Security Center Contact.

name str

The name of the Security Center Contact. Defaults to default1.

phone str

The phone number of the Security Center Contact.

alertNotifications Boolean

Whether to send security alerts notifications to the security contact.

alertsToAdmins Boolean

Whether to send security alerts notifications to subscription admins.

email String

The email of the Security Center Contact.

name String

The name of the Security Center Contact. Defaults to default1.

phone String

The phone number of the Security Center Contact.

Import

The contact can be imported using the resource id, e.g.

 $ pulumi import azure:securitycenter/contact:Contact example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/securityContacts/default1

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.