All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::HBR::DbAgent

最終更新日:Nov 02, 2023

ALIYUN::HBR::DbAgent is used to install a Cloud Backup backup client for a database.

Syntax

{
  "Type": "ALIYUN::HBR::DbAgent",
  "Properties": {
    "InstanceInfo": List
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

InstanceInfo

List

Yes

No

The information about the Elastic Compute Service (ECS) instance.

The information must be 1 to 100 characters in length.

For more information, see InstanceInfo syntax and InstanceInfo properties.

InstanceInfo syntax

"InstanceInfo": [
  {
    "UserName": String,
    "InstanceId": String,
    "SourceType": String,
    "Password": String,
    "AuthenticationType": String
  }
]

InstanceInfo properties

Property

Type

Required

Editable

Description

Constraint

UserName

String

No

No

The username of the account to which the database that you want to back up belongs.

None.

InstanceId

String

Yes

No

The ID of the ECS instance.

None.

SourceType

String

Yes

No

The type of the source database.

Valid values:

  • MYSQL

  • ORACLE

  • MSSQL

Password

String

No

No

The password of the account to which the database that you want to back up belongs.

None.

AuthenticationType

String

No

No

The authentication method.

Valid values:

  • Valid value if you set SourceType to MYSQL or MSSQL: INSTANCE.

  • Valid value if you set SourceType to ORACLE: ACCESS_KEY.

Response parameters

Fn::GetAtt

  • UniBackupInstances: the IDs of the database instances that are backed up.

  • TaskId: the ID of the task.

  • UniBackupInstanceDetails: the details of the database instance that is backed up.

  • InstanceIds: the IDs of the ECS instances.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceInfo": {
      "Type": "Json",
      "Description": "Instance infos",
      "Default": "[\n  {\n    \"UserName\": \"test123\",\n    \"InstanceId\": \"i-12e****\",\n    \"SourceType\": \"MSSQL\",\n    \"Password\": \"tes****\",\n    \"AuthenticationType\": \"INSTANCE\"\n  }\n]"
    }
  },
  "Resources": {
    "UniBackupAgent": {
      "Type": "ALIYUN::HBR::DbAgent",
      "Properties": {
        "InstanceInfo": {
          "Ref": "InstanceInfo"
        }
      }
    }
  },
  "Outputs": {
    "UniBackupInstances": {
      "Description": "Uni backup agent instance info",
      "Value": {
        "Fn::GetAtt": [
          "UniBackupAgent",
          "UniBackupInstances"
        ]
      }
    },
    "TaskId": {
      "Description": "Uni backup agent install task id.",
      "Value": {
        "Fn::GetAtt": [
          "UniBackupAgent",
          "TaskId"
        ]
      }
    },
    "UniBackupInstanceDetails": {
      "Description": "Uni backup agent instance info details",
      "Value": {
        "Fn::GetAtt": [
          "UniBackupAgent",
          "UniBackupInstanceDetails"
        ]
      }
    },
    "InstanceIds": {
      "Description": "Uni backup agent instance ids",
      "Value": {
        "Fn::GetAtt": [
          "UniBackupAgent",
          "InstanceIds"
        ]
      }
    }
  }
}