다음 코드 예시에서는 AWS Direct Connect에서 AWS Command Line Interface를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다.
작업은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 관련 시나리오의 컨텍스트에 따라 표시되며, 개별 서비스 함수를 직접적으로 호출하는 방법을 보여줍니다.
각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.
주제
작업
다음 코드 예시에서는 accept-direct-connect-gateway-association-proposal
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
게이트웨이 연결 제안 수락
다음
accept-direct-connect-gateway-association-proposal
은 지정된 제안을 수락합니다.aws directconnect accept-direct-connect-gateway-association-proposal \ --direct-connect-gateway-id
11460968-4ac1-4fd3-bdb2-00599EXAMPLE
\ --proposal-idcb7f41cb-8128-43a5-93b1-dcaedEXAMPLE
\ --associated-gateway-owner-account111122223333
{
"directConnectGatewayAssociation":{
"directConnectGatewayId": "11460968-4ac1-4fd3-bdb2-00599EXAMPLE", "directConnectGatewayOwnerAccount": "111122223333", "associationState": "associating", "associatedGateway":{
"id": "tgw-02f776b1a7EXAMPLE", "type": "transitGateway", "ownerAccount": "111122223333", "region":"us-east-1"
},
"associationId": "6441f8bf-5917-4279-ade1-9708bEXAMPLE", "allowedPrefixesToDirectConnectGateway":[
{
"cidr":"192.168.1.0/30"
}
]
}
}
자세한 내용은 AWS Direct Connect 사용 설명서의 Creating a Hosted Transit Virtual Interface를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 AcceptDirectConnectGatewayAssociationProposal
섹션을 참조하세요.
-
다음 코드 예시에서는 allocate-connection-on-interconnect
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
인터커넥트에서 호스팅 연결 생성
다음
allocate-connection-on-interconnect
명령은 인터커넥트에서 호스팅 연결을 생성합니다.aws directconnect allocate-connection-on-interconnect --bandwidth
500Mbps
--connection-namemydcinterconnect
--owner-account123456789012
--interconnect-iddxcon-fgktov66
--vlan101
출력:
{ "partnerName": "TIVIT", "vlan": 101, "ownerAccount": "123456789012", "connectionId": "dxcon-ffzc51m1", "connectionState": "ordering", "bandwidth": "500Mbps", "location": "TIVIT", "connectionName": "mydcinterconnect", "region": "sa-east-1" }
-
API 세부 정보는 AWS CLI 명령 참조의 AllocateConnectionOnInterconnect
섹션을 참조하세요.
-
다음 코드 예시에서는 allocate-hosted-connection
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
인터커넥트에서 호스팅 연결 생성
다음
allocate-hosted-connection
예시에서는 지정된 인터커넥트에 호스팅 연결을 생성합니다.aws directconnect allocate-hosted-connection \ --bandwidth
500Mbps
\ --connection-namemydcinterconnect
\ --owner-account123456789012
-connection-id
dxcon-fgktov66
-vlan
101
출력:
{ "partnerName": "TIVIT", "vlan": 101, "ownerAccount": "123456789012", "connectionId": "dxcon-ffzc51m1", "connectionState": "ordering", "bandwidth": "500Mbps", "location": "TIVIT", "connectionName": "mydcinterconnect", "region": "sa-east-1" }
-
API 세부 정보는 AWS CLI 명령 참조의 AllocateHostedConnection
섹션을 참조하세요.
-
다음 코드 예시에서는 allocate-private-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
프라이빗 가상 인터페이스 프로비저닝
다음
allocate-private-virtual-interface
명령은 다른 고객이 소유할 프라이빗 가상 인터페이스를 프로비저닝합니다.aws directconnect allocate-private-virtual-interface --connection-id
dxcon-ffjrkx17
--owner-account123456789012
--new-private-virtual-interface-allocationvirtualInterfaceName=PrivateVirtualInterface,vlan=1000,asn=65000,authKey=asdf34example,amazonAddress=192.168.1.1/30,customerAddress=192.168.1.2/30
출력:
{ "virtualInterfaceState": "confirming", "asn": 65000, "vlan": 1000, "customerAddress": "192.168.1.2/30", "ownerAccount": "123456789012", "connectionId": "dxcon-ffjrkx17", "virtualInterfaceId": "dxvif-fgy8orxu", "authKey": "asdf34example", "routeFilterPrefixes": [], "location": "TIVIT", "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <logical_connection id=\"dxvif-fgy8orxu\">\n <vlan>1000</vlan>\n <customer_address>192.168.1.2/30</customer_address>\n <amazon_address>192.168.1.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>asdf34example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>private</connection_type>\n</logical_connection>\n", "amazonAddress": "192.168.1.1/30", "virtualInterfaceType": "private", "virtualInterfaceName": "PrivateVirtualInterface" }
-
API 세부 정보는 AWS CLI 명령 참조의 AllocatePrivateVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 allocate-public-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
가상 퍼블릭 인터페이스 프로비저닝
다음
allocate-public-virtual-interface
명령은 다른 고객이 소유할 퍼블릭 가상 인터페이스를 프로비저닝합니다.aws directconnect allocate-public-virtual-interface --connection-id
dxcon-ffjrkx17
--owner-account123456789012
--new-public-virtual-interface-allocationvirtualInterfaceName=PublicVirtualInterface,vlan=2000,asn=65000,authKey=asdf34example,amazonAddress=203.0.113.1/30,customerAddress=203.0.113.2/30,routeFilterPrefixes=[{cidr=203.0.113.0/30},{cidr=203.0.113.4/30}]
출력:
{ "virtualInterfaceState": "confirming", "asn": 65000, "vlan": 2000, "customerAddress": "203.0.113.2/30", "ownerAccount": "123456789012", "connectionId": "dxcon-ffjrkx17", "virtualInterfaceId": "dxvif-fg9xo9vp", "authKey": "asdf34example", "routeFilterPrefixes": [ { "cidr": "203.0.113.0/30" }, { "cidr": "203.0.113.4/30" } ], "location": "TIVIT", "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fg9xo9vp\">\n <vlan>2000</vlan>\n <customer_address>203.0.113.2/30</customer_address>\n <amazon_address>203.0.113.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>asdf34example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>public</connection_type>\n</logical_connection>\n", "amazonAddress": "203.0.113.1/30", "virtualInterfaceType": "public", "virtualInterfaceName": "PublicVirtualInterface" }
-
API 세부 정보는 AWS CLI 명령 참조의 AllocatePublicVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 allocate-transit-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
지정된 AWS 계정에서 소유할 전송 가상 인터페이스를 프로비저닝하는 방법
다음
allocate-transit-virtual-interface
예시에서는 지정된 계정에 대한 전송 가상화 인터페이스를 프로비저닝합니다.aws directconnect allocate-transit-virtual-interface \ --connection-id
dxlag-fEXAMPLE
\ --owner-account123456789012
\ --new-transit-virtual-interface-allocation"virtualInterfaceName=Example Transit Virtual Interface,vlan=126,asn=65110,mtu=1500,authKey=0xzxgA9YoW9h58u8SEXAMPLE,amazonAddress=192.168.1.1/30,customerAddress=192.168.1.2/30,addressFamily=ipv4,tags=[{key=Tag,value=Example}]"
출력:
{ "virtualInterface": { "ownerAccount": "123456789012", "virtualInterfaceId": "dxvif-fEXAMPLE", "location": "loc1", "connectionId": "dxlag-fEXAMPLE", "virtualInterfaceType": "transit", "virtualInterfaceName": "Example Transit Virtual Interface", "vlan": 126, "asn": 65110, "amazonSideAsn": 7224, "authKey": "0xzxgA9YoW9h58u8SEXAMPLE", "amazonAddress": "192.168.1.1/30", "customerAddress": "192.168.1.2/30", "addressFamily": "ipv4", "virtualInterfaceState": "confirming", "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fEXAMPLE\">\n <vlan>126</vlan>\n <customer_address>192.168.1.2/30</customer_address>\n <amazon_address>192.168.1.1/30</amazon_address>\n <bgp_asn>65110</bgp_asn>\n <bgp_auth_key>0xzxgA9YoW9h58u8SEXAMPLE</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>transit</connection_type>\n</logical_connection>\n", "mtu": 1500, "jumboFrameCapable": true, "virtualGatewayId": "", "directConnectGatewayId": "", "routeFilterPrefixes": [], "bgpPeers": [ { "bgpPeerId": "dxpeer-fEXAMPLE", "asn": 65110, "authKey": "0xzxgA9YoW9h58u8EXAMPLE", "addressFamily": "ipv4", "amazonAddress": "192.168.1.1/30", "customerAddress": "192.168.1.2/30", "bgpPeerState": "pending", "bgpStatus": "down", "awsDeviceV2": "loc1-26wz6vEXAMPLE" } ], "region": "sa-east-1", "awsDeviceV2": "loc1-26wz6vEXAMPLE", "tags": [ { "key": "Tag", "value": "Example" } ] } }
자세한 내용은 AWS Direct Connect 사용 설명서의 Creating a Hosted Transit Virtual Interface를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 AllocateTransitVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 associate-connection-with-lag
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
연결을 LAG에 연결
다음 예시에서는 지정된 연결을 지정된 LAG와 연결합니다.
명령:
aws directconnect associate-connection-with-lag --lag-id
dxlag-fhccu14t
--connection-iddxcon-fg9607vm
출력:
{ "ownerAccount": "123456789012", "connectionId": "dxcon-fg9607vm", "lagId": "dxlag-fhccu14t", "connectionState": "requested", "bandwidth": "1Gbps", "location": "EqDC2", "connectionName": "Con2ForLag", "region": "us-east-1" }
-
API 세부 정보는 AWS CLI 명령 참조의 AssociateConnectionWithLag
섹션을 참조하세요.
-
다음 코드 예시에서는 associate-hosted-connection
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
호스팅 연결을 LAG에 연결
다음 예시에서는 지정된 호스팅 연결을 지정된 LAG와 연결합니다.
명령:
aws directconnect associate-hosted-connection --parent-connection-id
dxlag-fhccu14t
--connection-iddxcon-fg9607vm
출력:
{ "partnerName": "TIVIT", "vlan": 101, "ownerAccount": "123456789012", "connectionId": "dxcon-fg9607vm", "lagId": "dxlag-fhccu14t", "connectionState": "ordering", "bandwidth": "500Mbps", "location": "TIVIT", "connectionName": "mydcinterconnect", "region": "sa-east-1" }
-
API 세부 정보는 AWS CLI 명령 참조의 AssociateHostedConnection
섹션을 참조하세요.
-
다음 코드 예시에서는 associate-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
가상 인터페이스를 연결에 연결하는 방법
다음 예시에서는 지정된 가상 인터페이스를 지정된 LAG와 연결합니다. 또는 가상 인터페이스를 연결에 연결하려면
--connection-id
에 대한 AWS Direct Connect 연결의 ID를 지정합니다(예:dxcon-ffnikghc
).명령:
aws directconnect associate-virtual-interface --connection-id
dxlag-ffjhj9lx
--virtual-interface-iddxvif-fgputw0j
출력:
{ "virtualInterfaceState": "pending", "asn": 65000, "vlan": 123, "customerAddress": "169.254.255.2/30", "ownerAccount": "123456789012", "connectionId": "dxlag-ffjhj9lx", "addressFamily": "ipv4", "virtualGatewayId": "vgw-38e90b51", "virtualInterfaceId": "dxvif-fgputw0j", "authKey": "0x123pK5_VBqv.UQ3kJ4123_", "routeFilterPrefixes": [], "location": "CSVA1", "bgpPeers": [ { "bgpStatus": "down", "customerAddress": "169.254.255.2/30", "addressFamily": "ipv4", "authKey": "0x123pK5_VBqv.UQ3kJ4123_", "bgpPeerState": "deleting", "amazonAddress": "169.254.255.1/30", "asn": 65000 }, { "bgpStatus": "down", "customerAddress": "169.254.255.2/30", "addressFamily": "ipv4", "authKey": "0x123pK5_VBqv.UQ3kJ4123_", "bgpPeerState": "pending", "amazonAddress": "169.254.255.1/30", "asn": 65000 } ], "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fgputw0j\">\n <vlan>123</vlan>\n <customer_address>169.254.255.2/30</customer_address>\n <amazon_address>169.254.255.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>0x123pK5_VBqv.UQ3kJ4123_</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>private</connection_type>\n</logical_connection>\n", "amazonAddress": "169.254.255.1/30", "virtualInterfaceType": "private", "virtualInterfaceName": "VIF1A" }
-
API 세부 정보는 AWS CLI 명령 참조의 AssociateVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 confirm-connection
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
인터커넥트에서 호스팅 연결의 생성 확인
다음
confirm-connection
명령은 인터커넥트에서 호스팅 연결 생성을 확인합니다.aws directconnect confirm-connection --connection-id
dxcon-fg2wi7hy
출력:
{ "connectionState": "pending" }
-
API 세부 정보는 AWS CLI 명령 참조의 ConfirmConnection
섹션을 참조하세요.
-
다음 코드 예시에서는 confirm-private-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
프라이빗 가상 인터페이스의 소유권을 수락하는 방법
다음
confirm-private-virtual-interface
명령은 다른 고객이 만든 프라이빗 가상 인터페이스의 소유권을 허용합니다.aws directconnect confirm-private-virtual-interface --virtual-interface-id
dxvif-fgy8orxu
--virtual-gateway-idvgw-e4a47df9
출력:
{ "virtualInterfaceState": "pending" }
-
API 세부 정보는 AWS CLI 명령 참조의 ConfirmPrivateVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 confirm-public-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
퍼블릭 가상 인터페이스의 소유권을 수락하는 방법
다음
confirm-public-virtual-interface
명령은 다른 고객이 만든 퍼블릭 가상 인터페이스의 소유권을 허용합니다.aws directconnect confirm-public-virtual-interface --virtual-interface-id
dxvif-fg9xo9vp
출력:
{ "virtualInterfaceState": "verifying" }
-
API 세부 정보는 AWS CLI 명령 참조의 ConfirmPublicVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 confirm-transit-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
전송 가상 인터페이스의 소유권을 수락하는 방법
다음
confirm-transit-virtual-interface
는 다른 고객이 만든 전송 가상 인터페이스의 소유권을 허용합니다.aws directconnect confirm-transit-virtual-interface \ --virtual-interface-id
dxvif-fEXAMPLE
\ --direct-connect-gateway-id4112ccf9-25e9-4111-8237-b6c5dEXAMPLE
출력:
{ "virtualInterfaceState": "pending" }
자세한 내용은 AWS Direct Connect 사용 설명서의 Accepting a Hosted Virtual Interface를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ConfirmTransitVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 create-bgp-peer
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
IPv6 BGP 피어링 세션을 생성하는 방법
다음 예시에서는 프라이빗 가상 인터페이스
dxvif-fg1vuj3d
에서 IPv6 BGP 피어링 세션을 생성합니다. 피어 IPv6 주소는 Amazon에서 자동으로 할당합니다.명령:
aws directconnect create-bgp-peer --virtual-interface-id
dxvif-fg1vuj3d
--new-bgp-peerasn=64600,addressFamily=ipv6
출력:
{ "virtualInterface": { "virtualInterfaceState": "available", "asn": 65000, "vlan": 125, "customerAddress": "169.254.255.2/30", "ownerAccount": "123456789012", "connectionId": "dxcon-fguhmqlc", "addressFamily": "ipv4", "virtualGatewayId": "vgw-f9eb0c90", "virtualInterfaceId": "dxvif-fg1vuj3d", "authKey": "0xC_ukbCerl6EYA0example", "routeFilterPrefixes": [], "location": "EqDC2", "bgpPeers": [ { "bgpStatus": "down", "customerAddress": "169.254.255.2/30", "addressFamily": "ipv4", "authKey": "0xC_ukbCerl6EYA0uexample", "bgpPeerState": "available", "amazonAddress": "169.254.255.1/30", "asn": 65000 }, { "bgpStatus": "down", "customerAddress": "2001:db8:1100:2f0:0:1:9cb4:4216/125", "addressFamily": "ipv6", "authKey": "0xS27kAIU_VHPjjAexample", "bgpPeerState": "pending", "amazonAddress": "2001:db8:1100:2f0:0:1:9cb4:4211/125", "asn": 64600 } ], "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fg1vuj3d\">\n <vlan>125</vlan>\n <customer_address>169.254.255.2/30</customer_address>\n <amazon_address>169.254.255.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>0xC_ukbCerl6EYA0uexample</bgp_auth_key>\n <ipv6_customer_address>2001:db8:1100:2f0:0:1:9cb4:4216/125</ipv6_customer_address>\n <ipv6_amazon_address>2001:db8:1100:2f0:0:1:9cb4:4211/125</ipv6_amazon_address>\n <ipv6_bgp_asn>64600</ipv6_bgp_asn>\n <ipv6_bgp_auth_key>0xS27kAIU_VHPjjAexample</ipv6_bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>private</connection_type>\n</logical_connection>\n", "amazonAddress": "169.254.255.1/30", "virtualInterfaceType": "private", "virtualInterfaceName": "Test" } }
-
API 세부 정보는 AWS CLI 명령 참조의 CreateBgpPeer
섹션을 참조하세요.
-
다음 코드 예시에서는 create-connection
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
네트워크에서 AWS Direct Connect 위치로 연결을 생성하는 방법
다음
create-connection
명령은 네트워크에서 AWS Direct Connect 위치로의 연결을 생성합니다.aws directconnect create-connection --location
TIVIT
--bandwidth1Gbps
--connection-name"Connection to AWS"
출력:
{ "ownerAccount": "123456789012", "connectionId": "dxcon-fg31dyv6", "connectionState": "requested", "bandwidth": "1Gbps", "location": "TIVIT", "connectionName": "Connection to AWS", "region": "sa-east-1" }
-
API 세부 정보는 AWS CLI 명령 참조의 CreateConnection
섹션을 참조하세요.
-
다음 코드 예시에서는 create-direct-connect-gateway-association-proposal
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
지정된 전송 게이트웨이를 지정된 Direct Connect 게이트웨이와 연결하는 제안 생성
다음
create-direct-connect-gateway-association-proposal
예시에서는 지정된 전송 게이트웨이를 지정된 Direct Connect 게이트웨이와 연결하는 제안을 생성합니다.aws directconnect create-direct-connect-gateway-association-proposal \ --direct-connect-gateway-id
11460968-4ac1-4fd3-bdb2-00599EXAMPLE
\ --direct-connect-gateway-owner-account111122223333
\ --gateway-idtgw-02f776b1a7EXAMPLE
\ --add-allowed-prefixes-to-direct-connect-gatewaycidr=192.168.1.0/30
출력:
{ "directConnectGatewayAssociationProposal": { "proposalId": "cb7f41cb-8128-43a5-93b1-dcaedEXAMPLE", "directConnectGatewayId": "11460968-4ac1-4fd3-bdb2-00599EXAMPLE", "directConnectGatewayOwnerAccount": "111122223333", "proposalState": "requested", "associatedGateway": { "id": "tgw-02f776b1a7EXAMPLE", "type": "transitGateway", "ownerAccount": "111122223333", "region": "us-east-1" }, "requestedAllowedPrefixesToDirectConnectGateway": [ { "cidr": "192.168.1.0/30" } ] } }
자세한 내용은 AWS Direct Connect 사용 설명서의 Creating a Transit Gateway Association Proposal을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 CreateDirectConnectGatewayAssociationProposal
섹션을 참조하세요.
-
다음 코드 예시에서는 create-direct-connect-gateway-association
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
가상 프라이빗 게이트웨이를 Direct Connect 게이트웨이와 연결
다음 예시에서는 가상 프라이빗 게이트웨이
vgw-6efe725e
를 Direct Connect 게이트웨이5f294f92-bafb-4011-916d-9b0bexample
와 연결합니다. 가상 프라이빗 게이트웨이가 위치한 리전에서 명령을 실행해야 합니다.명령:
aws directconnect create-direct-connect-gateway-association --direct-connect-gateway-id
5f294f92-bafb-4011-916d-9b0bexample
--virtual-gateway-idvgw-6efe725e
출력:
{ "directConnectGatewayAssociation": { "associationState": "associating", "virtualGatewayOwnerAccount": "123456789012", "directConnectGatewayId": "5f294f92-bafb-4011-916d-9b0bexample", "virtualGatewayId": "vgw-6efe725e", "virtualGatewayRegion": "us-east-2" } }
-
API 세부 정보는 AWS CLI 명령 참조의 CreateDirectConnectGatewayAssociation
섹션을 참조하세요.
-
다음 코드 예시에서는 create-direct-connect-gateway
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Direct Connect 게이트웨이 생성
다음 예시에서는 이름이
DxGateway1
인 Direct Connect 게이트웨이를 생성합니다.명령:
aws directconnect create-direct-connect-gateway --direct-connect-gateway-name
"DxGateway1"
출력:
{ "directConnectGateway": { "amazonSideAsn": 64512, "directConnectGatewayId": "5f294f92-bafb-4011-916d-9b0bdexample", "ownerAccount": "123456789012", "directConnectGatewayName": "DxGateway1", "directConnectGatewayState": "available" } }
-
API 세부 정보는 AWS CLI 명령 참조의 CreateDirectConnectGateway
섹션을 참조하세요.
-
다음 코드 예시에서는 create-interconnect
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
파트너의 네트워크와 간의 상호 연결을 생성하는 방법 AWS
다음
create-interconnect
예시에서는 AWS Direct Connect 파트너의 네트워크와 특정 AWS Direct Connect 위치 간에 새 인터커넥트를 생성합니다.aws directconnect create-interconnect --interconnect-name
"1G Interconnect to AWS"
--bandwidth1Gbps
--locationTIVIT
출력:
{ "region": "sa-east-1", "bandwidth": "1Gbps", "location": "TIVIT", "interconnectName": "1G Interconnect to AWS", "interconnectId": "dxcon-fgktov66", "interconnectState": "requested" }
-
API 세부 정보는 AWS CLI 명령 참조의CreateInterconnect
섹션을 참조하세요.
-
다음 코드 예시에서는 create-lag
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
새 연결을 사용하여 LAG 생성
다음 예시에서는 LAG를 생성하고 대역폭이 1Gbps인 LAG에 대한 두 개의 새 AWS Direct Connect 연결을 요청합니다.
명령:
aws directconnect create-lag --location
CSVA1
--number-of-connections2
--connections-bandwidth1Gbps
--lag-name1GBLag
출력:
{ "awsDevice": "CSVA1-23u8tlpaz8iks", "numberOfConnections": 2, "lagState": "pending", "ownerAccount": "123456789012", "lagName": "1GBLag", "connections": [ { "ownerAccount": "123456789012", "connectionId": "dxcon-ffqr6x5q", "lagId": "dxlag-ffjhj9lx", "connectionState": "requested", "bandwidth": "1Gbps", "location": "CSVA1", "connectionName": "Requested Connection 1 for Lag dxlag-ffjhj9lx", "region": "us-east-1" }, { "ownerAccount": "123456789012", "connectionId": "dxcon-fflqyj95", "lagId": "dxlag-ffjhj9lx", "connectionState": "requested", "bandwidth": "1Gbps", "location": "CSVA1", "connectionName": "Requested Connection 2 for Lag dxlag-ffjhj9lx", "region": "us-east-1" } ], "lagId": "dxlag-ffjhj9lx", "minimumLinks": 0, "connectionsBandwidth": "1Gbps", "region": "us-east-1", "location": "CSVA1" }
기존 연결을 사용하여 LAG 생성
다음 예시에서는 계정의 기존 연결에서 LAG를 생성하고 기존 연결과 동일한 대역폭 및 위치를 가진 LAG에 대한 두 번째 새 연결을 요청합니다.
명령:
aws directconnect create-lag --location
EqDC2
--number-of-connections2
--connections-bandwidth1Gbps
--lag-name2ConnLAG
--connection-iddxcon-fgk145dr
출력:
{ "awsDevice": "EqDC2-4h6ce2r1bes6", "numberOfConnections": 2, "lagState": "pending", "ownerAccount": "123456789012", "lagName": "2ConnLAG", "connections": [ { "ownerAccount": "123456789012", "connectionId": "dxcon-fh6ljcvo", "lagId": "dxlag-fhccu14t", "connectionState": "requested", "bandwidth": "1Gbps", "location": "EqDC2", "connectionName": "Requested Connection 1 for Lag dxlag-fhccu14t", "region": "us-east-1" }, { "ownerAccount": "123456789012", "connectionId": "dxcon-fgk145dr", "lagId": "dxlag-fhccu14t", "connectionState": "down", "bandwidth": "1Gbps", "location": "EqDC2", "connectionName": "VAConn1", "region": "us-east-1" } ], "lagId": "dxlag-fhccu14t", "minimumLinks": 0, "connectionsBandwidth": "1Gbps", "region": "us-east-1", "location": "EqDC2" }
-
API 세부 정보는 AWS CLI 명령 참조의 CreateLag
섹션을 참조하세요.
-
다음 코드 예시에서는 create-private-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
가상 프라이빗 인터페이스 생성
다음
create-private-virtual-interface
명령은 프라이빗 가상 인터페이스를 생성합니다.aws directconnect create-private-virtual-interface --connection-id
dxcon-ffjrkx17
--new-private-virtual-interfacevirtualInterfaceName=PrivateVirtualInterface,vlan=101,asn=65000,authKey=asdf34example,amazonAddress=192.168.1.1/30,customerAddress=192.168.1.2/30,virtualGatewayId=vgw-aba37db6
출력:
{ "virtualInterfaceState": "pending", "asn": 65000, "vlan": 101, "customerAddress": "192.168.1.2/30", "ownerAccount": "123456789012", "connectionId": "dxcon-ffjrkx17", "virtualGatewayId": "vgw-aba37db6", "virtualInterfaceId": "dxvif-ffhhk74f", "authKey": "asdf34example", "routeFilterPrefixes": [], "location": "TIVIT", "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-ffhhk74f\">\n <vlan>101</vlan>\n <customer_address>192.168.1.2/30</customer_address>\n <amazon_address>192.168.1.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>asdf34example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>private</connection_type>\n</logical_connection>\n", "amazonAddress": "192.168.1.1/30", "virtualInterfaceType": "private", "virtualInterfaceName": "PrivateVirtualInterface" }
-
API 세부 정보는 AWS CLI 명령 참조의 CreatePrivateVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 create-public-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
가상 퍼블릭 인터페이스 생성
다음
create-public-virtual-interface
명령은 퍼블릭 가상 인터페이스를 생성합니다.aws directconnect create-public-virtual-interface --connection-id
dxcon-ffjrkx17
--new-public-virtual-interfacevirtualInterfaceName=PublicVirtualInterface,vlan=2000,asn=65000,authKey=asdf34example,amazonAddress=203.0.113.1/30,customerAddress=203.0.113.2/30,routeFilterPrefixes=[{cidr=203.0.113.0/30},{cidr=203.0.113.4/30}]
출력:
{ "virtualInterfaceState": "verifying", "asn": 65000, "vlan": 2000, "customerAddress": "203.0.113.2/30", "ownerAccount": "123456789012", "connectionId": "dxcon-ffjrkx17", "virtualInterfaceId": "dxvif-fgh0hcrk", "authKey": "asdf34example", "routeFilterPrefixes": [ { "cidr": "203.0.113.0/30" }, { "cidr": "203.0.113.4/30" } ], "location": "TIVIT", "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fgh0hcrk\">\n <vlan>2000</vlan>\n <customer_address>203.0.113.2/30</customer_address>\n <amazon_address>203.0.113.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>asdf34example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>public</connection_type>\n</logical_connection>\n", "amazonAddress": "203.0.113.1/30", "virtualInterfaceType": "public", "virtualInterfaceName": "PublicVirtualInterface" }
-
API 세부 정보는 AWS CLI 명령 참조의 CreatePublicVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 create-transit-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
호스팅되는 전송 가상 인터페이스 생성
다음
create-transit-virtual-interface
예시에서는 지정된 연결을 위한 전송 가상 인터페이스를 생성합니다.aws directconnect create-transit-virtual-interface \ --connection-id
dxlag-fEXAMPLE
\ --new-transit-virtual-interface"virtualInterfaceName=Example Transit Virtual Interface,vlan=126,asn=65110,mtu=1500,authKey=0xzxgA9YoW9h58u8SvEXAMPLE,amazonAddress=192.168.1.1/30,customerAddress=192.168.1.2/30,addressFamily=ipv4,directConnectGatewayId=8384da05-13ce-4a91-aada-5a1baEXAMPLE,tags=[{key=Tag,value=Example}]"
출력:
{ "virtualInterface": { "ownerAccount": "1111222233333", "virtualInterfaceId": "dxvif-fEXAMPLE", "location": "loc1", "connectionId": "dxlag-fEXAMPLE", "virtualInterfaceType": "transit", "virtualInterfaceName": "Example Transit Virtual Interface", "vlan": 126, "asn": 65110, "amazonSideAsn": 4200000000, "authKey": "0xzxgA9YoW9h58u8SEXAMPLE", "amazonAddress": "192.168.1.1/30", "customerAddress": "192.168.1.2/30", "addressFamily": "ipv4", "virtualInterfaceState": "pending", "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fEXAMPLE\">\n <vlan>126</vlan>\n <customer_address>192.168.1.2/30</customer_address>\n <amazon_address>192.168.1.1/30</amazon_address>\n <bgp_asn>65110</bgp_asn>\n <bgp_auth_key>0xzxgA9YoW9h58u8SvOmXRTw</bgp_auth_key>\n <amazon_bgp_asn>4200000000</amazon_bgp_asn>\n <connection_type>transit</connection_type>\n</logical_connection>\n", "mtu": 1500, "jumboFrameCapable": true, "virtualGatewayId": "", "directConnectGatewayId": "8384da05-13ce-4a91-aada-5a1baEXAMPLE", "routeFilterPrefixes": [], "bgpPeers": [ { "bgpPeerId": "dxpeer-EXAMPLE", "asn": 65110, "authKey": "0xzxgA9YoW9h58u8SEXAMPLE", "addressFamily": "ipv4", "amazonAddress": "192.168.1.1/30", "customerAddress": "192.168.1.2/30", "bgpPeerState": "pending", "bgpStatus": "down", "awsDeviceV2": "loc1-26wz6vEXAMPLE" } ], "region": "sa-east-1", "awsDeviceV2": "loc1-26wz6vEXAMPLE", "tags": [ { "key": "Tag", "value": "Example" } ] } }
자세한 내용은 AWS Direct Connect 사용 설명서의 Creating a Transit Virtual Interface to the Direct Connect Gateway를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 CreateTransitVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 delete-bgp-peer
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
가상 인터페이스에서 BGP 피어를 삭제하는 방법
다음 예시에서는 가상 인터페이스
dxvif-fg1vuj3d
에서 IPv6 BGP 피어를 삭제합니다.명령:
aws directconnect delete-bgp-peer --virtual-interface-id
dxvif-fg1vuj3d
--asn64600
--customer-address2001:db8:1100:2f0:0:1:9cb4:4216/125
출력:
{ "virtualInterface": { "virtualInterfaceState": "available", "asn": 65000, "vlan": 125, "customerAddress": "169.254.255.2/30", "ownerAccount": "123456789012", "connectionId": "dxcon-fguhmqlc", "addressFamily": "ipv4", "virtualGatewayId": "vgw-f9eb0c90", "virtualInterfaceId": "dxvif-fg1vuj3d", "authKey": "0xC_ukbCerl6EYA0example", "routeFilterPrefixes": [], "location": "EqDC2", "bgpPeers": [ { "bgpStatus": "down", "customerAddress": "169.254.255.2/30", "addressFamily": "ipv4", "authKey": "0xC_ukbCerl6EYA0uexample", "bgpPeerState": "available", "amazonAddress": "169.254.255.1/30", "asn": 65000 }, { "bgpStatus": "down", "customerAddress": "2001:db8:1100:2f0:0:1:9cb4:4216/125", "addressFamily": "ipv6", "authKey": "0xS27kAIU_VHPjjAexample", "bgpPeerState": "deleting", "amazonAddress": "2001:db8:1100:2f0:0:1:9cb4:4211/125", "asn": 64600 } ], "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fg1vuj3d\">\n <vlan>125</vlan>\n <customer_address>169.254.255.2/30</customer_address>\n <amazon_address>169.254.255.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>0xC_ukbCerl6EYA0example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>private</connection_type>\n</logical_connection>\n", "amazonAddress": "169.254.255.1/30", "virtualInterfaceType": "private", "virtualInterfaceName": "Test" } }
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteBgpPeer
섹션을 참조하세요.
-
다음 코드 예시에서는 delete-connection
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
연결 삭제
다음
delete-connection
명령은 지정된 연결을 삭제합니다.aws directconnect delete-connection --connection-id
dxcon-fg31dyv6
출력:
{ "ownerAccount": "123456789012", "connectionId": "dxcon-fg31dyv6", "connectionState": "deleted", "bandwidth": "1Gbps", "location": "TIVIT", "connectionName": "Connection to AWS", "region": "sa-east-1" }
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteConnection
섹션을 참조하세요.
-
다음 코드 예시에서는 delete-direct-connect-gateway-association
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Direct Connect 게이트웨이 연결 삭제
다음
delete-direct-connect-gateway-association
예시에서는 지정된 연결 ID가 있는 전송 게이트웨이와의 Direct Connect 게이트웨이 연결을 삭제합니다.aws directconnect delete-direct-connect-gateway-association --association-id
be85116d-46eb-4b43-a27a-da0c2ad648de
출력:
{ "directConnectGatewayAssociation": { "directConnectGatewayId": "11460968-4ac1-4fd3-bdb2-00599EXAMPlE", "directConnectGatewayOwnerAccount": "123456789012", "associationState": "disassociating", "associatedGateway": { "id": "tgw-095b3b0b54EXAMPLE", "type": "transitGateway", "ownerAccount": "123456789012", "region": "us-east-1" }, "associationId": " be85116d-46eb-4b43-a27a-da0c2ad648deEXAMPLE ", "allowedPrefixesToDirectConnectGateway": [ { "cidr": "192.0.1.0/28" } ] } }
자세한 내용은 AWS Direct Connect 사용 설명서의 Associating and Disassociating Transit Gateways를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteDirectConnectGatewayAssociation
섹션을 참조하세요.
-
다음 코드 예시에서는 delete-direct-connect-gateway
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Direct Connect 게이트웨이 삭제
다음 예시에서는 Direct Connect 게이트웨이
5f294f92-bafb-4011-916d-9b0bexample
을 삭제합니다.명령:
aws directconnect delete-direct-connect-gateway --direct-connect-gateway-id
5f294f92-bafb-4011-916d-9b0bexample
출력:
{ "directConnectGateway": { "amazonSideAsn": 64512, "directConnectGatewayId": "5f294f92-bafb-4011-916d-9b0bexample", "ownerAccount": "123456789012", "directConnectGatewayName": "DxGateway1", "directConnectGatewayState": "deleting" } }
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteDirectConnectGateway
섹션을 참조하세요.
-
다음 코드 예시에서는 delete-interconnect
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
상호 연결을 삭제하는 방법
다음
delete-interconnect
명령은 지정된 인터커넥트를 삭제합니다.aws directconnect delete-interconnect --interconnect-id
dxcon-fgktov66
출력:
{ "interconnectState": "deleted" }
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteInterconnect
섹션을 참조하세요.
-
다음 코드 예시에서는 delete-lag
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
LAG 삭제
다음 예시에서는 지정한 LAG를 삭제합니다.
명령:
aws directconnect delete-lag --lag-id
dxlag-ffrhowd9
출력:
{ "awsDevice": "EqDC2-4h6ce2r1bes6", "numberOfConnections": 0, "lagState": "deleted", "ownerAccount": "123456789012", "lagName": "TestLAG", "connections": [], "lagId": "dxlag-ffrhowd9", "minimumLinks": 0, "connectionsBandwidth": "1Gbps", "region": "us-east-1", "location": "EqDC2" }
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteLag
섹션을 참조하세요.
-
다음 코드 예시에서는 delete-virtual-interface
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
가상 인터페이스 삭제
다음
delete-virtual-interface
명령은 지정된 가상 인터페이스를 삭제합니다.aws directconnect delete-virtual-interface --virtual-interface-id
dxvif-ffhhk74f
출력:
{ "virtualInterfaceState": "deleting" }
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteVirtualInterface
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-connection-loa
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Linux 또는 Mac OS X를 사용하여 연결에 대한 LOA-CFA를 설명하는 방법
다음 예시에서는
dxcon-fh6ayh1d
연결에 대한 LOA-CFA를 설명합니다. LOA-CFA의 콘텐츠는 base64로 인코딩됩니다. 이 명령은--output
및--query
파라미터를 사용하여 출력을 제어하고loaContent
구조의 내용을 추출합니다. 명령의 마지막 부분은base64
유틸리티를 사용하여 콘텐츠를 디코딩하고 출력을 PDF 파일로 전송합니다.aws directconnect describe-connection-loa --connection-id
dxcon-fh6ayh1d
--outputtext
--queryloa.loaContent|base64
--decode>
myLoaCfa.pdf
Windows를 사용하여 연결에 대한 LOA-CFA를 설명하는 방법
이전 예시에서는
base64
유틸리티를 사용하여 출력을 디코딩해야 합니다. Windows 컴퓨터에서는 대신certutil
을 사용할 수 있습니다. 다음 예시에서 첫 번째 명령은dxcon-fh6ayh1d
연결용 LOA-CFA를 설명하고--output
및--query
파라미터를 사용하여 출력을 제어하고loaContent
구조의 내용을myLoaCfa.base64
파일로 추출합니다. 두 번째 명령은certutil
유틸리티를 사용하여 파일을 디코딩하고 출력을 PDF 파일로 내보냅니다.aws directconnect describe-connection-loa --connection-id
dxcon-fh6ayh1d
--outputtext
--queryloa.loaContent
>
myLoaCfa.base64
certutil -decode myLoaCfa.base64 myLoaCfa.pdf
AWS CLI 출력 제어에 대한 자세한 내용은 AWS Command Line Interface 사용 설명서의 AWS Command Line Interface에서 명령 출력 제어를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeConnectionLoa
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-connections-on-interconnect
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
상호 연결의 연결을 나열하는 방법
다음
describe-connections-on-interconnect
명령은 지정된 인터커넥트에서 프로비저닝된 연결을 나열합니다.aws directconnect describe-connections-on-interconnect --interconnect-id
dxcon-fgktov66
출력:
{ "connections": [ { "partnerName": "TIVIT", "vlan": 101, "ownerAccount": "123456789012", "connectionId": "dxcon-ffzc51m1", "connectionState": "ordering", "bandwidth": "500Mbps", "location": "TIVIT", "connectionName": "mydcinterconnect", "region": "sa-east-1" } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeConnectionsOnInterconnect
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-connections
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
현재 리전의 모든 연결을 나열하는 방법
다음
describe-connections
명령은 현재 리전의 모든 연결을 나열합니다.aws directconnect describe-connections
출력:
{ "connections": [ { "awsDevice": "EqDC2-123h49s71dabc", "ownerAccount": "123456789012", "connectionId": "dxcon-fguhmqlc", "lagId": "dxlag-ffrz71kw", "connectionState": "down", "bandwidth": "1Gbps", "location": "EqDC2", "connectionName": "My_Connection", "loaIssueTime": 1491568964.0, "region": "us-east-1" } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeConnections
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-direct-connect-gateway-association-proposals
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Direct Connect 게이트웨이 연결 제안 설명
다음
describe-direct-connect-gateway-association-proposals
예시에서는 Direct Connect 게이트웨이 연결 제안에 대한 세부 정보를 보여줍니다.aws directconnect describe-direct-connect-gateway-association-proposals
출력:
{ "directConnectGatewayAssociationProposals": [ { "proposalId": "c2ede9b4-bbc6-4d33-923c-bc4feEXAMPLE", "directConnectGatewayId": "11460968-4ac1-4fd3-bdb2-00599EXAMPLE", "directConnectGatewayOwnerAccount": "111122223333", "proposalState": "requested", "associatedGateway": { "id": "tgw-02f776b1a7EXAMPLE", "type": "transitGateway", "ownerAccount": "111122223333", "region": "us-east-1" }, "existingAllowedPrefixesToDirectConnectGateway": [ { "cidr": "192.168.2.0/30" }, { "cidr": "192.168.1.0/30" } ], "requestedAllowedPrefixesToDirectConnectGateway": [ { "cidr": "192.168.1.0/30" } ] }, { "proposalId": "cb7f41cb-8128-43a5-93b1-dcaedEXAMPLE", "directConnectGatewayId": "11560968-4ac1-4fd3-bcb2-00599EXAMPLE", "directConnectGatewayOwnerAccount": "111122223333", "proposalState": "accepted", "associatedGateway": { "id": "tgw-045776b1a7EXAMPLE", "type": "transitGateway", "ownerAccount": "111122223333", "region": "us-east-1" }, "existingAllowedPrefixesToDirectConnectGateway": [ { "cidr": "192.168.4.0/30" }, { "cidr": "192.168.5.0/30" } ], "requestedAllowedPrefixesToDirectConnectGateway": [ { "cidr": "192.168.5.0/30" } ] } ] }
자세한 내용은 AWS Direct Connect 사용 설명서의 Associating and Disassociating Transit Gateways를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeDirectConnectGatewayAssociationProposals
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-direct-connect-gateway-associations
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Direct Connect 게이트웨이 연결 설명
다음 예시에서는 Direct Connect 게이트웨이
5f294f92-bafb-4011-916d-9b0bexample
과의 모든 연결을 설명합니다.명령:
aws directconnect describe-direct-connect-gateway-associations --direct-connect-gateway-id
5f294f92-bafb-4011-916d-9b0bexample
출력:
{ "nextToken": "eyJ2IjoxLCJzIjoxLCJpIjoiOU83OTFodzdycnZCbkN4MExHeHVwQT09IiwiYyI6InIxTEN0UEVHV0I1UFlkaWFnNlUxanJkRWF6eW1iOElHM0FRVW1MdHRJK0dxcnN1RWtvcFBKWFE2ZjRNRGdGTkhCa0tDZmVINEtZOEYwZ0dEYWZpbmU0ZnZMYVhKRjdXRVdENmdQZ1Y4d2w0PSJ9", "directConnectGatewayAssociations": [ { "associationState": "associating", "virtualGatewayOwnerAccount": "123456789012", "directConnectGatewayId": "5f294f92-bafb-4011-916d-9b0bexample", "virtualGatewayId": "vgw-6efe725e", "virtualGatewayRegion": "us-east-2" }, { "associationState": "disassociating", "virtualGatewayOwnerAccount": "123456789012", "directConnectGatewayId": "5f294f92-bafb-4011-916d-9b0bexample", "virtualGatewayId": "vgw-ebaa27db", "virtualGatewayRegion": "us-east-2" } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeDirectConnectGatewayAssociations
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-direct-connect-gateway-attachments
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Direct Connect 게이트웨이 연결 설명
다음 예시에서는 Direct Connect 게이트웨이
5f294f92-bafb-4011-916d-9b0bexample
에 연결된 가상 인터페이스를 설명합니다.명령:
aws directconnect describe-direct-connect-gateway-attachments --direct-connect-gateway-id
5f294f92-bafb-4011-916d-9b0bexample
출력:
{ "directConnectGatewayAttachments": [ { "virtualInterfaceOwnerAccount": "123456789012", "directConnectGatewayId": "5f294f92-bafb-4011-916d-9b0bexample", "virtualInterfaceRegion": "us-east-2", "attachmentState": "attaching", "virtualInterfaceId": "dxvif-fg9zyabc" } ], "nextToken": "eyJ2IjoxLCJzIjoxLCJpIjoibEhXdlNpUXF5RzhoL1JyUW52SlV2QT09IiwiYyI6Im5wQjFHQ0RyQUdRS3puNnNXcUlINCtkTTA4dTk3KzBiU0xtb05JQmlaczZ6NXRIYmk3c3VESUxFTTd6a2FzVHM0VTFwaGJkZGNxTytqWmQ3QzMzOGRQaTVrTThrOG1zelRsV3gyMWV3VTNFPSJ9" }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeDirectConnectGatewayAttachments
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-direct-connect-gateways
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Direct Connect 게이트웨이를 설명하는 방법
다음 예시에서는 모든 Direct Connect 게이트웨이를 설명합니다.
명령:
aws directconnect describe-direct-connect-gateways
출력:
{ "directConnectGateways": [ { "amazonSideAsn": 64512, "directConnectGatewayId": "cf68415c-f4ae-48f2-87a7-3b52cexample", "ownerAccount": "123456789012", "directConnectGatewayName": "DxGateway2", "directConnectGatewayState": "available" }, { "amazonSideAsn": 64512, "directConnectGatewayId": "5f294f92-bafb-4011-916d-9b0bdexample", "ownerAccount": "123456789012", "directConnectGatewayName": "DxGateway1", "directConnectGatewayState": "available" } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeDirectConnectGateways
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-hosted-connections
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
상호 연결의 연결을 나열하는 방법
다음 예시에서는 지정된 인터커넥트에서 프로비저닝된 연결을 나열합니다.
명령:
aws directconnect describe-hosted-connections --connection-id
dxcon-fgktov66
출력:
{ "connections": [ { "partnerName": "TIVIT", "vlan": 101, "ownerAccount": "123456789012", "connectionId": "dxcon-ffzc51m1", "connectionState": "ordering", "bandwidth": "500Mbps", "location": "TIVIT", "connectionName": "mydcinterconnect", "region": "sa-east-1" } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeHostedConnections
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-interconnect-loa
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Linux 또는 Mac OS X를 사용하여 상호 연결에 대한 LOA-CFA를 설명하는 방법
다음 예시에서는 인터커넥트
dxcon-fh6ayh1d
에 대한 LOA-CFA를 설명합니다. LOA-CFA의 콘텐츠는 base64로 인코딩됩니다. 이 명령은--output
및--query
파라미터를 사용하여 출력을 제어하고loaContent
구조의 내용을 추출합니다. 명령의 마지막 부분은base64
유틸리티를 사용하여 콘텐츠를 디코딩하고 출력을 PDF 파일로 전송합니다.aws directconnect describe-interconnect-loa --interconnect-id
dxcon-fh6ayh1d
--outputtext
--queryloa.loaContent|base64
--decode>
myLoaCfa.pdf
Windows를 사용하여 상호 연결에 대한 LOA-CFA 설명
이전 예시에서는
base64
유틸리티를 사용하여 출력을 디코딩해야 합니다. Windows 컴퓨터에서는 대신certutil
을 사용할 수 있습니다. 다음 예시에서 첫 번째 명령은dxcon-fh6ayh1d
인터커넥트용 LOA-CFA를 설명하고--output
및--query
파라미터를 사용하여 출력을 제어하고loaContent
구조의 내용을myLoaCfa.base64
파일로 추출합니다. 두 번째 명령은certutil
유틸리티를 사용하여 파일을 디코딩하고 출력을 PDF 파일로 내보냅니다.aws directconnect describe-interconnect-loa --interconnect-id
dxcon-fh6ayh1d
--outputtext
--queryloa.loaContent
>
myLoaCfa.base64
certutil -decode myLoaCfa.base64 myLoaCfa.pdf
AWS CLI 출력 제어에 대한 자세한 내용은 AWS Command Line Interface 사용 설명서의 AWS Command Line Interface에서 명령 출력 제어를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeInterconnectLoa
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-interconnects
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
상호 연결을 나열하는 방법
다음
describe-interconnects
명령은 AWS 계정에서 소유한 인터커넥트를 나열합니다.aws directconnect describe-interconnects
출력:
{ "interconnects": [ { "region": "sa-east-1", "bandwidth": "1Gbps", "location": "TIVIT", "interconnectName": "1G Interconnect to AWS", "interconnectId": "dxcon-fgktov66", "interconnectState": "down" } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeInterconnects
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-lags
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
LAGs 설명하는 방법
다음 명령은 현재 리전에 대한 모든 LAG를 설명합니다.
명령:
aws directconnect describe-lags
출력:
{ "lags": [ { "awsDevice": "EqDC2-19y7z3m17xpuz", "numberOfConnections": 2, "lagState": "down", "ownerAccount": "123456789012", "lagName": "DA-LAG", "connections": [ { "ownerAccount": "123456789012", "connectionId": "dxcon-ffnikghc", "lagId": "dxlag-fgsu9erb", "connectionState": "requested", "bandwidth": "10Gbps", "location": "EqDC2", "connectionName": "Requested Connection 1 for Lag dxlag-fgsu9erb", "region": "us-east-1" }, { "ownerAccount": "123456789012", "connectionId": "dxcon-fglgbdea", "lagId": "dxlag-fgsu9erb", "connectionState": "requested", "bandwidth": "10Gbps", "location": "EqDC2", "connectionName": "Requested Connection 2 for Lag dxlag-fgsu9erb", "region": "us-east-1" } ], "lagId": "dxlag-fgsu9erb", "minimumLinks": 0, "connectionsBandwidth": "10Gbps", "region": "us-east-1", "location": "EqDC2" } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeLags
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-loa
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Linux 또는 Mac OS X를 사용하여 연결에 대한 LOA-CFA를 설명하는 방법
다음 예시에서는
dxcon-fh6ayh1d
연결에 대한 LOA-CFA를 설명합니다. LOA-CFA의 콘텐츠는 base64로 인코딩됩니다. 이 명령은--output
및--query
파라미터를 사용하여 출력을 제어하고loaContent
구조의 내용을 추출합니다. 명령의 마지막 부분은base64
유틸리티를 사용하여 콘텐츠를 디코딩하고 출력을 PDF 파일로 전송합니다.aws directconnect describe-loa --connection-id
dxcon-fh6ayh1d
--outputtext
--queryloa.loaContent|base64
--decode>
myLoaCfa.pdf
Windows를 사용하여 연결에 대한 LOA-CFA를 설명하는 방법
이전 예시에서는
base64
유틸리티를 사용하여 출력을 디코딩해야 합니다. Windows 컴퓨터에서는 대신certutil
을 사용할 수 있습니다. 다음 예시에서 첫 번째 명령은dxcon-fh6ayh1d
연결용 LOA-CFA를 설명하고--output
및--query
파라미터를 사용하여 출력을 제어하고loaContent
구조의 내용을myLoaCfa.base64
파일로 추출합니다. 두 번째 명령은certutil
유틸리티를 사용하여 파일을 디코딩하고 출력을 PDF 파일로 내보냅니다.aws directconnect describe-loa --connection-id
dxcon-fh6ayh1d
--outputtext
--queryloa.loaContent
>
myLoaCfa.base64
certutil -decode myLoaCfa.base64 myLoaCfa.pdf
AWS CLI 출력 제어에 대한 자세한 내용은 AWS Command Line Interface 사용 설명서의 AWS Command Line Interface에서 명령 출력 제어를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeLoa
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-locations
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
AWS Direct Connect 파트너 및 위치를 나열하는 방법
다음
describe-locations
명령은 현재 리전의 AWS Direct Connect 파트너 및 위치를 나열합니다.aws directconnect describe-locations
출력:
{ "locations": [ { "locationName": "NAP do Brasil, Barueri, Sao Paulo", "locationCode": "TNDB" }, { "locationName": "Tivit - Site Transamerica (Sao Paulo)", "locationCode": "TIVIT" } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeLocations
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-tags
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
AWS Direct Connect 리소스에 대한 태그를 설명하는 방법
다음 명령은 연결
dxcon-abcabc12
에 대한 태그를 설명합니다.명령:
aws directconnect describe-tags --resource-arns
arn:aws:directconnect:us-east-1:123456789012:dxcon/dxcon-abcabc12
출력:
{ "resourceTags": [ { "resourceArn": "arn:aws:directconnect:us-east-1:123456789012:dxcon/dxcon-abcabc12", "tags": [ { "value": "VAConnection", "key": "Name" } ] } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeTags
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-virtual-gateways
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
가상 프라이빗 게이트웨이 나열
다음
describe-virtual-gateways
명령은 AWS 계정에서 소유한 가상 프라이빗 게이트웨이를 나열합니다.aws directconnect describe-virtual-gateways
출력:
{ "virtualGateways": [ { "virtualGatewayId": "vgw-aba37db6", "virtualGatewayState": "available" } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeVirtualGateways
섹션을 참조하세요.
-
다음 코드 예시에서는 describe-virtual-interfaces
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
모든 가상 인터페이스를 나열하는 방법
다음
describe-virtual-interfaces
명령은 AWS 계정과 연결된 모든 가상 인터페이스에 대한 정보를 나열합니다.aws directconnect describe-virtual-interfaces --connection-id
dxcon-ffjrkx17
출력:
{ "virtualInterfaces": [ { "virtualInterfaceState": "down", "asn": 65000, "vlan": 101, "customerAddress": "192.168.1.2/30", "ownerAccount": "123456789012", "connectionId": "dxcon-ffjrkx17", "virtualGatewayId": "vgw-aba37db6", "virtualInterfaceId": "dxvif-ffhhk74f", "authKey": "asdf34example", "routeFilterPrefixes": [], "location": "TIVIT", "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-ffhhk74f\">\n <vlan>101</vlan>\n <customer_address>192.168.1.2/30</customer_address>\n <amazon_address>192.168.1.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>asdf34example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>private</connection_type>\n</logical_connection>\n", "amazonAddress": "192.168.1.1/30", "virtualInterfaceType": "private", "virtualInterfaceName": "PrivateVirtualInterface" }, { "virtualInterfaceState": "verifying", "asn": 65000, "vlan": 2000, "customerAddress": "203.0.113.2/30", "ownerAccount": "123456789012", "connectionId": "dxcon-ffjrkx17", "virtualGatewayId": "", "virtualInterfaceId": "dxvif-fgh0hcrk", "authKey": "asdf34example", "routeFilterPrefixes": [ { "cidr": "203.0.113.4/30" }, { "cidr": "203.0.113.0/30" } ], "location": "TIVIT", "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fgh0hcrk\">\n <vlan>2000</vlan>\n <customer_address>203.0.113.2/30</customer_address>\n <amazon_address>203.0.113.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>asdf34example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>public</connection_type>\n</logical_connection>\n", "amazonAddress": "203.0.113.1/30", "virtualInterfaceType": "public", "virtualInterfaceName": "PublicVirtualInterface" } ] }
-
API 세부 정보는 AWS CLI 명령 참조의 DescribeVirtualInterfaces
섹션을 참조하세요.
-
다음 코드 예시에서는 disassociate-connection-from-lag
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
연결을 LAG에서 연결 해제
다음 예시에서는 지정된 연결을 지정된 LAG와의 연결을 해제합니다.
명령:
aws directconnect disassociate-connection-from-lag --lag-id
dxlag-fhccu14t
--connection-iddxcon-fg9607vm
출력:
{ "ownerAccount": "123456789012", "connectionId": "dxcon-fg9607vm", "connectionState": "requested", "bandwidth": "1Gbps", "location": "EqDC2", "connectionName": "Con2ForLag", "region": "us-east-1" }
-
API 세부 정보는 AWS CLI 명령 참조의 DisassociateConnectionFromLag
섹션을 참조하세요.
-
다음 코드 예시에서는 tag-resource
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
AWS Direct Connect 리소스에 태그를 추가하는 방법
다음 명령은 키가
Name
이고 값이VAConnection
인 태그를 연결dxcon-abcabc12
에 추가합니다. 이 명령이 성공하면 출력이 반환되지 않습니다.명령:
aws directconnect tag-resource --resource-arn
arn:aws:directconnect:us-east-1:123456789012:dxcon/dxcon-abcabc12
--tags"key=Name,value=VAConnection"
-
API 세부 정보는 AWS CLI 명령 참조의 TagResource
를 참조하세요.
-
다음 코드 예시에서는 untag-resource
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
AWS Direct Connect 리소스에서 태그를 제거하는 방법
다음 명령은 연결
dxcon-abcabc12
에서Name
키가 있는 태그를 제거합니다. 이 명령이 성공하면 출력이 반환되지 않습니다.명령:
aws directconnect untag-resource --resource-arn
arn:aws:directconnect:us-east-1:123456789012:dxcon/dxcon-abcabc12
--tag-keysName
-
API 세부 정보는 AWS CLI 명령 참조의 UntagResource
를 참조하세요.
-
다음 코드 예시에서는 update-direct-connect-gateway-association
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
Direct Connect 게이트웨이 연결의 지정된 속성 업데이트
다음
update-direct-connect-gateway-association
예시에서는 지정된 CIDR 블록을 Direct Connect 게이트웨이 연결에 추가합니다.aws directconnect update-direct-connect-gateway-association \ --association-id
820a6e4f-5374-4004-8317-3f64bEXAMPLE
\ --add-allowed-prefixes-to-direct-connect-gatewaycidr=192.168.2.0/30
출력:
{ "directConnectGatewayAssociation": { "directConnectGatewayId": "11460968-4ac1-4fd3-bdb2-00599EXAMPLE", "directConnectGatewayOwnerAccount": "111122223333", "associationState": "updating", "associatedGateway": { "id": "tgw-02f776b1a7EXAMPLE", "type": "transitGateway", "ownerAccount": "111122223333", "region": "us-east-1" }, "associationId": "820a6e4f-5374-4004-8317-3f64bEXAMPLE", "allowedPrefixesToDirectConnectGateway": [ { "cidr": "192.168.2.0/30" }, { "cidr": "192.168.1.0/30" } ] } }
자세한 내용은 AWS Direct Connect 사용 설명서의 Working with Direct Connect Gateways를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 UpdateDirectConnectGatewayAssociation
섹션을 참조하세요.
-
다음 코드 예시에서는 update-lag
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
LAG 업데이트
다음 예시에서는 지정된 LAG의 이름을 변경합니다.
명령:
aws directconnect update-lag --lag-id
dxlag-ffjhj9lx
--lag-name2ConnLag
출력:
{ "awsDevice": "CSVA1-23u8tlpaz8iks", "numberOfConnections": 2, "lagState": "down", "ownerAccount": "123456789012", "lagName": "2ConnLag", "connections": [ { "ownerAccount": "123456789012", "connectionId": "dxcon-fflqyj95", "lagId": "dxlag-ffjhj9lx", "connectionState": "requested", "bandwidth": "1Gbps", "location": "CSVA1", "connectionName": "Requested Connection 2 for Lag dxlag-ffjhj9lx", "region": "us-east-1" }, { "ownerAccount": "123456789012", "connectionId": "dxcon-ffqr6x5q", "lagId": "dxlag-ffjhj9lx", "connectionState": "requested", "bandwidth": "1Gbps", "location": "CSVA1", "connectionName": "Requested Connection 1 for Lag dxlag-ffjhj9lx", "region": "us-east-1" } ], "lagId": "dxlag-ffjhj9lx", "minimumLinks": 0, "connectionsBandwidth": "1Gbps", "region": "us-east-1", "location": "CSVA1" }
-
API 세부 정보는 AWS CLI 명령 참조의 UpdateLag
섹션을 참조하세요.
-
다음 코드 예시에서는 update-virtual-interface-attributes
코드를 사용하는 방법을 보여줍니다.
- AWS CLI
-
가상 인터페이스의 MTU를 업데이트하는 방법
다음
update-virtual-interface-attributes
예시에서는 지정된 가상 인터페이스의 MTU를 업데이트합니다.aws directconnect update-virtual-interface-attributes \ --virtual-interface-id
dxvif-fEXAMPLE
\ --mtu1500
출력:
{ "ownerAccount": "1111222233333", "virtualInterfaceId": "dxvif-fEXAMPLE", "location": "loc1", "connectionId": "dxlag-fEXAMPLE", "virtualInterfaceType": "transit", "virtualInterfaceName": "example transit virtual interface", "vlan": 125, "asn": 650001, "amazonSideAsn": 64512, "authKey": "0xzxgA9YoW9h58u8SEXAMPLE", "amazonAddress": "169.254.248.1/30", "customerAddress": "169.254.248.2/30", "addressFamily": "ipv4", "virtualInterfaceState": "down", "customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fEXAMPLE\">\n <vlan>125</vlan>\n <customer_address>169.254.248.2/30</customer_address>\n <amazon_address>169.254.248.1/30</amazon_address>\n <bgp_asn>650001</bgp_asn>\n <bgp_auth_key>0xzxgA9YoW9h58u8SEXAMPLE</bgp_auth_key>\n <amazon_bgp_asn>64512</amazon_bgp_asn>\n <connection_type>transit</connection_type>\n</logical_connection>\n", "mtu": 1500, "jumboFrameCapable": true, "virtualGatewayId": "", "directConnectGatewayId": "879b76a1-403d-4700-8b53-4a56ed85436e", "routeFilterPrefixes": [], "bgpPeers": [ { "bgpPeerId": "dxpeer-fEXAMPLE", "asn": 650001, "authKey": "0xzxgA9YoW9h58u8SEXAMPLE", "addressFamily": "ipv4", "amazonAddress": "169.254.248.1/30", "customerAddress": "169.254.248.2/30", "bgpPeerState": "available", "bgpStatus": "down", "awsDeviceV2": "loc1-26wz6vEXAMPLE" } ], "region": "sa-east-1", "awsDeviceV2": "loc1-26wz6vEXAMPLE", "tags": [] }
자세한 내용은 AWS Direct Connect 사용 설명서의 Setting Network MTU for Private Virtual Interfaces or Transit Virtual Interfaces를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 UpdateVirtualInterfaceAttributes
섹션을 참조하세요.
-