Domains - Update
Description for Creates or updates a domain.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}?api-version=2024-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
domain
|
path | True |
string pattern: [a-zA-Z0-9][a-zA-Z0-9\.-]+ |
Name of the domain. |
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+[^\.]$ |
Name of the resource group to which the resource belongs. |
subscription
|
path | True |
string |
Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). |
api-version
|
query | True |
string |
API Version |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.consent | True |
Legal agreement consent. |
|
properties.contactAdmin | True |
Administrative contact. |
|
properties.contactBilling | True |
Billing contact. |
|
properties.contactRegistrant | True |
Registrant contact. |
|
properties.contactTech | True |
Technical contact. |
|
kind |
string |
Kind of resource. |
|
properties.authCode |
string |
||
properties.autoRenew |
boolean |
|
|
properties.dnsType |
Current DNS type |
||
properties.dnsZoneId |
string |
Azure DNS Zone to use |
|
properties.privacy |
boolean |
|
|
properties.targetDnsType |
Target DNS type (would be used for migration) |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Domain purchase was successful. |
|
202 Accepted |
Domain purchase is in progress. |
|
Other Status Codes |
App Service error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Update App Service Domain
Sample request
PATCH https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com?api-version=2024-04-01
{
"properties": {
"authCode": "exampleAuthCode",
"privacy": false,
"autoRenew": true,
"dnsType": "DefaultDomainRegistrarDns",
"consent": {
"agreementKeys": [
"agreementKey1"
],
"agreedBy": "192.0.2.1",
"agreedAt": "2021-09-10T19:30:53Z"
},
"contactTech": {
"email": "tech@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Tech",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
},
"contactBilling": {
"email": "billing@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Billing",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
},
"contactAdmin": {
"email": "admin@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Admin",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
},
"contactRegistrant": {
"email": "registrant@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Registrant",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
}
}
}
Sample response
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com",
"name": "example.com",
"type": "Microsoft.DomainRegistration/domains",
"location": "global",
"tags": {},
"properties": {
"authCode": "exampleAuthCode",
"registrationStatus": "Active",
"provisioningState": "Succeeded",
"nameServers": [
"ns01.ote.domaincontrol.com",
"ns02.ote.domaincontrol.com"
],
"privacy": false,
"createdTime": "2021-09-10T19:30:53Z",
"expirationTime": "2022-09-10T19:30:53Z",
"autoRenew": true,
"readyForDnsRecordManagement": true,
"managedHostNames": [],
"domainNotRenewableReasons": [
"ExpirationNotInRenewalTimeRange"
],
"dnsType": "DefaultDomainRegistrarDns",
"consent": {
"agreementKeys": [
"agreementKey1"
],
"agreedBy": "192.0.2.1",
"agreedAt": "2021-09-10T19:30:53Z"
},
"contactTech": {
"email": "tech@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Tech",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
},
"contactBilling": {
"email": "billing@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Billing",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
},
"contactAdmin": {
"email": "admin@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Admin",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
},
"contactRegistrant": {
"email": "registrant@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Registrant",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
}
}
}
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com",
"name": "example.com",
"type": "Microsoft.DomainRegistration/domains",
"location": "global",
"tags": {},
"properties": {
"authCode": "exampleAuthCode",
"registrationStatus": "Active",
"provisioningState": "Succeeded",
"nameServers": [
"ns01.ote.domaincontrol.com",
"ns02.ote.domaincontrol.com"
],
"privacy": false,
"createdTime": "2021-09-10T19:30:53Z",
"expirationTime": "2022-09-10T19:30:53Z",
"autoRenew": true,
"readyForDnsRecordManagement": true,
"managedHostNames": [],
"domainNotRenewableReasons": [
"ExpirationNotInRenewalTimeRange"
],
"dnsType": "DefaultDomainRegistrarDns",
"consent": {
"agreementKeys": [
"agreementKey1"
],
"agreedBy": "192.0.2.1",
"agreedAt": "2021-09-10T19:30:53Z"
},
"contactTech": {
"email": "tech@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Tech",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
},
"contactBilling": {
"email": "billing@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Billing",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
},
"contactAdmin": {
"email": "admin@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Admin",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
},
"contactRegistrant": {
"email": "registrant@email.com",
"fax": "1-245-534-2242",
"nameFirst": "John",
"nameLast": "Doe",
"nameMiddle": "",
"jobTitle": "Registrant",
"organization": "Microsoft Inc.",
"phone": "1-245-534-2242",
"addressMailing": {
"address1": "3400 State St",
"city": "Chicago",
"state": "IL",
"country": "United States",
"postalCode": "67098"
}
}
}
}
Definitions
Name | Description |
---|---|
Address |
Address information for domain registration. |
Azure |
Type of the Azure resource the hostname is assigned to. |
Contact |
Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois directories as per ICANN requirements. |
Custom |
Type of the DNS record. |
Default |
App Service error response. |
Details | |
Dns |
Current DNS type |
Domain |
Information about a domain. |
Domain |
ARM resource for a domain. |
Domain |
Domain purchase consent object, representing acceptance of applicable legal agreements. |
Domain |
Domain registration status. |
Error |
Error model. |
Host |
Details of a hostname derived from a domain. |
Host |
Type of the hostname. |
Provisioning |
Domain provisioning state. |
Resource |
Reasons why domain is not renewable. |
Address
Address information for domain registration.
Name | Type | Description |
---|---|---|
address1 |
string |
First line of an Address. |
address2 |
string |
The second line of the Address. Optional. |
city |
string |
The city for the address. |
country |
string |
The country for the address. |
postalCode |
string |
The postal code for the address. |
state |
string |
The state or province for the address. |
AzureResourceType
Type of the Azure resource the hostname is assigned to.
Value | Description |
---|---|
Website | |
TrafficManager |
Contact
Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois directories as per ICANN requirements.
Name | Type | Description |
---|---|---|
addressMailing |
Mailing address. |
|
string |
Email address. |
|
fax |
string |
Fax number. |
jobTitle |
string |
Job title. |
nameFirst |
string |
First name. |
nameLast |
string |
Last name. |
nameMiddle |
string |
Middle name. |
organization |
string |
Organization contact belongs to. |
phone |
string |
Phone number. |
CustomHostNameDnsRecordType
Type of the DNS record.
Value | Description |
---|---|
CName | |
A |
DefaultErrorResponse
App Service error response.
Name | Type | Description |
---|---|---|
error |
Error model. |
Details
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
DnsType
Current DNS type
Value | Description |
---|---|
AzureDns | |
DefaultDomainRegistrarDns |
Domain
Information about a domain.
Name | Type | Default value | Description |
---|---|---|---|
id |
string |
Resource Id. |
|
kind |
string |
Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind. |
|
location |
string |
Resource Location. |
|
name |
string |
Resource Name. |
|
properties.authCode |
string |
||
properties.autoRenew |
boolean |
True |
|
properties.consent |
Legal agreement consent. |
||
properties.contactAdmin |
Administrative contact. |
||
properties.contactBilling |
Billing contact. |
||
properties.contactRegistrant |
Registrant contact. |
||
properties.contactTech |
Technical contact. |
||
properties.createdTime |
string (date-time) |
Domain creation timestamp. |
|
properties.dnsType |
Current DNS type |
||
properties.dnsZoneId |
string |
Azure DNS Zone to use |
|
properties.domainNotRenewableReasons |
Reasons why domain is not renewable. |
||
properties.expirationTime |
string (date-time) |
Domain expiration timestamp. |
|
properties.lastRenewedTime |
string (date-time) |
Timestamp when the domain was renewed last time. |
|
properties.managedHostNames |
Host |
All hostnames derived from the domain and assigned to Azure resources. |
|
properties.nameServers |
string[] |
Name servers. |
|
properties.privacy |
boolean |
|
|
properties.provisioningState |
Domain provisioning state. |
||
properties.readyForDnsRecordManagement |
boolean |
|
|
properties.registrationStatus |
Domain registration status. |
||
properties.targetDnsType |
Target DNS type (would be used for migration) |
||
tags |
object |
Resource tags. |
|
type |
string |
Resource type. |
DomainPatchResource
ARM resource for a domain.
Name | Type | Default value | Description |
---|---|---|---|
id |
string |
Resource Id. |
|
kind |
string |
Kind of resource. |
|
name |
string |
Resource Name. |
|
properties.authCode |
string |
||
properties.autoRenew |
boolean |
True |
|
properties.consent |
Legal agreement consent. |
||
properties.contactAdmin |
Administrative contact. |
||
properties.contactBilling |
Billing contact. |
||
properties.contactRegistrant |
Registrant contact. |
||
properties.contactTech |
Technical contact. |
||
properties.createdTime |
string (date-time) |
Domain creation timestamp. |
|
properties.dnsType |
Current DNS type |
||
properties.dnsZoneId |
string |
Azure DNS Zone to use |
|
properties.domainNotRenewableReasons |
Reasons why domain is not renewable. |
||
properties.expirationTime |
string (date-time) |
Domain expiration timestamp. |
|
properties.lastRenewedTime |
string (date-time) |
Timestamp when the domain was renewed last time. |
|
properties.managedHostNames |
Host |
All hostnames derived from the domain and assigned to Azure resources. |
|
properties.nameServers |
string[] |
Name servers. |
|
properties.privacy |
boolean |
|
|
properties.provisioningState |
Domain provisioning state. |
||
properties.readyForDnsRecordManagement |
boolean |
|
|
properties.registrationStatus |
Domain registration status. |
||
properties.targetDnsType |
Target DNS type (would be used for migration) |
||
type |
string |
Resource type. |
DomainPurchaseConsent
Domain purchase consent object, representing acceptance of applicable legal agreements.
Name | Type | Description |
---|---|---|
agreedAt |
string (date-time) |
Timestamp when the agreements were accepted. |
agreedBy |
string |
Client IP address. |
agreementKeys |
string[] |
List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under |
DomainStatus
Domain registration status.
Value | Description |
---|---|
Active | |
Awaiting | |
Cancelled | |
Confiscated | |
Disabled | |
Excluded | |
Expired | |
Failed | |
Held | |
Locked | |
Parked | |
Pending | |
Reserved | |
Reverted | |
Suspended | |
Transferred | |
Unknown | |
Unlocked | |
Unparked | |
Updated | |
JsonConverterFailed |
Error
Error model.
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
details |
Details[] |
Detailed errors. |
innererror |
string |
More information to debug error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
HostName
Details of a hostname derived from a domain.
Name | Type | Description |
---|---|---|
azureResourceName |
string |
Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name. |
azureResourceType |
Type of the Azure resource the hostname is assigned to. |
|
customHostNameDnsRecordType |
Type of the DNS record. |
|
hostNameType |
Type of the hostname. |
|
name |
string |
Name of the hostname. |
siteNames |
string[] |
List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic Manager. |
HostNameType
Type of the hostname.
Value | Description |
---|---|
Verified | |
Managed |
ProvisioningState
Domain provisioning state.
Value | Description |
---|---|
Succeeded | |
Failed | |
Canceled | |
InProgress | |
Deleting |
ResourceNotRenewableReason
Reasons why domain is not renewable.
Value | Description |
---|---|
RegistrationStatusNotSupportedForRenewal | |
ExpirationNotInRenewalTimeRange | |
SubscriptionNotActive |