ALIYUN::ResourceManager::SharedTarget

更新时间:
复制为 MD 格式

ALIYUN::ResourceManager::SharedTarget类型用于关联共享资源或资源使用者。

语法

{
  "Type": "ALIYUN::ResourceManager::SharedTarget",
  "Properties": {
    "ResourceShareId": String,
    "TargetId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ResourceShareId

String

资源共享的ID。

TargetId

String

委托人的ID。

返回值

Fn::GetAtt

  • ResourceShareId:资源共享的ID。

  • ResourceShareName:资源共享的名称。

  • CreateTime:资源共享的创建时间。

  • UpdateTime:资源共享的更新时间。

  • TargetId:委托人的ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ResourceShareId:
    Type: String
    Description:
      en: The ID of the resource share.
    Required: true
  TargetId:
    Type: String
    Description:
      en: The ID of the principal.
    Default: Null
    Required: false
Resources:
  ExtensionResource:
    Type: ALIYUN::ResourceManager::SharedTarget
    Properties:
      ResourceShareId:
        Ref: ResourceShareId
      TargetId:
        Ref: TargetId
Outputs:
  ResourceShareId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceShareId
    Description: The ID of the resource share.
  UpdateTime:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - UpdateTime
    Description: Update time of the resource share.
  TargetId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TargetId
    Description: The ID of the principal.
  CreateTime:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
    Description: Create time of the resource share.
  ResourceShareName:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceShareName
    Description: The name of the resource share.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ResourceShareId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the resource share."
      },
      "Required": true
    },
    "TargetId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the principal."
      },
      "Default": null,
      "Required": false
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ResourceManager::SharedTarget",
      "Properties": {
        "ResourceShareId": {
          "Ref": "ResourceShareId"
        },
        "TargetId": {
          "Ref": "TargetId"
        }
      }
    }
  },
  "Outputs": {
    "ResourceShareId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceShareId"
        ]
      },
      "Description": "The ID of the resource share."
    },
    "UpdateTime": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "UpdateTime"
        ]
      },
      "Description": "Update time of the resource share."
    },
    "TargetId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TargetId"
        ]
      },
      "Description": "The ID of the principal."
    },
    "CreateTime": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      },
      "Description": "Create time of the resource share."
    },
    "ResourceShareName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceShareName"
        ]
      },
      "Description": "The name of the resource share."
    }
  }
}