getNetworkResources method
Describes the network resources for the specified global network.
The results include information from the corresponding Describe call for the resource, minus any sensitive information such as pre-shared keys.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter globalNetworkId :
The ID of the global network.
Parameter accountId :
The Amazon Web Services account ID.
Parameter awsRegion :
The Amazon Web Services Region.
Parameter coreNetworkId :
The ID of a core network.
Parameter maxResults :
The maximum number of results to return.
Parameter nextToken :
The token for the next page of results.
Parameter registeredGatewayArn :
The ARN of the gateway.
Parameter resourceArn :
The ARN of the resource.
Parameter resourceType :
The resource type.
The following are the supported resource types for Direct Connect:
-
dxcon -
dx-gateway -
dx-vif
-
attachment -
connect-peer -
connection -
core-network -
device -
link -
peering -
site
-
customer-gateway -
transit-gateway -
transit-gateway-attachment -
transit-gateway-connect-peer -
transit-gateway-route-table -
vpn-connection
Implementation
Future<GetNetworkResourcesResponse> getNetworkResources({
required String globalNetworkId,
String? accountId,
String? awsRegion,
String? coreNetworkId,
int? maxResults,
String? nextToken,
String? registeredGatewayArn,
String? resourceArn,
String? resourceType,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
500,
);
final $query = <String, List<String>>{
if (accountId != null) 'accountId': [accountId],
if (awsRegion != null) 'awsRegion': [awsRegion],
if (coreNetworkId != null) 'coreNetworkId': [coreNetworkId],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (registeredGatewayArn != null)
'registeredGatewayArn': [registeredGatewayArn],
if (resourceArn != null) 'resourceArn': [resourceArn],
if (resourceType != null) 'resourceType': [resourceType],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/global-networks/${Uri.encodeComponent(globalNetworkId)}/network-resources',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetNetworkResourcesResponse.fromJson(response);
}