Domains - Create Or Update
创建或更新域的说明。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}?api-version=2024-11-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
domain
|
path | True |
string pattern: [a-zA-Z0-9][a-zA-Z0-9\.-]+ |
域的名称。 |
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+[^\.]$ |
资源所属的资源组的名称。 |
subscription
|
path | True |
string |
Azure 订阅 ID。 这是 GUID 格式的字符串(例如 000000000-0000-0000-0000-00000000000000)。 |
api-version
|
query | True |
string |
API 版本 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
location | True |
string |
资源位置。 |
properties.consent | True |
法律协议同意。 |
|
properties.contactAdmin | True |
管理联系人。 |
|
properties.contactBilling | True |
计费联系人。 |
|
properties.contactRegistrant | True |
注册联系人。 |
|
properties.contactTech | True |
技术联系人。 |
|
kind |
string |
资源类型。 如果资源是应用,可以参考 https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference 了解类型支持的详细信息值。 |
|
properties.authCode |
string |
||
properties.autoRenew |
boolean |
如果域应自动续订, |
|
properties.dnsType |
当前 DNS 类型 |
||
properties.dnsZoneId |
string |
要使用的 Azure DNS 区域 |
|
properties.privacy |
boolean |
如果为此域启用了域隐私,则 |
|
properties.targetDnsType |
目标 DNS 类型(将用于迁移) |
||
tags |
object |
资源标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
域购买成功。 |
|
202 Accepted |
域购买正在进行中。 |
|
Other Status Codes |
应用服务错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Create App Service Domain
示例请求
PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com?api-version=2024-11-01
{
"location": "global",
"tags": {},
"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"
}
}
}
}
示例响应
{
"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"
}
}
}
}
定义
名称 | 说明 |
---|---|
Address |
域注册的地址信息。 |
Azure |
主机名分配给的 Azure 资源的类型。 |
Contact |
域注册的联系信息。 如果未选择“域隐私”选项,则根据 ISI 要求通过 Whois 目录公开提供联系信息。 |
Custom |
DNS 记录的类型。 |
Default |
应用服务错误响应。 |
Details | |
Dns |
当前 DNS 类型 |
Domain |
有关域的信息。 |
Domain |
域购买同意对象,表示接受适用的法律协议。 |
Domain |
域注册状态。 |
Error |
错误模型。 |
Host |
从域派生的主机名的详细信息。 |
Host |
主机名的类型。 |
Provisioning |
域预配状态。 |
Resource |
域不可续订的原因。 |
Address
域注册的地址信息。
名称 | 类型 | 说明 |
---|---|---|
address1 |
string |
地址的第一行。 |
address2 |
string |
地址的第二行。 可选。 |
city |
string |
地址的城市。 |
country |
string |
地址所在的国家/地区。 |
postalCode |
string |
地址的邮政编码。 |
state |
string |
地址的州或省。 |
AzureResourceType
主机名分配给的 Azure 资源的类型。
值 | 说明 |
---|---|
TrafficManager | |
Website |
Contact
域注册的联系信息。 如果未选择“域隐私”选项,则根据 ISI 要求通过 Whois 目录公开提供联系信息。
名称 | 类型 | 说明 |
---|---|---|
addressMailing |
邮寄地址。 |
|
string |
电子邮件地址。 |
|
fax |
string |
传真号。 |
jobTitle |
string |
职务。 |
nameFirst |
string |
名字。 |
nameLast |
string |
姓。 |
nameMiddle |
string |
中间名称。 |
organization |
string |
组织联系人属于该联系人。 |
phone |
string |
电话号码。 |
CustomHostNameDnsRecordType
DNS 记录的类型。
值 | 说明 |
---|---|
A | |
CName |
DefaultErrorResponse
应用服务错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误模型。 |
Details
名称 | 类型 | 说明 |
---|---|---|
code |
string |
标准化字符串,以编程方式标识错误。 |
message |
string |
详细的错误说明和调试信息。 |
target |
string |
详细的错误说明和调试信息。 |
DnsType
当前 DNS 类型
值 | 说明 |
---|---|
AzureDns | |
DefaultDomainRegistrarDns |
Domain
有关域的信息。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
id |
string |
资源 ID。 |
|
kind |
string |
资源类型。 如果资源是应用,可以参考 https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference 了解类型支持的详细信息值。 |
|
location |
string |
资源位置。 |
|
name |
string |
资源名称。 |
|
properties.authCode |
string |
||
properties.autoRenew |
boolean |
True |
如果域应自动续订, |
properties.consent |
法律协议同意。 |
||
properties.contactAdmin |
管理联系人。 |
||
properties.contactBilling |
计费联系人。 |
||
properties.contactRegistrant |
注册联系人。 |
||
properties.contactTech |
技术联系人。 |
||
properties.createdTime |
string (date-time) |
域创建时间戳。 |
|
properties.dnsType |
当前 DNS 类型 |
||
properties.dnsZoneId |
string |
要使用的 Azure DNS 区域 |
|
properties.domainNotRenewableReasons |
域不可续订的原因。 |
||
properties.expirationTime |
string (date-time) |
域过期时间戳。 |
|
properties.lastRenewedTime |
string (date-time) |
上次续订域时的时间戳。 |
|
properties.managedHostNames |
Host |
从域派生并分配给 Azure 资源的所有主机名。 |
|
properties.nameServers |
string[] |
名称服务器。 |
|
properties.privacy |
boolean |
如果为此域启用了域隐私,则 |
|
properties.provisioningState |
域预配状态。 |
||
properties.readyForDnsRecordManagement |
boolean |
如果 Azure 可以将此域分配给应用服务应用, |
|
properties.registrationStatus |
域注册状态。 |
||
properties.targetDnsType |
目标 DNS 类型(将用于迁移) |
||
tags |
object |
资源标记。 |
|
type |
string |
资源类型。 |
DomainPurchaseConsent
域购买同意对象,表示接受适用的法律协议。
名称 | 类型 | 说明 |
---|---|---|
agreedAt |
string (date-time) |
接受协议时的时间戳。 |
agreedBy |
string |
客户端 IP 地址。 |
agreementKeys |
string[] |
适用的法律协议密钥列表。 可以使用 |
DomainStatus
域注册状态。
值 | 说明 |
---|---|
Active | |
Awaiting | |
Cancelled | |
Confiscated | |
Disabled | |
Excluded | |
Expired | |
Failed | |
Held | |
JsonConverterFailed | |
Locked | |
Parked | |
Pending | |
Reserved | |
Reverted | |
Suspended | |
Transferred | |
Unknown | |
Unlocked | |
Unparked | |
Updated |
Error
错误模型。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
标准化字符串,以编程方式标识错误。 |
details |
Details[] |
详细错误。 |
innererror |
string |
调试错误的详细信息。 |
message |
string |
详细的错误说明和调试信息。 |
target |
string |
详细的错误说明和调试信息。 |
HostName
从域派生的主机名的详细信息。
名称 | 类型 | 说明 |
---|---|---|
azureResourceName |
string |
主机名分配给的 Azure 资源的名称。 如果将其分配给流量管理器,则它将是流量管理器名称,否则它将是应用名称。 |
azureResourceType |
主机名分配给的 Azure 资源的类型。 |
|
customHostNameDnsRecordType |
DNS 记录的类型。 |
|
hostNameType |
主机名的类型。 |
|
name |
string |
主机名的名称。 |
siteNames |
string[] |
主机名分配给的应用列表。 仅当主机名指向流量管理器时,此列表才会有多个应用。 |
HostNameType
主机名的类型。
值 | 说明 |
---|---|
Managed | |
Verified |
ProvisioningState
域预配状态。
值 | 说明 |
---|---|
Canceled | |
Deleting | |
Failed | |
InProgress | |
Succeeded |
ResourceNotRenewableReason
域不可续订的原因。
值 | 说明 |
---|---|
ExpirationNotInRenewalTimeRange | |
RegistrationStatusNotSupportedForRenewal | |
SubscriptionNotActive |