Skip to content

remove_notification_channel

remove_notification_channel(
    profiling_group_name: ProfilingGroupName,
    channel_id: ChannelId,
    *,
    config_overrides: Optional[CodeGuruProfilerClientConfig] = None,
) -> RemoveNotificationChannelResponse

Remove one anomaly notifications channel for a profiling group.

Parameters:

  • profiling_group_name (ProfilingGroupName) –

    The name of the profiling group we want to change notification configuration for.

  • channel_id (ChannelId) –

    The id of the channel that we want to stop receiving notifications.

Raises:

Source code in docs_src/capo_codeguruprofiler/_services/code_guru_profiler.py
def remove_notification_channel(
    self,
    profiling_group_name: "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName",
    channel_id: "capo_codeguruprofiler.types.channel_id.ChannelId",
    *,
    config_overrides: Optional[CodeGuruProfilerClientConfig] = None,
) -> "capo_codeguruprofiler.types.remove_notification_channel_response.RemoveNotificationChannelResponse":
    """<p>Remove one anomaly notifications channel for a profiling group.</p>

    Args:
        profiling_group_name: <p>The name of the profiling group we want to change notification configuration for.</p>
        channel_id: <p>The id of the channel that we want to stop receiving notifications.</p>

    Raises:
        capo_codeguruprofiler.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_codeguruprofiler.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
        capo_codeguruprofiler.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_codeguruprofiler.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
        capo_codeguruprofiler.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codeguruprofiler.types.remove_notification_channel_request.RemoveNotificationChannelRequest]",
    ) -> OperationResponse[
        "capo_codeguruprofiler.types.remove_notification_channel_response.RemoveNotificationChannelResponse"
    ]:
        import capo_codeguruprofiler._operations.code_guru_profiler.remove_notification_channel

        output, http_response = (
            capo_codeguruprofiler._operations.code_guru_profiler.remove_notification_channel.remove_notification_channel(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RemoveNotificationChannel")
    )
    input_: capo_codeguruprofiler.types.remove_notification_channel_request.RemoveNotificationChannelRequest = {
        "profiling_group_name": profiling_group_name,
        "channel_id": channel_id,
    }

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