DNS レコードを更新します。さまざまな RecordType とオリジン認証設定がサポートされています。
操作説明
この API オペレーションでは、A/AAAA、CNAME ドメイン名、NS、MX、TXT、CAA、SRV、URI の RecordType を含む DNS レコードを更新できます。対応する Record 値、優先度、フラグなどのフィールドを指定して Record の内容を変更できます。OSS や S3 など認証が必要な CNAME ドメイン名オリジンサーバーの場合、この API オペレーションではオリジン認証情報の設定もサポートしており、安全なアクセスを確保できます。
始める前に
Record 値 (Value) は RecordType と一致する必要があります。たとえば、CNAME レコードはターゲットドメイン名に対応する必要があります。
MX や SRV などの特定の RecordType では、優先度 (Priority) の値が必要です。
CAA Record では、Flag や Tag などの特定のフィールドが必要です。
CERT や SSHFP などのセキュリティ Record を更新する場合、Type、Algorithm などのフィールドを正確にセットしてください。
OSS または S3 をオリジンサーバーとして使用する場合、権限設定に基づいて AuthConf で認証の詳細を設定してください。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
esa:UpdateRecord |
update |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RecordId |
integer |
必須 |
レコードの ID。 ListRecords を呼び出してレコード ID を取得できます。 |
1234567890123 |
| Ttl |
integer |
任意 |
Record の存続時間 (TTL)。単位: 秒。有効な値: 30~86400、または 1。値が 1 の場合、Record の TTL は自動的に決定されます。呼び出し時にこの値を指定できます。 |
30 |
| Proxied |
boolean |
任意 |
Record のプロキシアクセラレーションを有効にするかどうかを指定します。CNAME レコードと A/AAAA Record のみがプロキシアクセラレーションをサポートしています。有効な値:
|
true |
| Type |
string |
任意 |
Record の DNS タイプ。A/AAAA、CNAME ドメイン名、TXT などです。 |
A/AAAA |
| Data |
object |
必須 |
Record の DNS 情報。内容は RecordType によって異なります。詳細については、ドキュメントを参照してください。 |
{ "value":"2.2.2.2" } |
| Value |
string |
任意 |
Record 値または部分的な内容。A/AAAA、CNAME ドメイン名、NS、MX、TXT、CAA、SRV、または URI Record を追加する場合、このパラメーターは必須です。意味は RecordType によって異なります:
|
example.com |
| Priority |
integer |
任意 |
Record の優先度。有効な値: 0~65535。値が小さいほど優先度が高くなります。MX、SRV、または URI Record を追加する場合、このパラメーターは必須です。 |
10 |
| Flag |
integer |
任意 |
Record のフラグ。CAA Record の Flag は優先度と処理メソッドを示します。有効な値: 0~255。CAA Record を追加する場合、このパラメーターは必須です。 |
128 |
| Tag |
string |
任意 |
Record のタグ。CAA Record の Tag は特定のタイプと用途を示します。CAA Record を追加する場合、このパラメーターは必須です。 |
issue |
| Weight |
integer |
任意 |
Record の重み。有効な値: 0~65535。SRV または URI Record を追加する場合、このパラメーターは必須です。 |
0 |
| Port |
integer |
任意 |
Record のポート。有効な値: 0~65535。SRV Record を追加する場合、このパラメーターは必須です。 |
0 |
| Type |
integer |
任意 |
Record の証明書タイプ (CERT Record の場合) または公開鍵タイプ (SSHFP Record の場合)。CERT または SSHFP Record を追加する場合、このパラメーターは必須です。 |
0 |
| KeyTag |
integer |
任意 |
Record の公開鍵識別子。有効な値: 0~65535。CERT Record を追加する場合、このパラメーターは必須です。 |
0 |
| Algorithm |
integer |
任意 |
Record で使用される暗号化アルゴリズム。有効な値: 0~255。CERT または SSHFP Record を追加する場合、このパラメーターは必須です。 |
0 |
| Certificate |
string |
任意 |
Record の公開鍵証明書情報。CERT、SMIMEA、または TLSA Record を追加する場合、このパラメーターは必須です。 |
dGVzdGFkYWxrcw== |
| Usage |
integer |
任意 |
Record の使用量識別子。有効な値: 0~255。SMIMEA または TLSA Record を追加する場合、このパラメーターは必須です。 |
0 |
| Selector |
integer |
任意 |
Record で使用される証明書または公開鍵のタイプ。有効な値: 0~255。SMIMEA または TLSA Record を追加する場合、このパラメーターは必須です。 |
0 |
| MatchingType |
integer |
任意 |
Record が証明書の照合または検証に使用するアルゴリズムポリシー。有効な値: 0~255。SMIMEA または TLSA Record を追加する場合、このパラメーターは必須です。 |
0 |
| Fingerprint |
string |
任意 |
Record の公開鍵の指紋値。SSHFP Record を追加する場合、このパラメーターは必須です。 |
abcdef1234567890 |
| SourceType |
string |
任意 |
CNAME レコードのオリジンサーバータイプ。CNAME レコードを追加する場合、このパラメーターは必須です。有効な値:
このパラメーターが指定されていないか空のままの場合、デフォルト値は Domain で、標準ドメイン名オリジンサーバータイプを示します。 |
OSS |
| BizName |
string |
任意 |
Record アクセラレーションのビジネスシナリオ。アクセラレーションが有効になっていない Record の場合、このパラメーターは必須ではありません。有効な値:
|
web |
| Comment |
string |
任意 |
Record のコメント。 |
This is a remark. |
| AuthConf |
object |
任意 |
CNAME レコードのオリジン認証情報。 |
|
| AuthType |
string |
任意 |
オリジン認証タイプ。オリジンサーバータイプによってサポートされる認証タイプが異なります。オリジンサーバータイプは、この操作の SourceType パラメーターを指します。オリジンサーバータイプが OSS または S3 の場合、オリジン認証タイプを指定する必要があります。有効な値:
|
private |
| SecretKey |
string |
任意 |
オリジンサーバーが属するアカウントの SecretKey。オリジンサーバータイプが OSS でオリジン認証タイプが非公開クロスアカウント読み取りの場合、またはオリジンサーバータイプが S3 でオリジン認証タイプが非公開読み取りの場合、このパラメーターは必須です。 |
u0Nkg5gBK*******QF5wvKMM504JUHt |
| AccessKey |
string |
任意 |
オリジンサーバーが属するアカウントの AccessKey。オリジンサーバータイプが OSS でオリジン認証タイプが非公開クロスアカウント読み取りの場合、またはオリジンサーバータイプが S3 でオリジン認証タイプが非公開読み取りの場合、このパラメーターは必須です。 |
VIxuvJSA2S03f******kp208dy5w7 |
| Region |
string |
任意 |
署名アルゴリズムのバージョン。オリジンサーバータイプが S3 でオリジン認証タイプが非公開読み取りの場合、このパラメーターは必須です。有効な値:
デフォルト値: v4。 |
v2 |
| Version |
string |
任意 |
オリジンサーバーが属するリージョン。オリジンサーバータイプが S3 の場合、このパラメーターは必須です。リージョンは S3 の公式 Web サイトから取得してください。 |
us-east-1 |
| HostPolicy |
string |
任意 |
back-to-origin ホストポリシー。RecordType が CNAME ドメイン名の場合にこのパラメーターは効果を持ちます。back-to-origin リクエストの HOST ポリシーを設定します。有効な値:
|
follow_origin_domain |
Record の Data フィールドには Record の DNS 情報が含まれます。内容は RecordType によって異なります。詳細については、ドキュメントを参照してください。
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID。 |
0AEDAF20-4DDF-4165-8750-47FF9C1929C9 |
例
成功レスポンス
JSONJSON
{
"RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。