Skip to content

update_profile_association async

update_profile_association(
    profile_association_id: ResourceId,
    *,
    config_overrides: Optional[AsyncRoute53ProfilesClientConfig] = None,
    name: Optional[Name] = None,
    priority: Optional[Priority] = None,
) -> UpdateProfileAssociationResponse

Updates the name or priority of the specified Route 53 Profile association with a VPC. Route 53 VPC Resolver evaluates the Profile associations for a VPC in priority order, starting with the lowest value. Only the account that created the association can update it.

When you change the priority, the association status is UPDATING until the change propagates, and then COMPLETE. While the status is UPDATING, Route 53 VPC Resolver might still use the previous priority for some queries. When the status is COMPLETE, the new priority applies to all queries from the VPC.

The request fails with a ValidationException if another Profile association for the VPC already uses the priority that you specify, or if the priority is outside the range 100–9900.

You can update an association whose status is CREATING, UPDATING, or COMPLETE. The request fails with a ConflictException if the association status is DELETING, DELETED, or FAILED, or if the account that owns the association is inactive.

Parameters:

  • profile_association_id (ResourceId) –

    The ID of the Profile association to update.

  • name (Optional[Name], default: None ) –

    The name of the Profile association.

  • priority (Optional[Priority], default: None ) –

    The new priority of the Profile association. Route 53 VPC Resolver evaluates the Profile associations for a VPC in priority order, starting with the lowest value.

    The priority must be unique among the Profile associations for the VPC.

Raises:

Source code in docs_src/capo_route53profiles/_services/async_route53_profiles.py
async def update_profile_association(
    self,
    profile_association_id: "capo_route53profiles.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[AsyncRoute53ProfilesClientConfig] = None,
    name: Optional["capo_route53profiles.types.name.Name"] = None,
    priority: Optional["capo_route53profiles.types.priority.Priority"] = None,
) -> "capo_route53profiles.types.update_profile_association_response.UpdateProfileAssociationResponse":
    """<p> Updates the name or priority of the specified Route 53 Profile association with a VPC. Route 53 VPC Resolver evaluates the Profile associations for a VPC in priority order, starting with the lowest value. Only the account that created the association can update it. </p> <p> When you change the priority, the association status is <code>UPDATING</code> until the change propagates, and then <code>COMPLETE</code>. While the status is <code>UPDATING</code>, Route 53 VPC Resolver might still use the previous priority for some queries. When the status is <code>COMPLETE</code>, the new priority applies to all queries from the VPC. </p> <p> The request fails with a <code>ValidationException</code> if another Profile association for the VPC already uses the priority that you specify, or if the priority is outside the range 100–9900. </p> <p> You can update an association whose status is <code>CREATING</code>, <code>UPDATING</code>, or <code>COMPLETE</code>. The request fails with a <code>ConflictException</code> if the association status is <code>DELETING</code>, <code>DELETED</code>, or <code>FAILED</code>, or if the account that owns the association is inactive. </p>

    Args:
        profile_association_id: <p> The ID of the Profile association to update. </p>
        name: <p> The name of the Profile association. </p>
        priority: <p> The new priority of the Profile association. Route 53 VPC Resolver evaluates the Profile associations for a VPC in priority order, starting with the lowest value. </p> <p>The priority must be unique among the Profile associations for the VPC.</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.conflict_exception.ConflictException: <p> The request you submitted conflicts with an existing request. </p>
        capo_route53profiles.errors.internal_service_error_exception.InternalServiceErrorException: <p> An internal server error occured. Retry your request. </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.resource_not_found_exception.ResourceNotFoundException: <p> The resource you are associating is not found. </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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route53profiles.types.update_profile_association_request.UpdateProfileAssociationRequest]",
    ) -> AsyncOperationResponse[
        "capo_route53profiles.types.update_profile_association_response.UpdateProfileAssociationResponse"
    ]:
        import capo_route53profiles._operations.route53_profiles.update_profile_association

        (
            output,
            http_response,
        ) = await capo_route53profiles._operations.route53_profiles.update_profile_association.async_update_profile_association(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateProfileAssociation")
    )
    input_: capo_route53profiles.types.update_profile_association_request.UpdateProfileAssociationRequest = {
        "profile_association_id": profile_association_id
    }
    if name is not None:
        input_["name"] = name
    if priority is not None:
        input_["priority"] = priority

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output