Updates a DNS Firewall domain list from an array of specified domains.
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:
-
domains
(Domains)
–
A list of the domains. You can add up to 1000 domains per request.
-
firewall_domain_list_id
(ResourceId)
–
The ID of the DNS Firewall domain list to which you want to add the domains.
-
operation
(str)
–
The operation for updating the domain list. The allowed values are ADD, REMOVE, and REPLACE.
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.
Source code in docs_src/capo_route53globalresolver/_services/route53_global_resolver.py
| def update_firewall_domains(
self,
domains: "capo_route53globalresolver.types.domains.Domains",
firewall_domain_list_id: "capo_route53globalresolver.types.resource_id.ResourceId",
operation: str,
*,
config_overrides: Optional[Route53GlobalResolverClientConfig] = None,
) -> "capo_route53globalresolver.types.update_firewall_domains_output.UpdateFirewallDomainsOutput":
"""<p>Updates a DNS Firewall domain list from an array of specified domains.</p> <important> <p>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 <code>--region us-east-2</code> on Amazon Web Services CLI commands.</p> </important>
Args:
domains: <p>A list of the domains. You can add up to 1000 domains per request.</p>
firewall_domain_list_id: <p>The ID of the DNS Firewall domain list to which you want to add the domains.</p>
operation: <p>The operation for updating the domain list. The allowed values are ADD, REMOVE, and REPLACE.</p>
Raises:
capo_route53globalresolver.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform this operation. Check your IAM permissions and try again.</p>
capo_route53globalresolver.errors.conflict_exception.ConflictException: <p>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.</p>
capo_route53globalresolver.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
capo_route53globalresolver.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource ID and try again.</p>
capo_route53globalresolver.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed one or more service quotas. Check your current usage and quotas, then try again.</p>
capo_route53globalresolver.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Wait a moment and try again.</p>
capo_route53globalresolver.errors.validation_exception.ValidationException: <p>The input parameters are invalid. Check the parameter values and try again.</p>
capo_route53globalresolver.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_route53globalresolver.types.update_firewall_domains_input.UpdateFirewallDomainsInput]",
) -> OperationResponse[
"capo_route53globalresolver.types.update_firewall_domains_output.UpdateFirewallDomainsOutput"
]:
import capo_route53globalresolver._operations.ec2_dns_global_resolver_customer_api.update_firewall_domains
output, http_response = (
capo_route53globalresolver._operations.ec2_dns_global_resolver_customer_api.update_firewall_domains.update_firewall_domains(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateFirewallDomains")
)
input_: capo_route53globalresolver.types.update_firewall_domains_input.UpdateFirewallDomainsInput = {
"domains": domains,
"firewall_domain_list_id": firewall_domain_list_id,
"operation": operation,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|