DATASOURCE::DRDS::DrdsInstance is used to query the information about a PolarDB-X 1.0 instance.
Syntax
{
"Type": "DATASOURCE::DRDS::DrdsInstance",
"Properties": {
"DrdsInstanceId": String,
"RefreshOptions": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
DrdsInstanceId | String | Yes | Yes | The instance ID. | None. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Return values
Fn::GetAtt
InstanceSpec: the specifications of the instance.
Description: the description of the instance.
StorageType: the partition mode of the database.
ExpireDate: the expiration timestamp.
ResourceGroupId: the ID of the resource group to which the instance belongs.
ZoneId: the zone.
CreateTime: the creation timestamp.
Label: the label of the instance.
MachineType: the machine type of the instance.
InstanceSeries: the instance type.
VersionAction: the operation that can be performed on the version of the instance.
MysqlVersion: the MySQL version.
Type: the type of the instance.
DrdsInstanceId: the instance ID.
MasterInstanceId: the ID of the primary instance.
Version: the version of the instance.
OrderInstanceId: the ID of the purchased instance.
InstRole: the role of the instance.
NetworkType: the network type.
ReadOnlyDBInstanceIds: the IDs of the read-only instances.
CommodityCode: the commodity code.
VpcCloudInstanceId: the ID of the instance that is deployed in the virtual private cloud (VPC).
Vips: the virtual IP addresses (VIPs).
Examples
YAML
formatROSTemplateFormatVersion: '2015-09-01' Parameters: DrdsInstanceId: Type: String Description: en: The ID of the Drds instance. Required: true Resources: ExtensionDataSource: Type: DATASOURCE::DRDS::DrdsInstance Properties: DrdsInstanceId: Ref: DrdsInstanceId Outputs: InstanceSpec: Description: The specification of the instance. Value: Fn::GetAtt: - ExtensionDataSource - InstanceSpec Description: Description: The description of the instance. Value: Fn::GetAtt: - ExtensionDataSource - Description StorageType: Description: |- The storage type of the Drds database. Valid values: * RDS * PolarDB Value: Fn::GetAtt: - ExtensionDataSource - StorageType ExpireDate: Description: The timestamp that indicates when the instance expires. Value: Fn::GetAtt: - ExtensionDataSource - ExpireDate ResourceGroupId: Description: The ID of the resource group to which the instance belongs. Value: Fn::GetAtt: - ExtensionDataSource - ResourceGroupId ZoneId: Description: The ID of the zone in which the resource is located. Value: Fn::GetAtt: - ExtensionDataSource - ZoneId CreateTime: Description: The timestamp that indicates when the instance is created. Value: Fn::GetAtt: - ExtensionDataSource - CreateTime Label: Description: |- The tag of the instance. Valid values: * NORMAL: The instance is a standard instance. * HA: The instance is a high-availability (HA) instance. * VPC: The instance is a VPC-based instance. Value: Fn::GetAtt: - ExtensionDataSource - Label MachineType: Description: 'The machine type of the instance. Valid value: ecs.' Value: Fn::GetAtt: - ExtensionDataSource - MachineType InstanceSeries: Description: |- The edition of the instance. Valid values: * starter: Starter Edition * enterprise: Enterprise Edition * standard: Standard Edition Value: Fn::GetAtt: - ExtensionDataSource - InstanceSeries VersionAction: Description: Indicates whether the version of the instance can be upgraded. Value: Fn::GetAtt: - ExtensionDataSource - VersionAction MysqlVersion: Description: Engine version. Value: Fn::GetAtt: - ExtensionDataSource - MysqlVersion Type: Description: |- The type of the instance. Valid values: * PUBLIC: The returned instance is a shared instance. * PRIVATE: The returned instance is a dedicated instance. Value: Fn::GetAtt: - ExtensionDataSource - Type DrdsInstanceId: Description: The ID of the Drds instance. Value: Fn::GetAtt: - ExtensionDataSource - DrdsInstanceId MasterInstanceId: Description: The ID of the primary instance. Value: Fn::GetAtt: - ExtensionDataSource - MasterInstanceId Version: Description: The version of the instance. Value: Fn::GetAtt: - ExtensionDataSource - Version OrderInstanceId: Description: The ID of the purchased instance. Value: Fn::GetAtt: - ExtensionDataSource - OrderInstanceId InstRole: Description: |- The role of the instance. Valid values: * MASTER: The instance is a primary instance. * SLAVE: The instance is a read-only instance to analyze complex queries. * SLAVE_FLOW: The instance is a read-only instance for high-concurrency scenarios. Value: Fn::GetAtt: - ExtensionDataSource - InstRole NetworkType: Description: |- The network type of the instance. Valid values: * CLASSIC * VPC Value: Fn::GetAtt: - ExtensionDataSource - NetworkType ReadOnlyDBInstanceIds: Description: The IDs of read-only instances that are associated with the instance. Value: Fn::GetAtt: - ExtensionDataSource - ReadOnlyDBInstanceIds CommodityCode: Description: The commodity code of the service. Value: Fn::GetAtt: - ExtensionDataSource - CommodityCode VpcCloudInstanceId: Description: The ID of the instance that is deployed in the VPC. Value: Fn::GetAtt: - ExtensionDataSource - VpcCloudInstanceId Vips: Description: The list of returned virtual IP addresses (VIPs). Value: Fn::GetAtt: - ExtensionDataSource - Vips
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "DrdsInstanceId": { "Type": "String", "Description": { "en": "The ID of the Drds instance." }, "Required": true } }, "Resources": { "ExtensionDataSource": { "Type": "DATASOURCE::DRDS::DrdsInstance", "Properties": { "DrdsInstanceId": { "Ref": "DrdsInstanceId" } } } }, "Outputs": { "InstanceSpec": { "Description": "The specification of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "InstanceSpec" ] } }, "Description": { "Description": "The description of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Description" ] } }, "StorageType": { "Description": "The storage type of the Drds database. Valid values:\n* RDS\n* PolarDB", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "StorageType" ] } }, "ExpireDate": { "Description": "The timestamp that indicates when the instance expires.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ExpireDate" ] } }, "ResourceGroupId": { "Description": "The ID of the resource group to which the instance belongs.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ResourceGroupId" ] } }, "ZoneId": { "Description": "The ID of the zone in which the resource is located.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ZoneId" ] } }, "CreateTime": { "Description": "The timestamp that indicates when the instance is created.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "CreateTime" ] } }, "Label": { "Description": "The tag of the instance. Valid values:\n* NORMAL: The instance is a standard instance.\n* HA: The instance is a high-availability (HA) instance.\n* VPC: The instance is a VPC-based instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Label" ] } }, "MachineType": { "Description": "The machine type of the instance. Valid value: ecs.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "MachineType" ] } }, "InstanceSeries": { "Description": "The edition of the instance. Valid values:\n* starter: Starter Edition\n* enterprise: Enterprise Edition\n* standard: Standard Edition", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "InstanceSeries" ] } }, "VersionAction": { "Description": "Indicates whether the version of the instance can be upgraded.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "VersionAction" ] } }, "MysqlVersion": { "Description": "Engine version.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "MysqlVersion" ] } }, "Type": { "Description": "The type of the instance. Valid values:\n* PUBLIC: The returned instance is a shared instance.\n* PRIVATE: The returned instance is a dedicated instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Type" ] } }, "DrdsInstanceId": { "Description": "The ID of the Drds instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DrdsInstanceId" ] } }, "MasterInstanceId": { "Description": "The ID of the primary instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "MasterInstanceId" ] } }, "Version": { "Description": "The version of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Version" ] } }, "OrderInstanceId": { "Description": "The ID of the purchased instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "OrderInstanceId" ] } }, "InstRole": { "Description": "The role of the instance. Valid values:\n* MASTER: The instance is a primary instance.\n* SLAVE: The instance is a read-only instance to analyze complex queries.\n* SLAVE_FLOW: The instance is a read-only instance for high-concurrency scenarios.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "InstRole" ] } }, "NetworkType": { "Description": "The network type of the instance. Valid values:\n* CLASSIC\n* VPC", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "NetworkType" ] } }, "ReadOnlyDBInstanceIds": { "Description": "The IDs of read-only instances that are associated with the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ReadOnlyDBInstanceIds" ] } }, "CommodityCode": { "Description": "The commodity code of the service.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "CommodityCode" ] } }, "VpcCloudInstanceId": { "Description": "The ID of the instance that is deployed in the VPC.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "VpcCloudInstanceId" ] } }, "Vips": { "Description": "The list of returned virtual IP addresses (VIPs).", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Vips" ] } } } }