Grants cross-account authorization for a 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 | The verification code. | If you set AuthChannel to AUTH_CODE or leave it empty, this property is required. |
| AuthChannel | String | No | No | The authorization channel. | Valid values:
|
| AuthorizedUserId | String | Yes | No | The Alibaba Cloud account ID that owns the resources to be authorized. | None |
| AuthType | String | No | No | The authorization type. | The value is NORMAL, which indicates standard authorization. |
| IgnoreDeletionForbidden | Boolean | No | Yes | Whether to ignore deletion protection. | Valid values:
|
Return values
Fn::GetAtt
- AuthorizedUserId: The ID of the Alibaba Cloud account that is granted authorization.
- AuthType: The authorization type.
Examples
-
JSONformat{ "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" ] } } } }
该文章对您有帮助吗?