Skip to content

create_outpost_resolver

create_outpost_resolver(
    creator_request_id: CreatorRequestId,
    name: OutpostResolverName,
    preferred_instance_type: OutpostInstanceType,
    outpost_arn: OutpostArn,
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
    instance_count: Optional[InstanceCount] = None,
    tags: Optional[TagList] = None,
) -> CreateOutpostResolverResponse

Creates a Route 53 Resolver on an Outpost.

This operation applies to first-generation Outposts only. On second-generation Outposts, Resolver is enabled by default and managed automatically by Amazon Web Services, so you don't need to create it.

Parameters:

  • creator_request_id (CreatorRequestId) –

    A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice.

    CreatorRequestId can be any unique string, for example, a date/time stamp.

  • name (OutpostResolverName) –

    A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console.

  • instance_count (Optional[InstanceCount], default: None ) –

    Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4.

  • preferred_instance_type (OutpostInstanceType) –

    The Amazon EC2 instance type. If you specify this, you must also specify a value for the OutpostArn.

  • outpost_arn (OutpostArn) –

    The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the PreferredInstanceType.

  • tags (Optional[TagList], default: None ) –

    A string that helps identify the Route 53 Resolvers on Outpost.

Raises:

  • AccessDeniedException –

    The current account doesn't have the IAM permissions required to perform the specified Resolver operation.

    This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs.

  • InternalServiceErrorException –

    We encountered an unknown error. Try again in a few minutes.

  • ResourceNotFoundException –

    The specified resource doesn't exist.

  • ServiceQuotaExceededException –

    Fulfilling the request would cause one or more quotas to be exceeded.

  • ThrottlingException –

    The request was throttled. Try again in a few minutes.

  • ValidationException –

    You have provided an invalid command. If you ran the UpdateFirewallDomains request. supported values are ADD, REMOVE, or REPLACE a domain.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_route53resolver/_services/route53_resolver.py
def create_outpost_resolver(
    self,
    creator_request_id: "capo_route53resolver.types.creator_request_id.CreatorRequestId",
    name: "capo_route53resolver.types.outpost_resolver_name.OutpostResolverName",
    preferred_instance_type: "capo_route53resolver.types.outpost_instance_type.OutpostInstanceType",
    outpost_arn: "capo_route53resolver.types.outpost_arn.OutpostArn",
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
    instance_count: Optional[
        "capo_route53resolver.types.instance_count.InstanceCount"
    ] = None,
    tags: Optional["capo_route53resolver.types.tag_list.TagList"] = None,
) -> "capo_route53resolver.types.create_outpost_resolver_response.CreateOutpostResolverResponse":
    """<p>Creates a Route 53 Resolver on an Outpost.</p> <note> <p>This operation applies to first-generation Outposts only. On second-generation Outposts, Resolver is enabled by default and managed automatically by Amazon Web Services, so you don't need to create it.</p> </note>

    Args:
        creator_request_id: <p>A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice. </p> <p> <code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
        name: <p>A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console.</p>
        instance_count: <p>Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4.</p>
        preferred_instance_type: <p> The Amazon EC2 instance type. If you specify this, you must also specify a value for the <code>OutpostArn</code>. </p>
        outpost_arn: <p>The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the <code>PreferredInstanceType</code>.</p>
        tags: <p> A string that helps identify the Route 53 Resolvers on Outpost. </p>

    Raises:
        capo_route53resolver.errors.access_denied_exception.AccessDeniedException: <p>The current account doesn't have the IAM permissions required to perform the specified Resolver operation.</p> <p>This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs.</p>
        capo_route53resolver.errors.internal_service_error_exception.InternalServiceErrorException: <p>We encountered an unknown error. Try again in a few minutes.</p>
        capo_route53resolver.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist.</p>
        capo_route53resolver.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Fulfilling the request would cause one or more quotas to be exceeded.</p>
        capo_route53resolver.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Try again in a few minutes.</p>
        capo_route53resolver.errors.validation_exception.ValidationException: <p>You have provided an invalid command. If you ran the <code>UpdateFirewallDomains</code> request. supported values are <code>ADD</code>, <code>REMOVE</code>, or <code>REPLACE</code> a domain.</p>
        capo_route53resolver.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route53resolver.types.create_outpost_resolver_request.CreateOutpostResolverRequest]",
    ) -> OperationResponse[
        "capo_route53resolver.types.create_outpost_resolver_response.CreateOutpostResolverResponse"
    ]:
        import capo_route53resolver._operations.route53_resolver.create_outpost_resolver

        output, http_response = (
            capo_route53resolver._operations.route53_resolver.create_outpost_resolver.create_outpost_resolver(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateOutpostResolver")
    )
    input_: capo_route53resolver.types.create_outpost_resolver_request.CreateOutpostResolverRequest = {
        "creator_request_id": creator_request_id,
        "name": name,
        "preferred_instance_type": preferred_instance_type,
        "outpost_arn": outpost_arn,
    }
    if instance_count is not None:
        input_["instance_count"] = instance_count
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output