All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::HBR::CrossAccount

Last Updated:Jul 05, 2026

The ALIYUN::HBR::CrossAccount resource creates a cross-account.

Syntax

{
  "Type": "ALIYUN::HBR::CrossAccount",
  "Properties": {
    "Alias": String,
    "CrossAccountUserId": Integer,
    "CrossAccountRoleName": String,
    "CrossAccountType": String
  }
}

Properties

Parameter

Type

Required

Update allowed

Description

Constraints

Alias

String

No

No

The alias of the cross-account authorization.

None

CrossAccountRoleName

String

No

No

The name of the RAM role that grants permissions to the authorized account.

None

CrossAccountType

String

No

No

The type of the cross-account authorization.

Valid values:

  • CROSS_ACCOUNT

  • CROSS_ACCOUNT_BY_RD

CrossAccountUserId

Integer

No

No

The user ID of the account to be authorized to back up data.

None

Return values

Fn::GetAtt

This resource does not return any attributes.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CrossAccountUserId:
    Type: Number
    Description:
      en: The user ID of the account that you want to authorize to back up data in your account.
    Required: false
  CrossAccountRoleName:
    Type: String
    Description:
      en: The name of the RAM role that is used to grant permissions to the authorized account.
    Required: false
  Alias:
    Type: String
    Description:
      en: The alias of the cross-account authorization.
    Required: false
  CrossAccountType:
    Type: String
    Description:
      en: 'The type of the cross-account authorization. Valid values: CROSS_ACCOUNT, CROSS_ACCOUNT_BY_RD.'
    AllowedValues:
      - CROSS_ACCOUNT
      - CROSS_ACCOUNT_BY_RD
    Required: false
Resources:
  CrossAccount:
    Type: ALIYUN::HBR::CrossAccount
    Properties:
      CrossAccountUserId:
        Ref: CrossAccountUserId
      CrossAccountRoleName:
        Ref: CrossAccountRoleName
      Alias:
        Ref: Alias
      CrossAccountType:
        Ref: CrossAccountType
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "CrossAccountUserId": {
      "Type": "Number",
      "Description": {
        "en": "The user ID of the account that you want to authorize to back up data in your account."
      },
      "Required": false
    },
    "CrossAccountRoleName": {
      "Type": "String",
      "Description": {
        "en": "The name of the RAM role that is used to grant permissions to the authorized account."
      },
      "Required": false
    },
    "Alias": {
      "Type": "String",
      "Description": {
        "en": "The alias of the cross-account authorization."
      },
      "Required": false
    },
    "CrossAccountType": {
      "Type": "String",
      "Description": {
        "en": "The type of the cross-account authorization. Valid values: CROSS_ACCOUNT, CROSS_ACCOUNT_BY_RD."
      },
      "AllowedValues": [
        "CROSS_ACCOUNT",
        "CROSS_ACCOUNT_BY_RD"
      ],
      "Required": false
    }
  },
  "Resources": {
    "CrossAccount": {
      "Type": "ALIYUN::HBR::CrossAccount",
      "Properties": {
        "CrossAccountUserId": {
          "Ref": "CrossAccountUserId"
        },
        "CrossAccountRoleName": {
          "Ref": "CrossAccountRoleName"
        },
        "Alias": {
          "Ref": "Alias"
        },
        "CrossAccountType": {
          "Ref": "CrossAccountType"
        }
      }
    }
  }
}