All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::DNS::DomainRecords

Last Updated:Aug 12, 2024

DATASOURCE::DNS::DomainRecords is used to query 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
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
StatusStringNoYesThe state of the DNS record. Valid values:
  • Enable: The DNS record is available.
  • Disable: The DNS record is unavailable.
OrderByStringNoYesThe method based on which the system sorts the DNS records. The system sorts the DNS records in reverse chronological order based on the time when they are added.
RRKeyWordStringNoYesThe resource record (RR) keyword based on which the system queries the DNS records. The system queries the DNS records based on the value of the RRKeyWord property in fuzzy match mode. The value is not case-sensitive.
DomainNameStringYesYesThe domain name. None.
TypeKeyWordStringNoYesThe type keyword based on which the system queries the DNS records. The system queries the DNS records based on the value of this property in exact match mode. The value is not case-sensitive.
LangStringNoYesThe language. None.
DirectionStringNoYesThe order in which the system sorts the DNS records. Valid values:
  • DESC: descending order
  • ASC: ascending order
GroupIdStringNoYesThe ID of the domain name group. None.
LineStringNoYesThe DNS line. Default value: default.

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

TypeStringNoYesThe type of the DNS record. For more information about the valid values of this property, see DNS record types.
ValueKeyWordStringNoYesThe record value keyword based on which the system queries the DNS records. The system queries the DNS records based on the value of the ValueKeyWord property in fuzzy match mode. The value is not case-sensitive.
KeyWordStringNoYesThe keyword based on which the system queries the DNS records. The system queries the DNS records based on the value of this property in exact match mode. The value is not case-sensitive.
SearchModeStringNoYesThe search mode. Valid values: LIKE, EXACT, and ADVANCED.
  • If you set this property to LIKE, you must specify the KeyWord property. The RRKeyWord, TypeKeyWord, ValueKeyWord, Type, Line, and Status properties are ignored.
  • If you set this property to EXACT, you must specify the KeyWord property. The RRKeyWord, TypeKeyWord, ValueKeyWord, Type, Line, and Status properties are ignored.
  • If you set this property to ADVANCED, you must specify the RRKeyWord, TypeKeyWord, ValueKeyWord, Type, Line, and Status properties.
Note If you leave the SerachMode property empty, the system determines the search mode based on the following rules:
  • If you specify the KeyWord property, LIKE is used as the value of the SearchMode property.
  • If you leave the KeyWord property empty, the system queries the DNS records based on the value of the RRKeyWord or ValueKeyWord property in fuzzy match mode, and based on the value of the TypeKeyWord, Type, Line, or Status property in exact match mode.

Return values (Fn::GetAtt)

  • DomainRecordIds: the IDs of the DNS records.
  • DomainRecords: details of the DNS records.
Property TypeDescriptionConstraint
DomainRecordIdsListThe IDs of the DNS records. None.
DomainRecordsListDetails of the DNS records. None.
DomainNameStringThe domain name. None.
LineStringThe DNS line. None.
RecordIdStringThe ID of the DNS record. None.
LockedBooleanIndicates whether the DNS record is locked. None.
PriorityNumberThe priority of the mail exchanger (MX) record. None.
RRStringThe RR value. None.
RemarkStringThe description of the DNS record. None.
StatusStringThe state of the DNS record. None.
TTLNumberThe time-to-live (TTL) of the DNS record. None.
TypeStringThe type of the DNS record. None.
ValueStringThe value of the DNS record. None.
WeightIntegerThe weight of the DNS record that is configured for load balancing. 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