All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::PVTZ::UserVpcAuthorization

Last Updated:Jun 17, 2026

Memberikan otorisasi lintas akun untuk sebuah VPC.

Syntax

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

Properties

Property Name Type Required Update allowed Description Constraints
AuthCode String No No Kode verifikasi. Jika Anda mengatur AuthChannel ke AUTH_CODE atau membiarkannya kosong, properti ini wajib diisi.
AuthChannel String No No Saluran otorisasi. Nilai yang valid:
  • AUTH_CODE (default): Melakukan otorisasi melalui kode verifikasi. Memverifikasi kode yang ditentukan dalam properti AuthCode.
  • RESOURCE_DIRECTORY: Melakukan otorisasi melalui resource directory. Memverifikasi bahwa hubungan tepercaya telah ada dalam resource directory antara akun yang ditentukan oleh AuthorizedUserId dan akun saat ini.
AuthorizedUserId String Yes No ID akun Alibaba Cloud yang memiliki resource yang akan diberi otorisasi. Tidak ada
AuthType String No No Jenis otorisasi. Nilainya adalah NORMAL, yang menunjukkan otorisasi standar.
IgnoreDeletionForbidden Boolean No Yes Apakah perlindungan penghapusan diabaikan. Nilai yang valid:
  • true: Mengabaikan perlindungan penghapusan.
  • false: Tidak mengabaikan perlindungan penghapusan.

Return values

Fn::GetAtt

  • AuthorizedUserId: ID akun Alibaba Cloud yang diberi otorisasi.
  • AuthType: Jenis otorisasi.

Examples

  • 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"
            ]
          }
        }
      }
    }