ALIYUN::PAI::ResourceGroup

更新时间:
复制 MD 格式

ALIYUN::PAI::ResourceGroup类型用于创建资源组。

语法

{
  "Type": "ALIYUN::PAI::ResourceGroup",
  "Properties": {
    "ComputingResourceProvider": String,
    "Description": String,
    "Name": String,
    "ResourceGroupId": String,
    "ResourceType": String,
    "Tag": List,
    "UserVpc": Map,
    "Version": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ComputingResourceProvider

String

资源组的计算资源提供商。

Description

String

资源组描述。

Name

String

资源组名称。

ResourceGroupId

String

资源组 ID。

ResourceType

String

资源组类型。

Tag

List

资源组的标签。

更多信息,请参考Tag属性

UserVpc

Map

用户 VPC 配置。

更多信息,请参考UserVpc属性

Version

String

资源组版本。

Tag语法

"Tag": [
  {
    "Value": String,
    "Key": String
  }
]

Tag属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

Value

String

标签值。

UserVpc语法

"UserVpc": {
  "VpcId": String,
  "SecurityGroupId": String,
  "DefaultRoute": String,
  "SwitchId": String,
  "DefaultForwardInfo": Map,
  "ExtendedCIDRs": List,
  "RoleArn": String
}

UserVpc属性

属性名称

类型

必须

允许更新

描述

约束

SecurityGroupId

String

控制资源组网络访问规则的安全组唯一标识符。

SwitchId

String

VPC 内用于网络连接的交换机唯一标识符。

VpcId

String

资源组所在虚拟私有云(VPC)的唯一标识符。

DefaultForwardInfo

Map

默认转发信息配置,包括用于网络流量转发的 NAT 网关和 EIP 设置。

更多信息,请参考DefaultForwardInfo属性

DefaultRoute

String

默认路由配置,指定网络流量的默认转发路径。

ExtendedCIDRs

List

用于扩展网络地址范围的附加 CIDR 块列表。

RoleArn

String

用于授权访问其他云服务的 RAM 角色 ARN。

DefaultForwardInfo语法

"DefaultForwardInfo": {
  "EipAllocationId": String,
  "NatGatewayId": String
}

DefaultForwardInfo属性

属性名称

类型

必须

允许更新

描述

约束

EipAllocationId

String

用于公网访问的弹性公网 IP(EIP)的分配 ID。

NatGatewayId

String

用于网络地址转换的 NAT 网关唯一标识符。

返回值

Fn::GetAtt

ResourceGroupID:资源组 ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ComputingResourceProvider:
    Description:
      en: The computing resource provider of the resource group.
    Required: false
    Type: String
  Description:
    AssociationProperty: TextArea
    Description:
      en: The description of the resource group.
    Required: false
    Type: String
  Name:
    Description:
      en: The name of the resource group.
    Required: false
    Type: String
  ResourceGroupId:
    AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
    Description:
      en: Resource group id.
    Required: false
    Type: String
  ResourceType:
    Description:
      en: The type of the resource group.
    Required: false
    Type: String
  Tag:
    AssociationProperty: List[Parameters]
    AssociationPropertyMetadata:
      Parameters:
        Key:
          Description:
            en: Key
          Required: true
          Type: String
        Value:
          Description:
            en: Value
          Required: true
          Type: String
    Description:
      en: The tags of the resource group.
    Required: false
    Type: Json
  UserVpc:
    AssociationPropertyMetadata:
      Parameters:
        DefaultForwardInfo:
          AssociationPropertyMetadata:
            Parameters:
              EipAllocationId:
                Description:
                  en: The allocation ID of the Elastic IP Address (EIP) for public
                    network access
                Required: false
                Type: String
              NatGatewayId:
                Description:
                  en: The unique identifier of the NAT Gateway for network address
                    translation
                Required: false
                Type: String
          Description:
            en: Default forwarding information configuration including NAT gateway
              and EIP settings for network traffic forwarding
          Required: false
          Type: Json
        DefaultRoute:
          Description:
            en: The default route configuration specifying the default forwarding
              path for network traffic
          Required: false
          Type: String
        ExtendedCIDRs:
          AssociationProperty: List[Parameter]
          AssociationPropertyMetadata:
            Parameter:
              Required: false
              Type: String
          Description:
            en: List of extended CIDR blocks for additional network address ranges
          Required: false
          Type: Json
        RoleArn:
          Description:
            en: The Amazon Resource Name (ARN) of the RAM role for authorizing access
              to other cloud services
          Required: false
          Type: String
        SecurityGroupId:
          AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
          AssociationPropertyMetadata:
            VpcId: ${VpcId}
          Description:
            en: The unique identifier of the security group that controls network
              access rules for the resource group
          Required: true
          Type: String
        SwitchId:
          Description:
            en: The unique identifier of the vSwitch within the VPC for network connectivity
          Required: true
          Type: String
        VpcId:
          AssociationProperty: ALIYUN::ECS::VPC::VPCId
          Description:
            en: The unique identifier of the Virtual Private Cloud (VPC) where the
              resource group is located
          Required: true
          Type: String
    Description:
      en: User VPC configuration containing network settings for the resource group
    Required: false
    Type: Json
  Version:
    Description:
      en: The version of the resource group.
    Required: false
    Type: String
Resources:
  ResourceGroup:
    Properties:
      ComputingResourceProvider:
        Ref: ComputingResourceProvider
      Description:
        Ref: Description
      Name:
        Ref: Name
      ResourceGroupId:
        Ref: ResourceGroupId
      ResourceType:
        Ref: ResourceType
      Tag:
        Ref: Tag
      UserVpc:
        Ref: UserVpc
      Version:
        Ref: Version
    Type: ALIYUN::PAI::ResourceGroup
Outputs:
  ResourceGroupID:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ResourceGroup
        - ResourceGroupID
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Description": {
      "Type": "String",
      "AssociationProperty": "TextArea",
      "Description": {
        "en": "The description of the resource group."
      },
      "Required": false
    },
    "ComputingResourceProvider": {
      "Type": "String",
      "Description": {
        "en": "The computing resource provider of the resource group."
      },
      "Required": false
    },
    "ResourceGroupId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
      "Description": {
        "en": "Resource group id."
      },
      "Required": false
    },
    "Version": {
      "Type": "String",
      "Description": {
        "en": "The version of the resource group."
      },
      "Required": false
    },
    "ResourceType": {
      "Type": "String",
      "Description": {
        "en": "The type of the resource group."
      },
      "Required": false
    },
    "Tag": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Value": {
            "Type": "String",
            "Description": {
              "en": "Value"
            },
            "Required": true
          },
          "Key": {
            "Type": "String",
            "Description": {
              "en": "Key"
            },
            "Required": true
          }
        }
      },
      "Type": "Json",
      "AssociationProperty": "List[Parameters]",
      "Description": {
        "en": "The tags of the resource group."
      },
      "Required": false
    },
    "UserVpc": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "VpcId": {
            "Type": "String",
            "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
            "Description": {
              "en": "The unique identifier of the Virtual Private Cloud (VPC) where the resource group is located"
            },
            "Required": true
          },
          "SecurityGroupId": {
            "AssociationPropertyMetadata": {
              "VpcId": "${VpcId}"
            },
            "Type": "String",
            "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
            "Description": {
              "en": "The unique identifier of the security group that controls network access rules for the resource group"
            },
            "Required": true
          },
          "DefaultRoute": {
            "Type": "String",
            "Description": {
              "en": "The default route configuration specifying the default forwarding path for network traffic"
            },
            "Required": false
          },
          "SwitchId": {
            "Type": "String",
            "Description": {
              "en": "The unique identifier of the vSwitch within the VPC for network connectivity"
            },
            "Required": true
          },
          "DefaultForwardInfo": {
            "AssociationPropertyMetadata": {
              "Parameters": {
                "EipAllocationId": {
                  "Type": "String",
                  "Description": {
                    "en": "The allocation ID of the Elastic IP Address (EIP) for public network access"
                  },
                  "Required": false
                },
                "NatGatewayId": {
                  "Type": "String",
                  "Description": {
                    "en": "The unique identifier of the NAT Gateway for network address translation"
                  },
                  "Required": false
                }
              }
            },
            "Type": "Json",
            "Description": {
              "en": "Default forwarding information configuration including NAT gateway and EIP settings for network traffic forwarding"
            },
            "Required": false
          },
          "ExtendedCIDRs": {
            "AssociationPropertyMetadata": {
              "Parameter": {
                "Type": "String",
                "Required": false
              }
            },
            "Type": "Json",
            "AssociationProperty": "List[Parameter]",
            "Description": {
              "en": "List of extended CIDR blocks for additional network address ranges"
            },
            "Required": false
          },
          "RoleArn": {
            "Type": "String",
            "Description": {
              "en": "The Amazon Resource Name (ARN) of the RAM role for authorizing access to other cloud services"
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "User VPC configuration containing network settings for the resource group"
      },
      "Required": false
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of the resource group."
      },
      "Required": false
    }
  },
  "Resources": {
    "ResourceGroup": {
      "Type": "ALIYUN::PAI::ResourceGroup",
      "Properties": {
        "Description": {
          "Ref": "Description"
        },
        "ComputingResourceProvider": {
          "Ref": "ComputingResourceProvider"
        },
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "Version": {
          "Ref": "Version"
        },
        "ResourceType": {
          "Ref": "ResourceType"
        },
        "Tag": {
          "Ref": "Tag"
        },
        "UserVpc": {
          "Ref": "UserVpc"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "ResourceGroupID": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ResourceGroup",
          "ResourceGroupID"
        ]
      }
    }
  }
}