Updates the visibility of the problem or specifies the problem as RESOLVED.
Parameters:
-
problem_id
(ProblemId)
–
-
update_status
(Optional[UpdateStatus], default:
None
)
–
The status of the problem. Arguments can be passed for only problems that show a status of RECOVERING.
-
visibility
(Optional[Visibility], default:
None
)
–
The visibility of a problem. When you pass a value of IGNORED, the problem is removed from the default view, and all notifications for the problem are suspended. When VISIBLE is passed, the IGNORED action is reversed.
Raises:
Source code in docs_src/capo_application_insights/_services/application_insights.py
| def update_problem(
self,
problem_id: "capo_application_insights.types.problem_id.ProblemId",
*,
config_overrides: Optional[ApplicationInsightsClientConfig] = None,
update_status: Optional[
"capo_application_insights.types.update_status.UpdateStatus"
] = None,
visibility: Optional[
"capo_application_insights.types.visibility.Visibility"
] = None,
) -> (
"capo_application_insights.types.update_problem_response.UpdateProblemResponse"
):
"""<p>Updates the visibility of the problem or specifies the problem as <code>RESOLVED</code>.</p>
Args:
problem_id: <p>The ID of the problem.</p>
update_status: <p>The status of the problem. Arguments can be passed for only problems that show a status of <code>RECOVERING</code>.</p>
visibility: <p>The visibility of a problem. When you pass a value of <code>IGNORED</code>, the problem is removed from the default view, and all notifications for the problem are suspended. When <code>VISIBLE</code> is passed, the <code>IGNORED</code> action is reversed.</p>
Raises:
capo_application_insights.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
capo_application_insights.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource does not exist in the customer account.</p>
capo_application_insights.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
capo_application_insights.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_application_insights.types.update_problem_request.UpdateProblemRequest]",
) -> OperationResponse[
"capo_application_insights.types.update_problem_response.UpdateProblemResponse"
]:
import capo_application_insights._operations.ec2_windows_barley_service.update_problem
output, http_response = (
capo_application_insights._operations.ec2_windows_barley_service.update_problem.update_problem(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateProblem")
)
input_: capo_application_insights.types.update_problem_request.UpdateProblemRequest = {
"problem_id": problem_id
}
if update_status is not None:
input_["update_status"] = update_status
if visibility is not None:
input_["visibility"] = visibility
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|