We recommend using Azure Native.
azure.communication.ServiceEmailDomainAssociation
Explore with Pulumi AI
Manages a communication service email domain association.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "group1",
location: "West Europe",
});
const exampleService = new azure.communication.Service("example", {
name: "CommunicationService1",
resourceGroupName: example.name,
dataLocation: "United States",
});
const exampleEmailService = new azure.communication.EmailService("example", {
name: "emailCommunicationService1",
resourceGroupName: example.name,
dataLocation: "United States",
});
const exampleEmailServiceDomain = new azure.communication.EmailServiceDomain("example", {
name: "AzureManagedDomain",
emailServiceId: exampleEmailService.id,
domainManagement: "AzureManaged",
});
const exampleServiceEmailDomainAssociation = new azure.communication.ServiceEmailDomainAssociation("example", {
communicationServiceId: exampleService.id,
emailServiceDomainId: exampleEmailServiceDomain.id,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="group1",
location="West Europe")
example_service = azure.communication.Service("example",
name="CommunicationService1",
resource_group_name=example.name,
data_location="United States")
example_email_service = azure.communication.EmailService("example",
name="emailCommunicationService1",
resource_group_name=example.name,
data_location="United States")
example_email_service_domain = azure.communication.EmailServiceDomain("example",
name="AzureManagedDomain",
email_service_id=example_email_service.id,
domain_management="AzureManaged")
example_service_email_domain_association = azure.communication.ServiceEmailDomainAssociation("example",
communication_service_id=example_service.id,
email_service_domain_id=example_email_service_domain.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/communication"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("group1"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleService, err := communication.NewService(ctx, "example", &communication.ServiceArgs{
Name: pulumi.String("CommunicationService1"),
ResourceGroupName: example.Name,
DataLocation: pulumi.String("United States"),
})
if err != nil {
return err
}
exampleEmailService, err := communication.NewEmailService(ctx, "example", &communication.EmailServiceArgs{
Name: pulumi.String("emailCommunicationService1"),
ResourceGroupName: example.Name,
DataLocation: pulumi.String("United States"),
})
if err != nil {
return err
}
exampleEmailServiceDomain, err := communication.NewEmailServiceDomain(ctx, "example", &communication.EmailServiceDomainArgs{
Name: pulumi.String("AzureManagedDomain"),
EmailServiceId: exampleEmailService.ID(),
DomainManagement: pulumi.String("AzureManaged"),
})
if err != nil {
return err
}
_, err = communication.NewServiceEmailDomainAssociation(ctx, "example", &communication.ServiceEmailDomainAssociationArgs{
CommunicationServiceId: exampleService.ID(),
EmailServiceDomainId: exampleEmailServiceDomain.ID(),
})
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.Core.ResourceGroup("example", new()
{
Name = "group1",
Location = "West Europe",
});
var exampleService = new Azure.Communication.Service("example", new()
{
Name = "CommunicationService1",
ResourceGroupName = example.Name,
DataLocation = "United States",
});
var exampleEmailService = new Azure.Communication.EmailService("example", new()
{
Name = "emailCommunicationService1",
ResourceGroupName = example.Name,
DataLocation = "United States",
});
var exampleEmailServiceDomain = new Azure.Communication.EmailServiceDomain("example", new()
{
Name = "AzureManagedDomain",
EmailServiceId = exampleEmailService.Id,
DomainManagement = "AzureManaged",
});
var exampleServiceEmailDomainAssociation = new Azure.Communication.ServiceEmailDomainAssociation("example", new()
{
CommunicationServiceId = exampleService.Id,
EmailServiceDomainId = exampleEmailServiceDomain.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.communication.Service;
import com.pulumi.azure.communication.ServiceArgs;
import com.pulumi.azure.communication.EmailService;
import com.pulumi.azure.communication.EmailServiceArgs;
import com.pulumi.azure.communication.EmailServiceDomain;
import com.pulumi.azure.communication.EmailServiceDomainArgs;
import com.pulumi.azure.communication.ServiceEmailDomainAssociation;
import com.pulumi.azure.communication.ServiceEmailDomainAssociationArgs;
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 ResourceGroup("example", ResourceGroupArgs.builder()
.name("group1")
.location("West Europe")
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.name("CommunicationService1")
.resourceGroupName(example.name())
.dataLocation("United States")
.build());
var exampleEmailService = new EmailService("exampleEmailService", EmailServiceArgs.builder()
.name("emailCommunicationService1")
.resourceGroupName(example.name())
.dataLocation("United States")
.build());
var exampleEmailServiceDomain = new EmailServiceDomain("exampleEmailServiceDomain", EmailServiceDomainArgs.builder()
.name("AzureManagedDomain")
.emailServiceId(exampleEmailService.id())
.domainManagement("AzureManaged")
.build());
var exampleServiceEmailDomainAssociation = new ServiceEmailDomainAssociation("exampleServiceEmailDomainAssociation", ServiceEmailDomainAssociationArgs.builder()
.communicationServiceId(exampleService.id())
.emailServiceDomainId(exampleEmailServiceDomain.id())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: group1
location: West Europe
exampleService:
type: azure:communication:Service
name: example
properties:
name: CommunicationService1
resourceGroupName: ${example.name}
dataLocation: United States
exampleEmailService:
type: azure:communication:EmailService
name: example
properties:
name: emailCommunicationService1
resourceGroupName: ${example.name}
dataLocation: United States
exampleEmailServiceDomain:
type: azure:communication:EmailServiceDomain
name: example
properties:
name: AzureManagedDomain
emailServiceId: ${exampleEmailService.id}
domainManagement: AzureManaged
exampleServiceEmailDomainAssociation:
type: azure:communication:ServiceEmailDomainAssociation
name: example
properties:
communicationServiceId: ${exampleService.id}
emailServiceDomainId: ${exampleEmailServiceDomain.id}
Create ServiceEmailDomainAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceEmailDomainAssociation(name: string, args: ServiceEmailDomainAssociationArgs, opts?: CustomResourceOptions);
@overload
def ServiceEmailDomainAssociation(resource_name: str,
args: ServiceEmailDomainAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServiceEmailDomainAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
communication_service_id: Optional[str] = None,
email_service_domain_id: Optional[str] = None)
func NewServiceEmailDomainAssociation(ctx *Context, name string, args ServiceEmailDomainAssociationArgs, opts ...ResourceOption) (*ServiceEmailDomainAssociation, error)
public ServiceEmailDomainAssociation(string name, ServiceEmailDomainAssociationArgs args, CustomResourceOptions? opts = null)
public ServiceEmailDomainAssociation(String name, ServiceEmailDomainAssociationArgs args)
public ServiceEmailDomainAssociation(String name, ServiceEmailDomainAssociationArgs args, CustomResourceOptions options)
type: azure:communication:ServiceEmailDomainAssociation
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 ServiceEmailDomainAssociationArgs
- 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 ServiceEmailDomainAssociationArgs
- 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 ServiceEmailDomainAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceEmailDomainAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceEmailDomainAssociationArgs
- 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 serviceEmailDomainAssociationResource = new Azure.Communication.ServiceEmailDomainAssociation("serviceEmailDomainAssociationResource", new()
{
CommunicationServiceId = "string",
EmailServiceDomainId = "string",
});
example, err := communication.NewServiceEmailDomainAssociation(ctx, "serviceEmailDomainAssociationResource", &communication.ServiceEmailDomainAssociationArgs{
CommunicationServiceId: pulumi.String("string"),
EmailServiceDomainId: pulumi.String("string"),
})
var serviceEmailDomainAssociationResource = new ServiceEmailDomainAssociation("serviceEmailDomainAssociationResource", ServiceEmailDomainAssociationArgs.builder()
.communicationServiceId("string")
.emailServiceDomainId("string")
.build());
service_email_domain_association_resource = azure.communication.ServiceEmailDomainAssociation("serviceEmailDomainAssociationResource",
communication_service_id="string",
email_service_domain_id="string")
const serviceEmailDomainAssociationResource = new azure.communication.ServiceEmailDomainAssociation("serviceEmailDomainAssociationResource", {
communicationServiceId: "string",
emailServiceDomainId: "string",
});
type: azure:communication:ServiceEmailDomainAssociation
properties:
communicationServiceId: string
emailServiceDomainId: string
ServiceEmailDomainAssociation 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 ServiceEmailDomainAssociation resource accepts the following input properties:
- Communication
Service stringId - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- Email
Service stringDomain Id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
- Communication
Service stringId - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- Email
Service stringDomain Id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
- communication
Service StringId - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- email
Service StringDomain Id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
- communication
Service stringId - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- email
Service stringDomain Id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
- communication_
service_ strid - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- email_
service_ strdomain_ id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
- communication
Service StringId - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- email
Service StringDomain Id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceEmailDomainAssociation 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 ServiceEmailDomainAssociation Resource
Get an existing ServiceEmailDomainAssociation 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?: ServiceEmailDomainAssociationState, opts?: CustomResourceOptions): ServiceEmailDomainAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
communication_service_id: Optional[str] = None,
email_service_domain_id: Optional[str] = None) -> ServiceEmailDomainAssociation
func GetServiceEmailDomainAssociation(ctx *Context, name string, id IDInput, state *ServiceEmailDomainAssociationState, opts ...ResourceOption) (*ServiceEmailDomainAssociation, error)
public static ServiceEmailDomainAssociation Get(string name, Input<string> id, ServiceEmailDomainAssociationState? state, CustomResourceOptions? opts = null)
public static ServiceEmailDomainAssociation get(String name, Output<String> id, ServiceEmailDomainAssociationState 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.
- Communication
Service stringId - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- Email
Service stringDomain Id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
- Communication
Service stringId - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- Email
Service stringDomain Id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
- communication
Service StringId - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- email
Service StringDomain Id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
- communication
Service stringId - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- email
Service stringDomain Id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
- communication_
service_ strid - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- email_
service_ strdomain_ id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
- communication
Service StringId - The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
- email
Service StringDomain Id - The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
Import
Communication service email domain association can be imported using the resource id
, e.g.
$ pulumi import azure:communication/serviceEmailDomainAssociation:ServiceEmailDomainAssociation example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/communicationServices/communicationService1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/emailServices/emailCommunicationService1/domains/domain1"
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.