全部产品
Search
文档中心

Resource Orchestration Service:ALIYUN::PVTZ::UserVpcAuthorization

更新时间:Jun 26, 2025

ALIYUN::PVTZ::UserVpcAuthorization digunakan untuk mengaitkan virtual private cloud (VPC) lintas akun.

Sintaksis

{
  "Type": "ALIYUN::PVTZ::UserVpcAuthorization",
  "Properties": {
    "AuthCode": String,
    "AuthChannel": String,
    "AuthorizedUserId": String,
    "AuthType": String,
    "IgnoreDeletionForbidden": Boolean
  }
}

Properti

PropertiTipeDiperlukanDapat DieditDeskripsiBatasan
AuthCodeStringTidakTidakKode verifikasi. Properti ini diperlukan ketika properti AuthChannel diatur ke AUTH_CODE atau dibiarkan kosong.
AuthChannelStringTidakTidakSaluran otorisasi. Nilai default: AUTH_CODE. Nilai yang valid:
  • AUTH_CODE: Kode otorisasi digunakan untuk mengaitkan VPC lintas akun. Sistem memeriksa apakah kode otorisasi yang ditentukan oleh AuthCode benar.
  • RESOURCE_DIRECTORY: Direktori sumber daya digunakan untuk mengaitkan VPC lintas akun. Sistem memeriksa apakah akun yang ditentukan oleh properti AuthorizedUserId dan akun Alibaba Cloud saat ini berada dalam direktori sumber daya yang sama.
AuthorizedUserIdStringYaTidakID akun Alibaba Cloud kepada siapa Anda ingin memberikan izin. Tidak ada
AuthTypeStringTidakTidakJenis otorisasi. Atur nilainya ke NORMAL. Nilai tersebut menentukan bahwa hanya izin reguler yang diberikan.
IgnoreDeletionForbiddenBooleanTidakYaMenunjukkan apakah akan mengabaikan perlindungan penghapusan. Nilai yang valid:
  • true
  • false

Nilai Pengembalian

Fn::GetAtt

  • AuthorizedUserId: ID akun Alibaba Cloud kepada siapa Anda ingin memberikan izin.
  • AuthType: jenis otorisasi.

Contoh

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      UserVpcAuthorization:
        Type: ALIYUN::PVTZ::UserVpcAuthorization
        Properties:
          AuthCode: 12hsj839
          AuthChannel: AUTH_CODE
          AuthorizedUserId:
            Ref: ALIYUN::AccountId
          AuthType: NORMAL
    Outputs:
      AuthorizedUserId:
        Description: The account ID of the user who authorizes the resource.
        Value:
          Fn::GetAtt:
            - UserVpcAuthorization
            - AuthorizedUserId
      AuthType:
        Description: Authorization type.
        Value:
          Fn::GetAtt:
            - UserVpcAuthorization
            - AuthType
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "UserVpcAuthorization": {
          "Type": "ALIYUN::PVTZ::UserVpcAuthorization",
          "Properties": {
            "AuthCode": "12hsj839",
            "AuthChannel": "AUTH_CODE",
            "AuthorizedUserId": {
              "Ref": "ALIYUN::AccountId"
            },
            "AuthType": "NORMAL"
          }
        }
      },
      "Outputs": {
        "AuthorizedUserId": {
          "Description": "The account ID of the user who authorizes the resource.",
          "Value": {
            "Fn::GetAtt": [
              "UserVpcAuthorization",
              "AuthorizedUserId"
            ]
          }
        },
        "AuthType": {
          "Description": "Authorization type.",
          "Value": {
            "Fn::GetAtt": [
              "UserVpcAuthorization",
              "AuthType"
            ]
          }
        }
      }
    }