Skip to content

update_association

update_association(
    agent_space_id: AgentSpaceId,
    association_id: AssociationId,
    configuration: ServiceConfiguration,
    *,
    config_overrides: Optional[DevOpsAgentClientConfig] = None,
    capabilities: Optional[AssociationCapabilities] = None,
) -> UpdateAssociationOutput

Partially updates the configuration of an existing service association for an AgentSpace. Present fields are fully replaced; absent fields are left unchanged. Returns 200 OK on success.

Parameters:

  • agent_space_id (AgentSpaceId) –

    The unique identifier of the AgentSpace

  • association_id (AssociationId) –

    The unique identifier of the given association.

  • configuration (ServiceConfiguration) –

    The configuration that directs how AgentSpace interacts with the given service. The entire configuration is replaced on update.

  • capabilities (Optional[AssociationCapabilities], default: None ) –

    Enabled capabilities for this association.

Raises:

Source code in docs_src/capo_devops_agent/_services/dev_ops_agent.py
def update_association(
    self,
    agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
    association_id: "capo_devops_agent.types.association_id.AssociationId",
    configuration: "capo_devops_agent.types.service_configuration.ServiceConfiguration",
    *,
    config_overrides: Optional[DevOpsAgentClientConfig] = None,
    capabilities: Optional[
        "capo_devops_agent.types.association_capabilities.AssociationCapabilities"
    ] = None,
) -> "capo_devops_agent.types.update_association_output.UpdateAssociationOutput":
    """<p>Partially updates the configuration of an existing service association for an AgentSpace. Present fields are fully replaced; absent fields are left unchanged. Returns 200 OK on success.</p>

    Args:
        agent_space_id: <p>The unique identifier of the AgentSpace</p>
        association_id: <p>The unique identifier of the given association.</p>
        configuration: <p>The configuration that directs how AgentSpace interacts with the given service. The entire configuration is replaced on update.</p>
        capabilities: <p>Enabled capabilities for this association.</p>

    Raises:
        capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
        capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
        capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
        capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
        capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
        capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
        capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
        capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_devops_agent.types.update_association_input.UpdateAssociationInput]",
    ) -> OperationResponse[
        "capo_devops_agent.types.update_association_output.UpdateAssociationOutput"
    ]:
        import capo_devops_agent._operations.dev_ops_agent.update_association

        output, http_response = (
            capo_devops_agent._operations.dev_ops_agent.update_association.update_association(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_devops_agent.types.update_association_input.UpdateAssociationInput",
    ) -> dict[str, Any]:
        import capo_devops_agent.types.update_association_input

        return capo_devops_agent.types.update_association_input.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_devops_agent.types.update_association_output.UpdateAssociationOutput",
    ) -> dict[str, Any]:
        import capo_devops_agent.types.update_association_output

        return capo_devops_agent.types.update_association_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateAssociation",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_devops_agent.types.update_association_input.UpdateAssociationInput = {
        "agent_space_id": agent_space_id,
        "association_id": association_id,
        "configuration": configuration,
    }
    if capabilities is not None:
        input_["capabilities"] = capabilities

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