list_custom_routing_port_mappings
async
¶
list_custom_routing_port_mappings(
accelerator_arn: GenericString,
*,
config_overrides: Optional[AsyncGlobalAcceleratorClientConfig] = 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/async_global_accelerator.py
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 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 | |