All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::DRDS::DrdsInstances

Last Updated:Nov 01, 2024

DATASOURCE::DRDS::DrdsInstances is used to query instances.

Syntax

{
  "Type": "DATASOURCE::DRDS::DrdsInstances",
  "Properties": {
    "Type": String,
    "Description": String,
    "ResourceGroupId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Type

String

No

Yes

The type of the instance.

Valid values:

  • 0: shared instance

  • 1: dedicated instance

Description

String

No

Yes

The description of the instance.

None.

ResourceGroupId

String

No

Yes

The ID of the resource group.

None.

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

  • Instances: details of the instances.

  • InstanceIds: the IDs of the instances.

Property

Type

Description

Constraint

InstanceIds

List

The IDs of the instances.

None.

Instances

List

Details of the instances.

None.

ExpireDate

String

The timestamp that indicates the expiration time of the instance.

None.

InstanceSpec

String

The specifications of the instance.

None.

MasterInstanceId

String

The ID of the primary instance.

None.

Label

String

The label of the instance.

Valid values:

  • NORMAL: standard instance

  • HA: high-availability (HA) instance

  • VPC: virtual private cloud (VPC)-connected instance

Version

String

The version of the instance.

None.

ReadOnlyDBInstanceIds

List

The IDs of the read-only instances.

Example:

[ "drdssen12****" ]

VersionAction

String

Indicates whether the version of the instance can be upgraded.

None.

Type

String

The type of the instance.

Valid values:

  • PUBLIC: shared instance

  • PRIVATE: dedicated instance

Status

String

The status of the instance.

None.

Description

String

The description of the instance.

None.

InstRole

String

The role of the instance.

Valid values:

  • MASTER: The instance is a primary instance.

  • SLAVE: The instance is a read-only instance that is used to analyze complex queries.

  • SLAVE_FLOW: The instance is a read-only instance that is suitable for high-concurrency scenarios.

RegionId

String

The region ID.

None.

ResourceGroupId

String

The ID of the resource group.

None.

OrderInstanceId

String

The ID of the purchased instance.

None.

DrdsInstanceId

String

The instance ID.

None.

CommodityCode

String

The commodity code of the instance.

None.

ZoneId

String

The zone.

None.

Vips

List

Details of the virtual IP addresses (VIPs).

Example:

 [ {
      "VpcId" : "vpc-bpxxxxxxxx****",
      "Type" : "intranet",
      "VswitchId" : "vsw-bpxxxxxxxxxxx****",
      "Port" : "3306",
      "IP" : "10.23.XX.XX",
      "dns" : "drdssen1243as.drds.aliyuncs.com"
    } ]

VpcCloudInstanceId

String

The ID of the instance that resides in the VPC.

None.

MachineType

String

The machine type of the instance.

Only ecs may be returned.

InstanceSeries

String

The instance type.

None.

NetworkType

String

The network type.

Valid values:

  • CLASSIC

  • VPC

CreateTime

String

The timestamp that indicates the creation time of the instance.

None.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::DRDS::DrdsInstances
    Properties:
      Type: '0'
Outputs:
  Instances:
    Description: The list of drds instances.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Instances
  InstanceIds:
    Description: The list of drds instance IDs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InstanceIds

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::DRDS::DrdsInstances",
      "Properties": {
        "Type": "0"
      }
    }
  },
  "Outputs": {
    "Instances": {
      "Description": "The list of drds instances.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Instances"
        ]
      }
    },
    "InstanceIds": {
      "Description": "The list of drds instance IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceIds"
        ]
      }
    }
  }
}