create_access_source
async
¶
create_access_source(
cidr: Cidr,
dns_view_id: ResourceId,
protocol: DnsProtocol,
*,
config_overrides: Optional[AsyncRoute53GlobalResolverClientConfig] = None,
client_token: Optional[ClientToken] = None,
ip_address_type: Optional[IpAddressType] = None,
name: Optional[ResourceNameShort] = None,
tags: Optional[Tags] = None,
) -> CreateAccessSourceOutput
Creates an access source for a DNS view. Access sources define IP addresses or CIDR ranges that are allowed to send DNS queries to the Route 53 Global Resolver, along with the permitted DNS protocols.
Route 53 Global Resolver is a global service that supports resolvers in multiple Amazon Web Services Regions but you must specify the US East (Ohio) Region to create, update, or otherwise work with Route 53 Global Resolver resources. That is, for example, specify --region us-east-2 on Amazon Web Services CLI commands.
Parameters:
-
cidr(Cidr) –The IP address or CIDR range that is allowed to send DNS queries to the Route 53 Global Resolver.
-
client_token(Optional[ClientToken], default:None) –A unique string that identifies the request and ensures idempotency.
-
ip_address_type(Optional[IpAddressType], default:None) –The IP address type for this access source. Valid values are IPv4 and IPv6 (if the Route 53 Global Resolver supports dual-stack).
-
name(Optional[ResourceNameShort], default:None) –A descriptive name for the access source.
-
dns_view_id(ResourceId) –The ID of the DNS view to associate with this access source.
-
protocol(DnsProtocol) –The DNS protocol that is permitted for this access source. Valid values are Do53 (DNS over port 53), DoT (DNS over TLS), and DoH (DNS over HTTPS).
-
tags(Optional[Tags], default:None) –Tags to associate with the access source.
Raises:
-
AccessDeniedException–You don't have permission to perform this operation. Check your IAM permissions and try again.
-
ConflictException–The request conflicts with the current state of the resource. This can occur when trying to modify a resource that is not in a valid state for the requested operation.
-
InternalServerException–An internal server error occurred. Try again later.
-
ResourceNotFoundException–The specified resource was not found. Verify the resource ID and try again.
-
ServiceQuotaExceededException–The request would exceed one or more service quotas. Check your current usage and quotas, then try again.
-
ThrottlingException–The request was throttled due to too many requests. Wait a moment and try again.
-
ValidationException–The input parameters are invalid. Check the parameter values and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
CreateAccessSource example
>>> await client.create_access_source(cidr='85.90.183.3/30', client_token='9fas9-9usdfa-xbi8-kco', dns_view_id='dnsv-123456789', ip_address_type='IPV4', name='My Access Source', protocol='DO53', tags={'Key1': 'Value1'})
Source code in docs_src/capo_route53globalresolver/_services/async_route53_global_resolver.py
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 | |