すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ALIYUN::ResourceManager::ResourceShareAssociation

最終更新日:Mar 17, 2025

ALIYUN::ResourceManager::ResourceShareAssociation は、共有リソースまたはリソースユーザーを関連付けるために使用されます。

構文

{
  "Type": "ALIYUN::ResourceManager::ResourceShareAssociation",
  "Properties": {
    "ResourceShareId": String,
    "Targets": List,
    "Resources": List,
    "PermissionNames": List
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

ResourceShareId

String

はい

いいえ

リソース共有の ID。

なし。

Targets

List

いいえ

はい

プリンシパルの ID。

有効な値:

  • リソース共有の AllowExternalTargets の値が false の場合、リソース共有はリソースディレクトリ内でのみサポートされます。この場合、このプロパティをリソースディレクトリの ID、リソースディレクトリ内のフォルダの ID、またはリソースディレクトリ内のメンバーの ID に設定できます。

  • リソース共有の AllowExternalTargets の値が true の場合、リソース共有はリソースディレクトリ内とリソースディレクトリ外の両方でサポートされます。この場合、このプロパティを独立した Alibaba Cloud アカウントの ID、リソースディレクトリの ID、リソースディレクトリ内のフォルダの ID、またはリソースディレクトリ内のメンバーの ID に設定できます。

説明

最大 5 つのプリンシパル ID を指定できます。

Resources

List

いいえ

はい

リソース。

最大 5 つのリソースを指定できます。詳細については、「Resources プロパティ」をご参照ください。

PermissionNames

List

いいえ

いいえ

権限の名前。

名前を入力しない場合、システムはリソースタイプに関連付けられているデフォルトの権限の名前を自動的に入力します。詳細については、「リソース共有の権限」をご参照ください。最大 5 つの名前を指定できます。

Resources 構文

"Resources": [
  {
    "ResourceId": String,
    "ResourceType": String
  }
]

Resources プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

ResourceId

String

はい

はい

共有リソースの ID。

一度に最大 5 つの ID を指定できます。

ResourceType

String

はい

はい

共有リソースのタイプ。

一度に最大 5 つの共有リソースを指定できます。共有できるリソースタイプの詳細については、「リソース共有と連携するサービス」をご参照ください。

説明

ResourceType を指定する場合は、ResourceId も指定する必要があります。

戻り値

Fn::GetAtt

ResourceShareId: リソース共有の ID。

  • YAML フォーマット

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      PermissionNames:
        AssociationProperty: List[Parameter]
        AssociationPropertyMetadata:
          Parameter:
            Type: String
        Description:
          en: Sharing permission name. When empty, the system automatically binds the
            default permissions associated with the resource type.
        MaxLength: 6
        Type: Json
      ResourceShareId:
        Description:
          en: The ID of the resource share.
        Type: String
      Resources:
        AssociationProperty: List[Parameter]
        AssociationPropertyMetadata:
          Parameter:
            AssociationPropertyMetadata:
              Parameters:
                ResourceId:
                  Description:
                    en: The ID of the shared resource.
                  Type: String
                ResourceType:
                  Description:
                    en: 'The type of the shared resource.
    
                      Support resource type include the following:
    
                      VPC: VSwitch, PrefixList, PublicIpAddressPool
    
                      ROS: ROSTemplate
    
                      ServiceCatalog: ServiceCatalogPortfolio
    
                      ECS: Image, Snapshot
    
                      KMS: KMSInstance'
                  Type: String
            Type: Json
        MaxLength: 5
        Type: Json
      Targets:
        AssociationProperty: List[Parameter]
        AssociationPropertyMetadata:
          Parameter:
            Type: String
        Description:
          en: 'The shared target.
    
            A shared target shares the resources of resource owners. You can share your
            resources
    
            only with the member accounts in your resource directory. A shared target
            is indicated
    
            by its account ID. For more information about how to obtain the ID, see View
            the basic information of a member account.'
        MaxLength: 5
        Type: Json
    Resources:
      ResourceShareAssociation:
        Properties:
          PermissionNames:
            Ref: PermissionNames
          ResourceShareId:
            Ref: ResourceShareId
          Resources:
            Ref: Resources
          Targets:
            Ref: Targets
        Type: ALIYUN::ResourceManager::ResourceShareAssociation
    Outputs:
      ResourceShareId:
        Description: The ID of the resource share.
        Value:
          Fn::GetAtt:
          - ResourceShareAssociation
          - ResourceShareId
                            
  • JSON フォーマット

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ResourceShareId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the resource share."
          }
        },
        "Targets": {
          "AssociationPropertyMetadata": {
            "Parameter": {
              "Type": "String"
            }
          },
          "AssociationProperty": "List[Parameter]",
          "Type": "Json",
          "Description": {
            "en": "The shared target.\nA shared target shares the resources of resource owners. You can share your resources\nonly with the member accounts in your resource directory. A shared target is indicated\nby its account ID. For more information about how to obtain the ID, see View the basic information of a member account."
          }
        },
        "Resources": {
          "AssociationPropertyMetadata": {
            "Parameter": {
              "AssociationPropertyMetadata": {
                "Parameters": {
                  "ResourceId": {
                    "Type": "String",
                    "Description": {
                      "en": "The ID of the shared resource."
                    }
                  },
                  "ResourceType": {
                    "Type": "String",
                    "Description": {
                      "en": "The type of the shared resource.\nSupport resource type include the following:\nVPC: VSwitch, PrefixList, PublicIpAddressPool\nROS: ROSTemplate\nServiceCatalog: ServiceCatalogPortfolio\nECS: Image, Snapshot\nKMS: KMSInstance"
                    }
                  }
                }
              },
              "Type": "Json"
            }
          },
          "AssociationProperty": "List[Parameter]",
          "Type": "Json",
          "MaxLength": 5
        },
        "PermissionNames": {
          "AssociationPropertyMetadata": {
            "Parameter": {
              "Type": "String"
            }
          },
          "AssociationProperty": "List[Parameter]",
          "Type": "Json",
          "Description": {
            "en": "Sharing permission name. When empty, the system automatically binds the default permissions associated with the resource type."
          },
          "MaxLength": 6
        }
      },
      "Resources": {
        "ResourceShareAssociation": {
          "Type": "ALIYUN::ResourceManager::ResourceShareAssociation",
          "Properties": {
            "ResourceShareId": {
              "Ref": "ResourceShareId"
            },
            "Targets": {
              "Ref": "Targets"
            },
            "Resources": {
              "Ref": "Resources"
            },
            "PermissionNames": {
              "Ref": "PermissionNames"
            }
          }
        }
      },
      "Outputs": {
        "ResourceShareId": {
          "Description": "The ID of the resource share.",
          "Value": {
            "Fn::GetAtt": [
              "ResourceShareAssociation",
              "ResourceShareId"
            ]
          }
        }
      }
    }