DATASOURCE::DNS::Domains

更新时间:
复制 MD 格式

Queries domain names managed in Alibaba Cloud DNS.

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.

Searches use the %KeyWord% mode. The keyword is case-insensitive.

Lang

String

No

Yes

The language.

None.

Starmark

Boolean

No

Yes

Specifies whether to query the domain name starmark.

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 this property is left empty, all domain name groups are returned.

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.

Valid values:

  • true

  • false

DnsServers

List

The DNS servers 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 returned for a Chinese domain name.

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

RecordCount

Number

The number of DNS records for the domain name.

None.

RegistrantEmail

String

The email address of the registrant.

None.

Remark

String

The remarks.

None.

Starmark

Boolean

Indicates whether the domain name has a starmark.

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