All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::DNS::DomainRecords

Last Updated:Jun 16, 2026

Queries Domain Name System (DNS) records.

Syntax

{
  "Type": "DATASOURCE::DNS::DomainRecords",
  "Properties": {
    "Status": String,
    "OrderBy": String,
    "RRKeyWord": String,
    "DomainName": String,
    "TypeKeyWord": String,
    "Lang": String,
    "Direction": String,
    "GroupId": String,
    "Line": String,
    "Type": String,
    "ValueKeyWord": String,
    "KeyWord": String,
    "SearchMode": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Status

String

No

Yes

The status of the DNS record.

Valid values:

  • Enable: The DNS record is available.

  • Disable: The DNS record is unavailable.

OrderBy

String

No

Yes

The sorting method for DNS records.

DNS records are sorted in reverse chronological order by the time they were added.

RRKeyWord

String

No

Yes

The hostname keyword for querying DNS records.

Fuzzy search mode. The value of RRKeyWord is matched as a case-insensitive substring.

DomainName

String

Yes

Yes

The domain name.

None.

TypeKeyWord

String

No

Yes

The record type keyword for querying DNS records.

Exact search mode. The value is case-insensitive.

Lang

String

No

Yes

The language.

None.

Direction

String

No

Yes

The sorting order for DNS records.

Valid values:

  • DESC: descending order

  • ASC: ascending order

GroupId

String

No

Yes

The ID of the domain name group.

None.

Line

String

No

Yes

The DNS line.

Default value: default.

For more information about the valid values of this property, see DNS lines.

Type

String

No

Yes

The type of the DNS record.

For more information, see DNS record types.

ValueKeyWord

String

No

Yes

The record value keyword for querying DNS records.

Fuzzy search mode. The value of ValueKeyWord is matched as a case-insensitive substring.

KeyWord

String

No

Yes

The keyword for querying DNS records.

Exact search mode. The value is case-insensitive.

SearchMode

String

No

Yes

The search mode.

Valid values:

  • LIKE: If you use this value, you must specify KeyWord. In this case, RRKeyWord, TypeKeyWord, ValueKeyWord, Type, Line, and Status are ignored.

  • EXACT: If you use this value, you must specify KeyWord. In this case, RRKeyWord, TypeKeyWord, ValueKeyWord, Type, Line, and Status are ignored.

  • ADVANCED: If you use this value, you must specify RRKeyWord, TypeKeyWord, ValueKeyWord, Type, Line, and Status.

Note

If you leave SearchMode empty, the following rules apply:

  • If KeyWord is specified, the system sets SearchMode to LIKE.

  • If KeyWord is left empty, RRKeyWord and ValueKeyWord support the fuzzy search mode, and TypeKeyWord, Type, Line, and Status support the exact search mode.

RefreshOptions

String

No

Yes

The refresh policy for data source resources during stack updates.

Valid values:

  • Never (default): does not refresh data source resources during stack updates.

  • Always: refreshes data source resources during stack updates.

Return values (Fn::GetAtt)

  • DomainRecordIds: the IDs of the DNS records.

  • DomainRecords: details of the DNS records.

Property

Type

Description

Constraint

DomainRecordIds

List

The IDs of the DNS records.

None.

DomainRecords

List

Details of the DNS records.

None.

DomainName

String

The domain name.

None.

Line

String

The DNS line.

None.

RecordId

String

The ID of the DNS record.

None.

Locked

Boolean

Indicates whether the DNS record is locked.

None.

Priority

Number

The priority of the mail exchanger (MX) record.

None.

RR

String

The hostname.

None.

Remark

String

The remarks.

None.

Status

String

The status of the DNS record.

None.

TTL

Number

The time-to-live (TTL).

None.

Type

String

The type of the DNS record.

None.

Value

String

The value of the DNS record.

None.

Weight

Integer

The load balancing weight.

None.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DomainName": {
      "Type": "String",
      "Description": "The domain name for which you want to query DNS records."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::DNS::DomainRecords",
      "Properties": {
        "DomainName": {
          "Ref": "DomainName"
        }
      }
    }
  },
  "Outputs": {
    "DomainRecordIds": {
      "Description": "The list of The DNS domain record ids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DomainRecordIds"
        ]
      }
    },
    "DomainRecords": {
      "Description": "The information about DNS records.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DomainRecords"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DomainName:
    Type: String
    Description: The domain name for which you want to query DNS records.
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::DNS::DomainRecords
    Properties:
      DomainName:
        Ref: DomainName
Outputs:
  DomainRecordIds:
    Description: The list of The DNS domain record ids.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DomainRecordIds
  DomainRecords:
    Description: The information about DNS records.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DomainRecords