list_custom_routing_port_mappings
¶
list_custom_routing_port_mappings(
accelerator_arn: GenericString,
*,
config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
endpoint_group_arn: Optional[GenericString] = None,
max_results: Optional[PortMappingsMaxResults] = None,
next_token: Optional[GenericString] = None,
) -> ListCustomRoutingPortMappingsResponse
Provides a complete mapping from the public accelerator IP address and port to destination EC2 instance IP addresses and ports in the virtual public cloud (VPC) subnet endpoint for a custom routing accelerator. For each subnet endpoint that you add, Global Accelerator creates a new static port mapping for the accelerator. The port mappings don't change after Global Accelerator generates them, so you can retrieve and cache the full mapping on your servers.
If you remove a subnet from your accelerator, Global Accelerator removes (reclaims) the port mappings. If you add a subnet to your accelerator, Global Accelerator creates new port mappings (the existing ones don't change). If you add or remove EC2 instances in your subnet, the port mappings don't change, because the mappings are created when you add the subnet to Global Accelerator.
The mappings also include a flag for each destination denoting which destination IP addresses and ports are allowed or denied traffic.
Parameters:
-
accelerator_arn(GenericString) –The Amazon Resource Name (ARN) of the accelerator to list the custom routing port mappings for.
-
endpoint_group_arn(Optional[GenericString], default:None) –The Amazon Resource Name (ARN) of the endpoint group to list the custom routing port mappings for.
-
max_results(Optional[PortMappingsMaxResults], default:None) –The number of destination port mappings that you want to return with this call. The default value is 10.
-
next_token(Optional[GenericString], default:None) –The token for the next set of results. You receive this token from a previous call.
Raises:
-
AcceleratorNotFoundException–The accelerator that you specified doesn't exist.
-
EndpointGroupNotFoundException–The endpoint group that you specified doesn't exist.
-
InternalServiceErrorException–There was an internal error for Global Accelerator.
-
InvalidArgumentException–An argument that you specified is invalid.
-
InvalidNextTokenException–There isn't another item to return.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_global_accelerator/_services/global_accelerator.py
2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 | |