Skip to content

create_profile

create_profile(
    name: Name,
    client_token: CreatorRequestId,
    *,
    config_overrides: Optional[Route53ProfilesClientConfig] = None,
    tags: Optional[TagList] = None,
) -> CreateProfileResponse

Creates an empty Route 53 Profile.

Parameters:

  • name (Name) –

    A name for the Profile.

  • client_token (CreatorRequestId) –

    ClientToken is an idempotency token that ensures a call to CreateProfile completes only once. You choose the value to pass. For example, an issue might prevent you from getting a response from CreateProfile. In this case, safely retry your call to CreateProfile by using the same CreateProfile parameter value.

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

    A list of the tag keys and values that you want to associate with the Route 53 Profile.

Raises:

Source code in docs_src/capo_route53profiles/_services/route53_profiles.py
def create_profile(
    self,
    name: "capo_route53profiles.types.name.Name",
    client_token: "capo_route53profiles.types.creator_request_id.CreatorRequestId",
    *,
    config_overrides: Optional[Route53ProfilesClientConfig] = None,
    tags: Optional["capo_route53profiles.types.tag_list.TagList"] = None,
) -> "capo_route53profiles.types.create_profile_response.CreateProfileResponse":
    """<p> Creates an empty Route 53 Profile. </p>

    Args:
        name: <p> A name for the Profile. </p>
        client_token: <p> <code>ClientToken</code> is an idempotency token that ensures a call to <code>CreateProfile</code> completes only once. You choose the value to pass. For example, an issue might prevent you from getting a response from <code>CreateProfile</code>. In this case, safely retry your call to <code>CreateProfile</code> by using the same <code>CreateProfile</code> parameter value. </p>
        tags: <p> A list of the tag keys and values that you want to associate with the Route 53 Profile. </p>

    Raises:
        capo_route53profiles.errors.access_denied_exception.AccessDeniedException: <p> The current account doesn't have the IAM permissions required to perform the specified operation. </p>
        capo_route53profiles.errors.invalid_parameter_exception.InvalidParameterException: <p> One or more parameters in this request are not valid. </p>
        capo_route53profiles.errors.limit_exceeded_exception.LimitExceededException: <p> The request caused one or more limits to be exceeded. </p>
        capo_route53profiles.errors.throttling_exception.ThrottlingException: <p> The request was throttled. Try again in a few minutes. </p>
        capo_route53profiles.errors.validation_exception.ValidationException: <p> You have provided an invalid command. </p>
        capo_route53profiles.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route53profiles.types.create_profile_request.CreateProfileRequest]",
    ) -> OperationResponse[
        "capo_route53profiles.types.create_profile_response.CreateProfileResponse"
    ]:
        import capo_route53profiles._operations.route53_profiles.create_profile

        output, http_response = (
            capo_route53profiles._operations.route53_profiles.create_profile.create_profile(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateProfile")
    )
    input_: capo_route53profiles.types.create_profile_request.CreateProfileRequest = {
        "name": name,
        "client_token": client_token,
    }
    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