Skip to main content

domains

Creates, updates, deletes, gets or lists a domains resource.

Overview

Namedomains
TypeResource
Idazure.communication.domains

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
dataLocationstringThe location where the Domains resource data is stored at rest.
domainManagementstringDescribes how a Domains resource is being managed. Required. Known values are: "AzureManaged", "CustomerManaged", and "CustomerManagedInExchangeOnline". (AzureManaged, CustomerManaged, CustomerManagedInExchangeOnline)
fromSenderDomainstringP2 sender domain that is displayed to the email recipients [RFC 5322].
locationstringThe geo-location where the resource lives. Required.
mailFromSenderDomainstringP1 sender domain that is present on the email envelope [RFC 5321].
provisioningStatestringProvisioning state of the resource. Known values are: "Unknown", "Succeeded", "Failed", "Canceled", "Running", "Creating", "Updating", "Deleting", and "Moving". (Unknown, Succeeded, Failed, Canceled, Running, Creating, Updating, Deleting, Moving)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
userEngagementTrackingstringDescribes whether user engagement tracking is enabled or disabled. Known values are: "Disabled" and "Enabled". (Disabled, Enabled)
verificationRecordsobjectList of DnsRecord.
verificationStatesobjectList of VerificationStatusRecord.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, email_service_name, domain_name, subscription_idGet. Get the Domains resource and its properties.
list_by_email_service_resourceselectresource_group_name, email_service_name, subscription_idList by EmailService. Handles requests to list all Domains resources under the parent EmailServices resource.
create_or_updateinsertresource_group_name, email_service_name, domain_name, subscription_id, locationCreate Or Update. Add a new Domains resource under the parent EmailService resource or update an existing Domains resource.
updateupdateresource_group_name, email_service_name, domain_name, subscription_idUpdate. Operation to update an existing Domains resource.
create_or_updatereplaceresource_group_name, email_service_name, domain_name, subscription_id, locationCreate Or Update. Add a new Domains resource under the parent EmailService resource or update an existing Domains resource.
deletedeleteresource_group_name, email_service_name, domain_name, subscription_idDelete. Operation to delete a Domains resource.
initiate_verificationexecresource_group_name, email_service_name, domain_name, subscription_id, verificationTypeInitiate Verification. Initiate verification of DNS record.
cancel_verificationexecresource_group_name, email_service_name, domain_name, subscription_id, verificationTypeCancel Verification. Cancel verification of DNS record.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domain_namestringThe name of the Domains resource. Required.
email_service_namestringThe name of the EmailService resource. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Get. Get the Domains resource and its properties.

SELECT
id,
name,
dataLocation,
domainManagement,
fromSenderDomain,
location,
mailFromSenderDomain,
provisioningState,
systemData,
tags,
type,
userEngagementTracking,
verificationRecords,
verificationStates
FROM azure.communication.domains
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND email_service_name = '{{ email_service_name }}' -- required
AND domain_name = '{{ domain_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create Or Update. Add a new Domains resource under the parent EmailService resource or update an existing Domains resource.

INSERT INTO azure.communication.domains (
tags,
location,
properties,
resource_group_name,
email_service_name,
domain_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ email_service_name }}',
'{{ domain_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update. Operation to update an existing Domains resource.

UPDATE azure.communication.domains
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND email_service_name = '{{ email_service_name }}' --required
AND domain_name = '{{ domain_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create Or Update. Add a new Domains resource under the parent EmailService resource or update an existing Domains resource.

REPLACE azure.communication.domains
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND email_service_name = '{{ email_service_name }}' --required
AND domain_name = '{{ domain_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete. Operation to delete a Domains resource.

DELETE FROM azure.communication.domains
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND email_service_name = '{{ email_service_name }}' --required
AND domain_name = '{{ domain_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Initiate Verification. Initiate verification of DNS record.

EXEC azure.communication.domains.initiate_verification 
@resource_group_name='{{ resource_group_name }}' --required,
@email_service_name='{{ email_service_name }}' --required,
@domain_name='{{ domain_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"verificationType": "{{ verificationType }}"
}'
;