get_network_resources(
global_network_id: GlobalNetworkId,
*,
config_overrides: Optional[NetworkManagerClientConfig] = None,
core_network_id: Optional[CoreNetworkId] = None,
registered_gateway_arn: Optional[ResourceArn] = None,
aws_region: Optional[ExternalRegionCode] = None,
account_id: Optional[AWSAccountId] = None,
resource_type: Optional[ConstrainedString] = None,
resource_arn: Optional[ResourceArn] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[NextToken] = None,
) -> GetNetworkResourcesResponse
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.
Parameters:
-
global_network_id
(GlobalNetworkId)
–
The ID of the global network.
-
core_network_id
(Optional[CoreNetworkId], default:
None
)
–
The ID of a core network.
-
registered_gateway_arn
(Optional[ResourceArn], default:
None
)
–
-
aws_region
(Optional[ExternalRegionCode], default:
None
)
–
The Amazon Web Services Region.
-
account_id
(Optional[AWSAccountId], default:
None
)
–
The Amazon Web Services account ID.
-
resource_type
(Optional[ConstrainedString], default:
None
)
–
The resource type.
The following are the supported resource types for Direct Connect:
The following are the supported resource types for Network Manager:
-
attachment
-
connect-peer
-
connection
-
core-network
-
device
-
link
-
peering
-
site
The following are the supported resource types for Amazon VPC:
-
customer-gateway
-
transit-gateway
-
transit-gateway-attachment
-
transit-gateway-connect-peer
-
transit-gateway-route-table
-
vpn-connection
-
resource_arn
(Optional[ResourceArn], default:
None
)
–
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of results to return.
-
next_token
(Optional[NextToken], default:
None
)
–
The token for the next page of results.
Raises:
Source code in docs_src/capo_networkmanager/_services/network_manager.py
| def get_network_resources(
self,
global_network_id: "capo_networkmanager.types.global_network_id.GlobalNetworkId",
*,
config_overrides: Optional[NetworkManagerClientConfig] = None,
core_network_id: Optional[
"capo_networkmanager.types.core_network_id.CoreNetworkId"
] = None,
registered_gateway_arn: Optional[
"capo_networkmanager.types.resource_arn.ResourceArn"
] = None,
aws_region: Optional[
"capo_networkmanager.types.external_region_code.ExternalRegionCode"
] = None,
account_id: Optional[
"capo_networkmanager.types.aws_account_id.AWSAccountId"
] = None,
resource_type: Optional[
"capo_networkmanager.types.constrained_string.ConstrainedString"
] = None,
resource_arn: Optional[
"capo_networkmanager.types.resource_arn.ResourceArn"
] = None,
max_results: Optional[
"capo_networkmanager.types.max_results.MaxResults"
] = None,
next_token: Optional["capo_networkmanager.types.next_token.NextToken"] = None,
) -> "capo_networkmanager.types.get_network_resources_response.GetNetworkResourcesResponse":
"""<p>Describes the network resources for the specified global network.</p> <p>The results include information from the corresponding Describe call for the resource, minus any sensitive information such as pre-shared keys.</p>
Args:
global_network_id: <p>The ID of the global network.</p>
core_network_id: <p>The ID of a core network.</p>
registered_gateway_arn: <p>The ARN of the gateway.</p>
aws_region: <p>The Amazon Web Services Region.</p>
account_id: <p>The Amazon Web Services account ID.</p>
resource_type: <p>The resource type.</p> <p>The following are the supported resource types for Direct Connect:</p> <ul> <li> <p> <code>dxcon</code> </p> </li> <li> <p> <code>dx-gateway</code> </p> </li> <li> <p> <code>dx-vif</code> </p> </li> </ul> <p>The following are the supported resource types for Network Manager:</p> <ul> <li> <p> <code>attachment</code> </p> </li> <li> <p> <code>connect-peer</code> </p> </li> <li> <p> <code>connection</code> </p> </li> <li> <p> <code>core-network</code> </p> </li> <li> <p> <code>device</code> </p> </li> <li> <p> <code>link</code> </p> </li> <li> <p> <code>peering</code> </p> </li> <li> <p> <code>site</code> </p> </li> </ul> <p>The following are the supported resource types for Amazon VPC:</p> <ul> <li> <p> <code>customer-gateway</code> </p> </li> <li> <p> <code>transit-gateway</code> </p> </li> <li> <p> <code>transit-gateway-attachment</code> </p> </li> <li> <p> <code>transit-gateway-connect-peer</code> </p> </li> <li> <p> <code>transit-gateway-route-table</code> </p> </li> <li> <p> <code>vpn-connection</code> </p> </li> </ul>
resource_arn: <p>The ARN of the resource.</p>
max_results: <p>The maximum number of results to return.</p>
next_token: <p>The token for the next page of results.</p>
Raises:
capo_networkmanager.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_networkmanager.errors.internal_server_exception.InternalServerException: <p>The request has failed due to an internal error.</p>
capo_networkmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found.</p>
capo_networkmanager.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_networkmanager.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints.</p>
capo_networkmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_networkmanager.types.get_network_resources_request.GetNetworkResourcesRequest]",
) -> OperationResponse[
"capo_networkmanager.types.get_network_resources_response.GetNetworkResourcesResponse"
]:
import capo_networkmanager._operations.network_manager.get_network_resources
output, http_response = (
capo_networkmanager._operations.network_manager.get_network_resources.get_network_resources(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetNetworkResources")
)
input_: capo_networkmanager.types.get_network_resources_request.GetNetworkResourcesRequest = {
"global_network_id": global_network_id
}
if core_network_id is not None:
input_["core_network_id"] = core_network_id
if registered_gateway_arn is not None:
input_["registered_gateway_arn"] = registered_gateway_arn
if aws_region is not None:
input_["aws_region"] = aws_region
if account_id is not None:
input_["account_id"] = account_id
if resource_type is not None:
input_["resource_type"] = resource_type
if resource_arn is not None:
input_["resource_arn"] = resource_arn
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|