Skip to content

update_collector async

update_collector(
    collector_id: CollectorId,
    *,
    config_overrides: Optional[AsyncContinuumClientConfig] = None,
    name: Optional[CollectorName] = None,
    kubernetes_cluster_role: Optional[KubernetesClusterRoleUpdate] = None,
) -> UpdateCollectorOutput

Updates the customer-controlled mutable properties of a Collector. Only the name and Kubernetes cluster IAM role can be changed.

Parameters:

  • collector_id (CollectorId) –

    The unique identifier of the Collector to update.

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

    The new customer-visible name.

  • kubernetes_cluster_role (Optional[KubernetesClusterRoleUpdate], default: None ) –

    Atomic update to the IAM role configuration used to collect Kubernetes cluster metadata. The set variant requires a complete configuration; the authenticated caller must be allowed to pass its exact roleArn to Continuum. The remove variant clears both the role and external ID.

Raises:

  • AccessDeniedException –

    The request is not authorized. Verify that your credentials and request signature are valid and that you have permission to perform this action.

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the resource.

  • InternalServerException –

    The request couldn't be processed because of an internal server issue. Try again later. If the problem persists, contact AWS Support.

  • ResourceNotFoundException –

    The specified resource was not found. Verify that the resource identifier is correct and that the resource exists.

  • ThrottlingException –

    The request was denied due to request throttling.

  • UnknownServiceError –

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

Source code in docs_src/capo_continuum/_services/async_continuum.py
async def update_collector(
    self,
    collector_id: "capo_continuum.types.collector_id.CollectorId",
    *,
    config_overrides: Optional[AsyncContinuumClientConfig] = None,
    name: Optional["capo_continuum.types.collector_name.CollectorName"] = None,
    kubernetes_cluster_role: Optional[
        "capo_continuum.types.kubernetes_cluster_role_update.KubernetesClusterRoleUpdate"
    ] = None,
) -> "capo_continuum.types.update_collector_output.UpdateCollectorOutput":
    """Updates the customer-controlled mutable properties of a Collector. Only the name and Kubernetes cluster IAM role can be changed.

    Args:
        collector_id: The unique identifier of the Collector to update.
        name: The new customer-visible name.
        kubernetes_cluster_role: Atomic update to the IAM role configuration used to collect Kubernetes cluster metadata. The set variant requires a complete configuration; the authenticated caller must be allowed to pass its exact roleArn to Continuum. The remove variant clears both the role and external ID.

    Raises:
        capo_continuum.errors.access_denied_exception.AccessDeniedException: The request is not authorized. Verify that your credentials and request signature are valid and that you have permission to perform this action.
        capo_continuum.errors.conflict_exception.ConflictException: The request could not be completed due to a conflict with the current state of the resource.
        capo_continuum.errors.internal_server_exception.InternalServerException: The request couldn't be processed because of an internal server issue. Try again later. If the problem persists, contact AWS Support.
        capo_continuum.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource was not found. Verify that the resource identifier is correct and that the resource exists.
        capo_continuum.errors.throttling_exception.ThrottlingException: The request was denied due to request throttling.
        capo_continuum.errors.validation_exception.ValidationException
        capo_continuum.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_continuum.types.update_collector_input.UpdateCollectorInput]",
    ) -> AsyncOperationResponse[
        "capo_continuum.types.update_collector_output.UpdateCollectorOutput"
    ]:
        import capo_continuum._operations.continuum_control_plane.update_collector

        (
            output,
            http_response,
        ) = await capo_continuum._operations.continuum_control_plane.update_collector.async_update_collector(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_continuum.types.update_collector_input.UpdateCollectorInput",
    ) -> dict[str, Any]:
        import capo_continuum.types.update_collector_input

        return capo_continuum.types.update_collector_input.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateCollector", redact_input=_redact_input),
    )
    input_: capo_continuum.types.update_collector_input.UpdateCollectorInput = {
        "collector_id": collector_id
    }
    if name is not None:
        input_["name"] = name
    if kubernetes_cluster_role is not None:
        input_["kubernetes_cluster_role"] = kubernetes_cluster_role

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