Updates an existing telemetry rule in your account. If multiple users attempt to modify the same telemetry rule simultaneously, a ConflictException is returned to provide specific error information for concurrent modification scenarios.
Parameters:
-
rule_identifier
(RuleIdentifier)
–
The identifier (name or ARN) of the telemetry rule to update.
-
rule
(TelemetryRule)
–
The new configuration details for the telemetry rule.
Raises:
Source code in docs_src/capo_observabilityadmin/_services/observability_admin.py
| def update_telemetry_rule(
self,
rule_identifier: "capo_observabilityadmin.types.rule_identifier.RuleIdentifier",
rule: "capo_observabilityadmin.types.telemetry_rule.TelemetryRule",
*,
config_overrides: Optional[ObservabilityAdminClientConfig] = None,
) -> "capo_observabilityadmin.types.update_telemetry_rule_output.UpdateTelemetryRuleOutput":
"""<p> Updates an existing telemetry rule in your account. If multiple users attempt to modify the same telemetry rule simultaneously, a ConflictException is returned to provide specific error information for concurrent modification scenarios. </p>
Args:
rule_identifier: <p> The identifier (name or ARN) of the telemetry rule to update. </p>
rule: <p> The new configuration details for the telemetry rule. </p>
Raises:
capo_observabilityadmin.errors.access_denied_exception.AccessDeniedException: <p> Indicates you don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html">Access management for Amazon Web Services resources</a> in the IAM user guide. </p>
capo_observabilityadmin.errors.conflict_exception.ConflictException: <p> The requested operation conflicts with the current state of the specified resource or with another request. </p>
capo_observabilityadmin.errors.internal_server_exception.InternalServerException: <p> Indicates the request has failed to process because of an unknown server error, exception, or failure. </p>
capo_observabilityadmin.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified resource (such as a telemetry rule) could not be found. </p>
capo_observabilityadmin.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The requested operation would exceed the allowed quota for the specified resource type. </p>
capo_observabilityadmin.errors.too_many_requests_exception.TooManyRequestsException: <p> The request throughput limit was exceeded. </p>
capo_observabilityadmin.errors.validation_exception.ValidationException: <p> Indicates input validation failed. Check your request parameters and retry the request. </p>
capo_observabilityadmin.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_observabilityadmin.types.update_telemetry_rule_input.UpdateTelemetryRuleInput]",
) -> OperationResponse[
"capo_observabilityadmin.types.update_telemetry_rule_output.UpdateTelemetryRuleOutput"
]:
import capo_observabilityadmin._operations.observability_admin.update_telemetry_rule
output, http_response = (
capo_observabilityadmin._operations.observability_admin.update_telemetry_rule.update_telemetry_rule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateTelemetryRule")
)
input_: capo_observabilityadmin.types.update_telemetry_rule_input.UpdateTelemetryRuleInput = {
"rule_identifier": rule_identifier,
"rule": rule,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|