AWS::NetworkManager::LinkAssociation - AWS CloudFormation
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

AWS::NetworkManager::LinkAssociation

指定设备与链路之间的关联。一个设备可以关联到多个链路,一个链路可以关联到多个设备。设备和链路必须位于同一全局网络和同一站点中。

语法

要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:

JSON

{ "Type" : "AWS::NetworkManager::LinkAssociation", "Properties" : { "DeviceId" : String, "GlobalNetworkId" : String, "LinkId" : String } }

YAML

Type: AWS::NetworkManager::LinkAssociation Properties: DeviceId: String GlobalNetworkId: String LinkId: String

属性

DeviceId

链路关联的设备 ID。

必需:是

类型:字符串

Update requires: Replacement

GlobalNetworkId

全局网络的 ID。

必需:是

类型:字符串

Update requires: Replacement

LinkId

链路的 ID。

必需:是

类型:字符串

Update requires: Replacement

返回值

Ref

在将此资源的逻辑 ID 传递给内部 Ref 函数时,Ref 返回 全局网络、设备和链路的 ID。例如:global-network-01231231231231231|device-07f6fd08867abc123|link-11112222aaaabbbb1

For more information about using the Ref function, see Ref.

示例

以下示例模板创建全局网络、站点、链路和设备。它创建链路与设备之间的关联。

{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "Create global network and link association", "Resources": { "GlobalNetwork": { "Type": "AWS::NetworkManager::GlobalNetwork" }, "Site": { "Type": "AWS::NetworkManager::Site", "Properties": { "GlobalNetworkId": { "Ref": "GlobalNetwork" }, "Location": { "Address": "227 W Monroe St, Chicago, IL 60606", "Latitude": "41.8", "Longitude": "-87.6" } } }, "Link": { "Type": "AWS::NetworkManager::Link", "Properties": { "Description": "Broadband link", "GlobalNetworkId": { "Ref": "GlobalNetwork" }, "SiteId": { "Fn::GetAtt": [ "Site", "SiteId" ] }, "Bandwidth": { "DownloadSpeed": 20, "UploadSpeed": 20 }, "Provider": "AnyCompany", "Type": "Broadband", "Tags": [ { "Key": "Name", "Value": "broadband-link-1" } ] } }, "Device": { "Type": "AWS::NetworkManager::Device", "Properties": { "Description": "Chicago office device", "GlobalNetworkId": { "Ref": "GlobalNetwork" }, "SiteId": { "Fn::GetAtt": [ "Site", "SiteId" ] }, "Tags": [ { "Key": "Network", "Value": "north-america" } ] } }, "LinkAssociation": { "Type": "AWS::NetworkManager::LinkAssociation", "Properties": { "GlobalNetworkId": { "Ref": "GlobalNetwork" }, "LinkId": { "Fn::GetAtt": [ "Link", "LinkId" ] }, "DeviceId": { "Fn::GetAtt": [ "Device", "DeviceId" ] } } } } }
AWSTemplateFormatVersion: 2010-09-09 Description: 'Create global network and link association' Resources: GlobalNetwork: Type: AWS::NetworkManager::GlobalNetwork Site: Type: AWS::NetworkManager::Site Properties: GlobalNetworkId: !Ref GlobalNetwork Location: Address: "227 W Monroe St, Chicago, IL 60606" Latitude: "41.8" Longitude: "-87.6" Link: Type: AWS::NetworkManager::Link Properties: Description: Broadband link GlobalNetworkId: !Ref GlobalNetwork SiteId: !GetAtt Site.SiteId Bandwidth: DownloadSpeed: 20 UploadSpeed: 20 Provider: "AnyCompany" Type: "Broadband" Tags: - Key: Name Value: broadband-link-1 Device: Type: AWS::NetworkManager::Device Properties: Description: Chicago office device GlobalNetworkId: !Ref GlobalNetwork SiteId: !GetAtt Site.SiteId Tags: - Key: Network Value: north-america LinkAssociation: Type: AWS::NetworkManager::LinkAssociation Properties: GlobalNetworkId: !Ref GlobalNetwork LinkId: !GetAtt Link.LinkId DeviceId: !GetAtt Device.DeviceId