All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::DNS::Domains

Last Updated:Nov 01, 2024

DATASOURCE::DNS::Domains is used to query domain names.

Syntax

{
  "Type": "DATASOURCE::DNS::Domains",
  "Properties": {
    "ResourceGroupId": String,
    "KeyWord": String,
    "Lang": String,
    "Starmark": Boolean,
    "SearchMode": String,
    "GroupId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

ResourceGroupId

String

No

Yes

The ID of the resource group.

None.

KeyWord

String

No

Yes

The keyword.

The %KeyWord% mode is used for searches. The keyword is case-insensitive.

Lang

String

No

Yes

The language.

None.

Starmark

Boolean

No

Yes

Specifies whether to query the starmark of the domain name.

Valid values:

  • true

  • false

SearchMode

String

No

Yes

The search mode.

Valid values:

  • LIKE: fuzzy search

  • EXACT: exact search

GroupId

String

No

Yes

The ID of the domain name group.

If you leave this property empty, all domain name groups are returned by default.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values (Fn::GetAtt)

  • DomainIds: the IDs of the domain names.

  • Domains: details of the domain names.

Property

Type

Description

Constraint

DomainIds

List

The IDs of the domain names.

None.

Domains

List

Details of the domain names.

None.

AliDomain

Boolean

Indicates whether the domain name is registered in Alibaba Cloud DNS (DNS).

Valid values:

  • true

  • false

DnsServers

List

The DNS servers that are used to resolve the domain name.

Example:

["ns1.alidns.com","ns2.alidns.com"]

DomainName

String

The domain name.

None.

GroupId

String

The ID of the domain name group.

None.

DomainId

String

The ID of the domain name.

None.

GroupName

String

The name of the domain name group.

None.

InstanceEndTime

String

The expiration time of the DNS instance.

None.

InstanceExpired

Boolean

Indicates whether the DNS instance has expired.

Valid values:

  • true

  • false

InstanceId

String

The ID of the DNS instance.

None.

PunyCode

String

The Punycode that is returned for the Chinese domain name.

For an English domain name, the return value is empty.

RecordCount

Number

The number of DNS records of the domain name.

None.

RegistrantEmail

String

The email address of the registrant.

None.

Remark

String

The remarks.

None.

Starmark

Boolean

Indicates whether the starmark of the domain name is queried.

Valid values:

  • true

  • false

VersionCode

String

The version code of the DNS instance.

None.

VersionName

String

The version name of the DNS instance.

None.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "KeyWord": {
      "Type": "String",
      "Description": "The keyword for searches in \"%KeyWord%\" mode. The value is not case-sensitive."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::DNS::Domains",
      "Properties": {
        "KeyWord": {
          "Ref": "KeyWord"
        }
      }
    }
  },
  "Outputs": {
    "Domains": {
      "Description": "The information about DNS domains.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Domains"
        ]
      }
    },
    "DomainIds": {
      "Description": "The list of The DNS domain ids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DomainIds"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  KeyWord:
    Type: String
    Description: The keyword for searches in "%KeyWord%" mode. The value is not case-sensitive.
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::DNS::Domains
    Properties:
      KeyWord:
        Ref: KeyWord
Outputs:
  Domains:
    Description: The information about DNS domains.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Domains
  DomainIds:
    Description: The list of The DNS domain ids.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DomainIds