We recommend using Azure Native.
azure.securitycenter.Contact
Explore with Pulumi AI
Manages the subscription’s Security Center Contact.
NOTE: Owner access permission is required.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.securitycenter.Contact("example", {
name: "contact",
email: "contact@example.com",
phone: "+1-555-555-5555",
alertNotifications: true,
alertsToAdmins: true,
});
import pulumi
import pulumi_azure as azure
example = azure.securitycenter.Contact("example",
name="contact",
email="contact@example.com",
phone="+1-555-555-5555",
alert_notifications=True,
alerts_to_admins=True)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/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("contact@example.com"),
Phone: pulumi.String("+1-555-555-5555"),
AlertNotifications: pulumi.Bool(true),
AlertsToAdmins: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
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 = "contact@example.com",
Phone = "+1-555-555-5555",
AlertNotifications = true,
AlertsToAdmins = true,
});
});
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("contact@example.com")
.phone("+1-555-555-5555")
.alertNotifications(true)
.alertsToAdmins(true)
.build());
}
}
resources:
example:
type: azure:securitycenter:Contact
properties:
name: contact
email: contact@example.com
phone: +1-555-555-5555
alertNotifications: true
alertsToAdmins: true
Create Contact Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Contact(name: string, args: ContactArgs, opts?: CustomResourceOptions);
@overload
def Contact(resource_name: str,
args: ContactArgs,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var azureContactResource = new Azure.SecurityCenter.Contact("azureContactResource", new()
{
AlertNotifications = false,
AlertsToAdmins = false,
Email = "string",
Name = "string",
Phone = "string",
});
example, err := securitycenter.NewContact(ctx, "azureContactResource", &securitycenter.ContactArgs{
AlertNotifications: pulumi.Bool(false),
AlertsToAdmins: pulumi.Bool(false),
Email: pulumi.String("string"),
Name: pulumi.String("string"),
Phone: pulumi.String("string"),
})
var azureContactResource = new Contact("azureContactResource", ContactArgs.builder()
.alertNotifications(false)
.alertsToAdmins(false)
.email("string")
.name("string")
.phone("string")
.build());
azure_contact_resource = azure.securitycenter.Contact("azureContactResource",
alert_notifications=False,
alerts_to_admins=False,
email="string",
name="string",
phone="string")
const azureContactResource = new azure.securitycenter.Contact("azureContactResource", {
alertNotifications: false,
alertsToAdmins: false,
email: "string",
name: "string",
phone: "string",
});
type: azure:securitycenter:Contact
properties:
alertNotifications: false
alertsToAdmins: false
email: string
name: string
phone: string
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:
- Alert
Notifications bool - Whether to send security alerts notifications to the security contact.
- Alerts
To boolAdmins - 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 boolAdmins - 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 Boolean - Whether to send security alerts notifications to the security contact.
- alerts
To BooleanAdmins - 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 boolean - Whether to send security alerts notifications to the security contact.
- alerts
To booleanAdmins - 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_ booladmins - 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.
- alert
Notifications Boolean - Whether to send security alerts notifications to the security contact.
- alerts
To BooleanAdmins - 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.
- Alert
Notifications bool - Whether to send security alerts notifications to the security contact.
- Alerts
To boolAdmins - 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 boolAdmins - 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 Boolean - Whether to send security alerts notifications to the security contact.
- alerts
To BooleanAdmins - 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 boolean - Whether to send security alerts notifications to the security contact.
- alerts
To booleanAdmins - 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_ booladmins - 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.
- alert
Notifications Boolean - Whether to send security alerts notifications to the security contact.
- alerts
To BooleanAdmins - 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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.