Skip to content

update_integration

update_integration(
    identifier: IntegrationIdentifier,
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    credential: Optional[IntegrationCredential] = None,
    integration_attributes: Optional[StringMap] = None,
    role_arn: Optional[str] = None,
) -> UpdateIntegrationOutput

Updates an existing integration, identified by its id, ARN, or name. Only the fields you provide are changed.

Parameters:

  • identifier (IntegrationIdentifier) –

    Identifies the integration to update — exactly one of integrationId, integrationArn, or integrationName.

  • credential (Optional[IntegrationCredential], default: None ) –

    The replacement credential used to authenticate with the provider.

  • integration_attributes (Optional[StringMap], default: None ) –

    The provider-specific attributes to associate with the integration.

  • role_arn (Optional[str], default: None ) –

    The Amazon Resource Name of the IAM role assumed to access the integration.

Raises:

Examples:

Update an integration's attributes The following example replaces the provider-specific attributes of the integration identified by its id. Payloads are shown as JSON; on the wire they are CBOR-encoded.

>>> client.update_integration(identifier={'integrationId': 'a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d'}, integration_attributes={'notificationChannel': 'ops-oncall'})
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
def update_integration(
    self,
    identifier: "capo_cloudwatchomni.types.integration_identifier.IntegrationIdentifier",
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    credential: Optional[
        "capo_cloudwatchomni.types.integration_credential.IntegrationCredential"
    ] = None,
    integration_attributes: Optional[
        "capo_cloudwatchomni.types.string_map.StringMap"
    ] = None,
    role_arn: Optional[str] = None,
) -> "capo_cloudwatchomni.types.update_integration_output.UpdateIntegrationOutput":
    """Updates an existing integration, identified by its id, ARN, or name. Only the fields you provide are changed.

    Args:
        identifier: Identifies the integration to update — exactly one of integrationId, integrationArn, or integrationName.
        credential: The replacement credential used to authenticate with the provider.
        integration_attributes: The provider-specific attributes to associate with the integration.
        role_arn: The Amazon Resource Name of the IAM role assumed to access the integration.

    Raises:
        capo_cloudwatchomni.errors.access_denied_exception.AccessDeniedException: The caller is not authorized to perform this action.
        capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_cloudwatchomni.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist.
        capo_cloudwatchomni.errors.throttling_exception.ThrottlingException: The request was throttled due to exceeding the allowed request rate.
        capo_cloudwatchomni.errors.validation_exception.ValidationException: A parameter is specified incorrectly.
        capo_cloudwatchomni.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Update an integration's attributes
        The following example replaces the provider-specific attributes of the integration identified by its id. Payloads are shown as JSON; on the wire they are CBOR-encoded.

        >>> client.update_integration(identifier={'integrationId': 'a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d'}, integration_attributes={'notificationChannel': 'ops-oncall'})
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatchomni.types.update_integration_input.UpdateIntegrationInput]",
    ) -> OperationResponse[
        "capo_cloudwatchomni.types.update_integration_output.UpdateIntegrationOutput"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.update_integration

        output, http_response = (
            capo_cloudwatchomni._operations.cloud_watch_omni_frontend.update_integration.update_integration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_cloudwatchomni.types.update_integration_input.UpdateIntegrationInput",
    ) -> dict[str, Any]:
        import capo_cloudwatchomni.types.update_integration_input

        return capo_cloudwatchomni.types.update_integration_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateIntegration", redact_input=_redact_input),
    )
    input_: capo_cloudwatchomni.types.update_integration_input.UpdateIntegrationInput = {
        "identifier": identifier
    }
    if credential is not None:
        input_["credential"] = credential
    if integration_attributes is not None:
        input_["integration_attributes"] = integration_attributes
    if role_arn is not None:
        input_["role_arn"] = role_arn

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