Memperbarui Rekaman DNS dan mendukung berbagai tipe catatan serta otentikasi server origin.
Deskripsi operasi
API ini memungkinkan Anda memperbarui berbagai Rekaman DNS, termasuk A/AAAA, CNAME, NS, MX, TXT, CAA, SRV, dan URI. Untuk mengubah suatu catatan, berikan bidang yang sesuai, seperti value, priority, dan flag. Untuk origin CNAME yang memerlukan otentikasi—seperti OSS atau S3—API ini juga memungkinkan Anda mengonfigurasi informasi otentikasi origin guna mengamankan akses.
Catatan
-
Nilai harus sesuai dengan tipe catatan. Misalnya, Rekaman CNAME harus mengarah ke domain target.
-
Beberapa tipe catatan, seperti MX dan SRV, memerlukan nilai priority.
-
Rekaman CAA memerlukan bidang khusus, seperti Flag dan Tag.
-
Saat memperbarui rekaman keamanan seperti CERT dan SSHFP, atur dengan benar bidang Type dan Algorithm.
-
Saat menggunakan OSS atau S3 sebagai origin, konfigurasikan detail otentikasi dalam AuthConf sesuai pengaturan izin Anda.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:UpdateRecord |
update |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RecordId |
integer |
Yes |
ID catatan. Panggil operasi ListRecords untuk mendapatkan ID ini. |
1234567890123 |
| Ttl |
integer |
No |
Masa hidup data (TTL) catatan dalam detik. Nilainya harus berupa bilangan bulat dari 30 hingga 86400 atau 1. Nilai 1 mengatur TTL ke mode otomatis. |
30 |
| Proxied |
boolean |
No |
Menunjukkan apakah akan mengaktifkan akselerasi proxy untuk catatan tersebut. Hanya Rekaman CNAME dan A/AAAA yang mendukung akselerasi proxy. Nilai yang valid:
|
true |
| Type |
string |
No |
||
| Data |
object |
Yes |
Data DNS untuk catatan tersebut. Konten yang diperlukan bervariasi tergantung tipe catatan. Untuk informasi lebih lanjut, lihat Dokumentasi. |
{ "value":"2.2.2.2" } |
| Value |
string |
No |
Nilai catatan atau sebagian isinya. Parameter ini wajib diisi untuk Rekaman A/AAAA, CNAME, NS, MX, TXT, CAA, SRV, dan URI. Makna parameter ini bervariasi tergantung tipe catatan:
|
example.com |
| Priority |
integer |
No |
Prioritas catatan tersebut. Nilainya harus berupa bilangan bulat dari 0 hingga 65535, di mana nilai lebih rendah menunjukkan prioritas lebih tinggi. Parameter ini wajib diisi untuk Rekaman MX, SRV, dan URI. |
10 |
| Flag |
integer |
No |
Flag untuk catatan tersebut. Untuk Rekaman CAA, flag ini menunjukkan prioritas dan perilaku penanganannya. Nilainya harus berupa bilangan bulat dari 0 hingga 255. Parameter ini wajib diisi untuk Rekaman CAA. |
128 |
| Tag |
string |
No |
Tag untuk catatan tersebut. Untuk Rekaman CAA, tag ini menentukan tipe dan tujuan catatan tersebut. Parameter ini wajib diisi untuk Rekaman CAA. |
issue |
| Weight |
integer |
No |
Bobot catatan tersebut. Nilainya harus berupa bilangan bulat dari 0 hingga 65535. Parameter ini wajib diisi untuk Rekaman SRV dan URI. |
0 |
| Port |
integer |
No |
Nomor port untuk catatan tersebut. Nilainya harus berupa bilangan bulat dari 0 hingga 65535. Parameter ini wajib diisi untuk Rekaman SRV. |
0 |
| Type |
integer |
No |
Tipe sertifikat untuk Rekaman CERT, atau tipe kunci publik untuk Rekaman SSHFP. Parameter ini wajib diisi untuk Rekaman CERT dan SSHFP. |
0 |
| KeyTag |
integer |
No |
Identifikasi kunci publik untuk catatan tersebut. Nilainya harus berupa bilangan bulat dari 0 hingga 65535. Parameter ini wajib diisi untuk Rekaman CERT. |
0 |
| Algorithm |
integer |
No |
Algoritma enkripsi yang ditentukan dalam catatan tersebut. Nilainya harus berupa bilangan bulat dari 0 hingga 255. Parameter ini wajib diisi untuk Rekaman CERT dan SSHFP. |
0 |
| Certificate |
string |
No |
Data sertifikat kunci publik untuk catatan tersebut. Parameter ini wajib diisi untuk Rekaman CERT, SMIMEA, dan TLSA. |
dGVzdGFkYWxrcw== |
| Usage |
integer |
No |
Identifikasi penggunaan untuk catatan tersebut. Nilainya harus berupa bilangan bulat dari 0 hingga 255. Parameter ini wajib diisi untuk Rekaman SMIMEA dan TLSA. |
0 |
| Selector |
integer |
No |
Tipe sertifikat atau kunci publik yang ditentukan dalam catatan tersebut. Nilainya harus berupa bilangan bulat dari 0 hingga 255. Parameter ini wajib diisi untuk Rekaman SMIMEA dan TLSA. |
0 |
| MatchingType |
integer |
No |
Kebijakan algoritma yang digunakan untuk mencocokkan atau memvalidasi sertifikat. Nilainya harus berupa bilangan bulat dari 0 hingga 255. Parameter ini wajib diisi untuk Rekaman SMIMEA dan TLSA. |
0 |
| Fingerprint |
string |
No |
Sidik jari kunci publik untuk catatan tersebut. Parameter ini wajib diisi untuk Rekaman SSHFP. |
abcdef1234567890 |
| SourceType |
string |
No |
Tipe origin untuk Rekaman CNAME. Parameter ini wajib diisi untuk Rekaman CNAME. Nilai yang valid:
Jika parameter ini diabaikan atau dibiarkan kosong, nilai default-nya adalah |
OSS |
| BizName |
string |
No |
Kasus penggunaan untuk akselerasi proxy. Abaikan parameter ini jika akselerasi proxy dinonaktifkan. Nilai yang valid:
|
web |
| Comment |
string |
No |
Komentar untuk catatan tersebut. |
This is a remark. |
| AuthConf |
object |
No |
Pengaturan otentikasi origin untuk Rekaman CNAME. |
|
| AuthType |
string |
No |
Tipe otentikasi origin. Parameter ini wajib diisi ketika SourceType bernilai OSS atau S3. Tipe otentikasi yang didukung bervariasi tergantung tipe origin. Nilai yang valid:
|
private |
| SecretKey |
string |
No |
Kunci rahasia untuk akun pemilik origin. Ini wajib diisi untuk akses privat lintas akun ke origin OSS, serta untuk origin S3 dengan tipe otentikasi private. |
u0Nkg5gBK*******QF5wvKMM504JUHt |
| AccessKey |
string |
No |
Kunci akses untuk akun pemilik origin. Ini wajib diisi untuk akses privat lintas akun ke origin OSS, serta untuk origin S3 dengan tipe otentikasi private. |
VIxuvJSA2S03f******kp208dy5w7 |
| Region |
string |
No |
Wilayah tempat origin berada. Parameter ini wajib diisi ketika tipe origin adalah S3. Anda dapat menemukan ID wilayah di situs web resmi S3.
Jika Anda tidak menentukan nilai, maka nilai default-nya adalah v4. |
v2 |
| Version |
string |
No |
Versi algoritma penandatanganan. Parameter ini wajib diisi ketika tipe origin adalah S3 dan tipe otentikasi adalah private. Versi yang didukung: v2 dan v4. Jika parameter ini tidak ditentukan, nilai default-nya adalah v4. |
us-east-1 |
| HostPolicy |
string |
No |
Kebijakan HOST origin. Kebijakan ini, yang hanya berlaku untuk Rekaman CNAME, menentukan nilai header
|
follow_origin_domain |
Bidang Data menentukan data DNS untuk catatan tersebut. Data yang diperlukan bervariasi tergantung tipe catatan. Untuk detailnya, lihat dokumentasi.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan unik. |
0AEDAF20-4DDF-4165-8750-47FF9C1929C9 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ServiceInvokeFailed | The call to the internal service failed. The engineer is resolving the problem. Please wait a moment before trying, or contact customer service for details. | |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | |
| 400 | NoPermission | You do not have permissions to access or operate on the resource.Contact your account administrator to attach the AliyunESAFullAccess policy to the current user. | |
| 400 | InvalidParameter.RecordData | Invalid record content. Adjust your configurations based on the API documentation. | |
| 400 | Instance.NotOnline | Your plan is unavailable due to an overdue payment. Complete the payment first. | |
| 400 | Record.Reserved | Another operation on the record is in progress. Try again later. | |
| 400 | Record.ServiceBusy | The record is being configured. Try again later. | |
| 400 | Record.Conflict | The specified record content conflicts with existing records. Adjust your configurations based on the related product documentation. | |
| 400 | SourceCircleExist | The host record of the resource to be operated on is already the source station of another resource, or the source station of the current resource has been added as a host record. To avoid loopback, modify the host record or source station and retry. | |
| 400 | InvalidParameter.InvalidBiz | The incoming parameter value of the business type is empty or incorrect. | |
| 400 | Record.RecordValueContainSourceInBlacklist | The record value contains the blacklist address, and the details can be submitted for work order consultation. | |
| 400 | InvalidParameter.InvalidRecordNameSuffix | If you add other records, the suffix of the host record must be the same as the site name. | |
| 400 | InvalidParameter.RecordNameExceedLimit | The length of the record name exceeds the maximum limit. | |
| 400 | InvalidParameter.InvalidHostPolicy | The host parameter in the origin fetch request is invalid. | |
| 400 | InvalidParameter.CnameSiteRecordUnsupport | The current record type is not supported for a website connected by CNAME setup. | |
| 400 | InvalidParameter.RecordCommentExceedLimit | The number of incoming record comment exceeds the maximum limit. | |
| 400 | QuotaExceed.WildCardRecord | The number of wildcard records exceeds the plan quota. Contact the sales team to increase your quota. | |
| 400 | Record.AorAAAARecordValueContainInvalidIP | The A/AAAA record value contains the invalid IP. | |
| 400 | Record.AorAAAARecordValueIPExceedLimit | The number of IP addresses exceeds the limit for the A/AAAA record. | |
| 400 | Record.CAARecordFlagExceedLimit | The value of the flag parameter for a CAA record is out of range. | |
| 400 | Record.CAARecordTagExceedLimit | The CAA record tag has illegal characters other than issue, issuewild, and iodef. | |
| 400 | Record.CERTRecordAlgorithmExceedLimit | The value of the algorithm parameter for the CERT record is out of range. | |
| 400 | Record.CERTRecordKeyTagExceedLimit | The value of the keyTag parameter for a CERT record is out of range. | |
| 400 | Record.CERTRecordTypeExceedLimit | The CERT record type is out of range. | |
| 400 | Record.CNameRecordValueCannotEqualExistedIPASource | The CNAME record cannot be the origin of the added Layer 4 application. Check the values of other Layer 4 proxy records and try again. | |
| 400 | Record.CNameRecordValueCannotEqualExistedPoolSource | The CNAME record cannot be the origin of the added source address pool. Check and try again. | |
| 400 | Record.CNameRecordValueCannotEqualExistedRecordSource | The CNAME record cannot be the origin of an added record. Check the record values of other records and try again. | |
| 400 | Record.CNameRecordValueCannotEqualOtherExistedIPARecord | The record value of a CNAME record cannot be exactly the same as the name of another existing Layer 4 proxy record. | |
| 400 | Record.CNameRecordValueCannotEqualOtherExistedRecord | The record value of a CNAME record cannot be the same as the name of another existing CNAME record. | |
| 400 | Record.CNameRecordValueCannotEqualHostRecord | The record value of the CNAME record cannot be exactly the same as the host record. | |
| 400 | Record.CNameRecordValueExceedLimit | The CNAME record value cannot exceed 253 characters, please delete and try again. | |
| 400 | Record.CNameRecordValueInvalidDomainUnderline | Record values (DNS-only records) generally start with an underscore, a lowercase letter a-z, and the numbers 0-9. The middle part of the record can be lowercase letters, numbers, or hyphens, and the length is between 0 and 61 characters. | |
| 400 | Record.CNameRecordValueInvalidRecordDomain | Record values (records with agent acceleration enabled) must start with a lowercase letter a-z and numbers 0-9. The middle part of the record can be lowercase letters, numbers, or hyphens, and the length is between 0 and 61 characters. | |
| 400 | Record.EmptyRecordValue | The record value is empty, please fill it in correctly and try again. | |
| 400 | Record.InvalidCertEncodeWithCERTRecord | The certificate value of the CERT record is not base64-encoded. | |
| 400 | Record.InvalidFingerprintWithSSHFPRecord | The SSHFP record fingerprint value is not hexadecimal encoded. | |
| 400 | Record.InvalidIssueDataWithCAARecordTag | The tag of a CAA record can only be a semicolon or a valid domain name separated by semicolons. | |
| 400 | Record.InvalidMailAddressWithCAARecordTag | The CAA record tag is prefixed with mailto:, it must be followed by a legal email address. | |
| 400 | Record.InvalidSmimeaEncodeWithSMIMEARecord | The certificate value of the SMIMEA record is not base64-encoded. | |
| 400 | Record.InvalidTslaEncodeWithTSLARecord | The certificate value passed in is not hexadecimal encoded with TSLA record. | |
| 400 | Record.InvalidURLWithURIRecord | The URI record value must be a valid URL address. | |
| 400 | Record.NoRecordNameConflictWithNSRecord | No record name can conflict with an NS record name. | |
| 400 | Record.NSRecordCannotEqualSiteName | An NS record with the exact same name as the site name is not allowed. | |
| 400 | Record.OSSSourceInvalidAuthType | The recorded OSS origin station authentication type is not supported. | |
| 400 | Record.ParseJSONRecordValueFailed | The JSON data format of the record data is incorrect. Please adjust and try again. | |
| 400 | Record.PoolSourceNotExistPool | If the source station type of the record is source address pool, the input source address pool does not exist. | |
| 400 | Record.RecordNameConflictForSpecifiedRecordType | The A/AAAA and CNAME records cannot have the same name. | |
| 400 | Record.RecordNameConflictWithIPAName | The record name cannot have the same name as the Layer 4 proxy record. | |
| 400 | Record.RecordNameConflictWithLBName | The record name cannot be the same as the Server Load Balancer record name. | |
| 400 | Record.RecordNameConflictWithNSRecord | The NS record name cannot be the same as any other type of record name. | |
| 400 | Record.RecordNameConflictWithPoolName | The record name cannot be the same as the source address pool record name. | |
| 400 | Record.RecordNameInBlacklist | The record name is in blacklist. | |
| 400 | Record.S3SourceInvalidAuthRegion | The recorded S3 origin belongs to a region that is not in the supported range. | |
| 400 | Record.S3SourceInvalidAuthType | The recorded S3 origin authentication type is not supported. | |
| 400 | Record.S3SourceInvalidAuthVersion | The version of the authentication signature algorithm of the S3 origin is not supported. | |
| 400 | Record.SourceAccessKeyExceedLimit | The character length of the AccessKey parameter value for the record source station is out of range. | |
| 400 | Record.SourceEmptyAK | The AccessKey of the account to which the origin site belongs is empty. | |
| 400 | Record.SourceEmptyAuthConf | The authentication information of the origin station is empty. | |
| 400 | Record.SourceEmptySecretKey | The SecretKey of the account to which the recorded origin site belongs is empty. | |
| 400 | Record.SourceSecretKeyExceedLimit | The character length of the SecretKey parameter value for the record source station is out of range. | |
| 400 | Record.SRVRecordInvalidRecordName | SRV host record name is not valid. The SRV host record name must begin with an underscore (-) followed by a lowercase letter (a-z), a number (0-9), and a hyphen (-), followed by 1 arbitrary character, followed by an underscore (-) and a lowercase letter, number, or hyphen. | |
| 400 | Record.SRVRecordPortExceedLimit | The SRV record port is out of range. | |
| 400 | Record.SSHFPRecordAlgorithmExceedLimit | The algorithm parameter value for the SSHFP record is out of range. | |
| 400 | Record.TTLExceedLimit | The TTL parameter value for a record is out of range. | |
| 400 | Record.TXTRecordValueExceedLimit | The TXT record value cannot exceed 450 characters. | |
| 400 | Record.TypeExceedLimitWithSSHFPRecord | The SSHFP record Type parameter value is out of range. | |
| 400 | Record.UnmatchedRecordNameContainDoubleConsecutiveDot | Illegal host record name. The host record cannot contain consecutive dot. | |
| 400 | Record.UnmatchedRecordNameForbidStarSev | Illegal host record name, SRV record name disallowed asterisk. | |
| 400 | Record.UnmatchedRecordNameInvalidATChar | Illegal host record name. The at symbol can only appear at the top of the host record and can only be followed. Symbol, other strings are not allowed. | |
| 400 | Record.UnmatchedRecordNameInvalidNamePrefixSuffix | Illegal host record name. Host record values cannot start or end with a dot, a hyphens. | |
| 400 | Record.UnmatchedRecordNameInvalidStartSymbol | Illegal host record name. The asterisk is only allowed in the first place of the host record, and only the following dot is allowed after the asterisk. | |
| 400 | Record.UnmatchedRecordNameSeperateStringTooLarge | Illegal host record name. The number of characters in each segment separated by dot cannot exceed 63. | |
| 400 | Record.UnsupportedSourceType | The recorded source station type is not in the supported range. | |
| 400 | Record.UnsupportedType | The record type parameter is unsupported. | |
| 400 | Record.ValidProxiedForSpecifedRecordType | Only A/AAAA and CNAME types support proxy acceleration. | |
| 400 | Record.RecordUsageExceedLimit | The usage parameter value filled in is out of range. | |
| 400 | Record.RecordSelectorExceedLimit | The selector parameter value filled in is out of range. | |
| 400 | Record.RecordMatchingTypeExceedLimit | The matchingType parameter value filled in is out of range. | |
| 400 | Record.RecordPriorityExceedLimit | The record priority parameter value filled in is out of range. | |
| 400 | Record.RecordWeightExceedLimit | The record weight parameter value filled in is out of range. | |
| 400 | Record.RecordNameConflictWithSameRecordType | Record conflicts with an existing host record that has the same name and value. | |
| 400 | Record.UnmatchedRecordNameInvalidUnderLine | The host record name contains an illegal underscore. The underscore is only supported at the beginning of the TXT, CNAME, MX, SRV, and NS records. Proxy acceleration cannot be enabled, and records can only be added in the DNS mode. | |
| 400 | InvalidParameter.CnameSiteRecordNoProxied | A non-proxied record was added for a website using a CNAME setup. | |
| 400 | Record.UnmatchedRecordNameOnlyContainSymbol | The host record value cannot exist separately in various symbols, and can be added with any lowercase letters or numbers. | |
| 400 | Record.InvalidIodefDataWithCAARecordTag | The CAA record Tag value cannot start with mailto: or http:// or https. | |
| 400 | Record.WildcardConflictForSpecifiedRecordType | The A/AAAA,CNAME records cannot add all and asterisk prefixed records at the same time. | |
| 400 | InvalidParameter.PrivateIpAsSourceUnsupported | The provided source is an invalid private IP address. Please verify and resubmit. | |
| 400 | InvalidParameter.SourceIpInBlacklist | The provided source is an invalid private IP address. Please verify and resubmit. | |
| 400 | SameNameRecordExceedLimit | The number of records with the same name exceeds the upper limit. | |
| 400 | Record.UnmatchedRecordNameOnlyRangeChars | Illegal host record character. Only lowercase a-z, uppercase A- Z, digits 0-9, some special characters are supported as valid characters in host records. | |
| 400 | Record.InvalidHTTPURLValueWithCAARecordTag | The CAA record is prefixed with http:// or https://, it must be followed by a valid URL. | |
| 400 | Record.ProxiedAsCustomHostnameSource | Failed to disable proxy the record because it is the origin server of existing custom hostnames.Remove all references to the record and try again. | |
| 404 | Record.NotFound | The record does not exist. Check your configurations and try again. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.