Domains - Create Or Update

Creates or updates a domain.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}?api-version=2015-04-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).

resourceGroupName
path True
  • string

Name of the resource group to which the resource belongs.

Regex pattern: ^[-\w\._\(\)]+[^\.]$

domainName
path True
  • string

Name of the domain.

Regex pattern: [a-zA-Z0-9][a-zA-Z0-9\.-]+

api-version
query True
  • string

API Version

Request Body

Name Required Type Description
kind
  • string

Kind of resource.

location True
  • string

Resource Location.

properties.authCode
  • string
properties.autoRenew
  • boolean

true if the domain should be automatically renewed; otherwise, false.

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.

properties.dnsType

Current DNS type

properties.dnsZoneId
  • string

Azure DNS Zone to use

properties.privacy
  • boolean

true if domain privacy is enabled for this domain; otherwise, false.

properties.targetDnsType

Target DNS type (would be used for migration)

tags
  • object

Resource tags.

Responses

Name Type Description
200 OK

Domain purchase was successful.

202 Accepted

Domain purchase is in progress.

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

Definitions

Address

Address information for domain registration.

AzureResourceType

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.

CustomHostNameDnsRecordType

Type of the DNS record.

DnsType

Current DNS type

Domain

Information about a domain.

DomainPurchaseConsent

Domain purchase consent object, representing acceptance of applicable legal agreements.

DomainStatus

Domain registration status.

HostName

Details of a hostname derived from a domain.

HostNameType

Type of the hostname.

ProvisioningState

Domain provisioning state.

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.

Name Type Description
TrafficManager
  • string
Website
  • string

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.

email
  • 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.

Name Type Description
A
  • string
CName
  • string

DnsType

Current DNS type

Name Type Description
AzureDns
  • string
DefaultDomainRegistrarDns
  • string

Domain

Information about a domain.

Name Type Description
id
  • string

Resource Id.

kind
  • string

Kind of resource.

location
  • string

Resource Location.

name
  • string

Resource Name.

properties.authCode
  • string
properties.autoRenew
  • boolean

true if the domain should be automatically renewed; otherwise, false.

properties.consent

Legal agreement consent.

properties.contactAdmin

Administrative contact.

properties.contactBilling

Billing contact.

properties.contactRegistrant

Registrant contact.

properties.contactTech

Technical contact.

properties.createdTime
  • string

Domain creation timestamp.

properties.dnsType

Current DNS type

properties.dnsZoneId
  • string

Azure DNS Zone to use

properties.domainNotRenewableReasons
  • string[]

Reasons why domain is not renewable.

properties.expirationTime
  • string

Domain expiration timestamp.

properties.lastRenewedTime
  • string

Timestamp when the domain was renewed last time.

properties.managedHostNames

All hostnames derived from the domain and assigned to Azure resources.

properties.nameServers
  • string[]

Name servers.

properties.privacy
  • boolean

true if domain privacy is enabled for this domain; otherwise, false.

properties.provisioningState

Domain provisioning state.

properties.readyForDnsRecordManagement
  • boolean

true if Azure can assign this domain to App Service apps; otherwise, false. This value will be true if domain registration status is active and it is hosted on name servers Azure has programmatic access to.

properties.registrationStatus

Domain registration status.

properties.targetDnsType

Target DNS type (would be used for migration)

tags
  • object

Resource tags.

type
  • string

Resource type.

DomainPurchaseConsent

Domain purchase consent object, representing acceptance of applicable legal agreements.

Name Type Description
agreedAt
  • string

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 TopLevelDomain resource.

DomainStatus

Domain registration status.

Name Type Description
Active
  • string
Awaiting
  • string
Cancelled
  • string
Confiscated
  • string
Disabled
  • string
Excluded
  • string
Expired
  • string
Failed
  • string
Held
  • string
JsonConverterFailed
  • string
Locked
  • string
Parked
  • string
Pending
  • string
Reserved
  • string
Reverted
  • string
Suspended
  • string
Transferred
  • string
Unknown
  • string
Unlocked
  • string
Unparked
  • string
Updated
  • string

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.

Name Type Description
Managed
  • string
Verified
  • string

ProvisioningState

Domain provisioning state.

Name Type Description
Canceled
  • string
Deleting
  • string
Failed
  • string
InProgress
  • string
Succeeded
  • string