Updates the specified Call Analytics category with new rules. Note that the UpdateCallAnalyticsCategory operation overwrites all existing rules contained in the specified category. You cannot append additional rules onto an existing category.
To create a new category, see .
Parameters:
-
category_name
(CategoryName)
–
The name of the Call Analytics category you want to update. Category names are case sensitive.
-
rules
(RuleList)
–
The rules used for the updated Call Analytics category. The rules you provide in this field replace the ones that are currently being used in the specified category.
-
input_type
(Optional[InputType], default:
None
)
–
Choose whether you want to update a real-time or a post-call category. The input type you specify must match the input type specified when the category was created. For example, if you created a category with the POST_CALL input type, you must use POST_CALL as the input type when updating this category.
Raises:
-
BadRequestException
–
Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information.
-
ConflictException
–
A resource already exists with this name. Resource names must be unique within an Amazon Web Services account.
-
InternalFailureException
–
There was an internal error. Check the error message, correct the issue, and try your request again.
-
LimitExceededException
–
You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again.
-
NotFoundException
–
We can't find the requested resource. Check that the specified name is correct and try your request again.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_transcribe/_services/transcribe.py
| def update_call_analytics_category(
self,
category_name: "capo_transcribe.types.category_name.CategoryName",
rules: "capo_transcribe.types.rule_list.RuleList",
*,
config_overrides: Optional[TranscribeClientConfig] = None,
input_type: Optional["capo_transcribe.types.input_type.InputType"] = None,
) -> "capo_transcribe.types.update_call_analytics_category_response.UpdateCallAnalyticsCategoryResponse":
"""<p>Updates the specified Call Analytics category with new rules. Note that the <code>UpdateCallAnalyticsCategory</code> operation overwrites all existing rules contained in the specified category. You cannot append additional rules onto an existing category.</p> <p>To create a new category, see .</p>
Args:
category_name: <p>The name of the Call Analytics category you want to update. Category names are case sensitive.</p>
rules: <p>The rules used for the updated Call Analytics category. The rules you provide in this field replace the ones that are currently being used in the specified category.</p>
input_type: <p>Choose whether you want to update a real-time or a post-call category. The input type you specify must match the input type specified when the category was created. For example, if you created a category with the <code>POST_CALL</code> input type, you must use <code>POST_CALL</code> as the input type when updating this category.</p>
Raises:
capo_transcribe.errors.bad_request_exception.BadRequestException: <p>Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as <code>IN PROGRESS</code>). See the exception message field for more information.</p>
capo_transcribe.errors.conflict_exception.ConflictException: <p>A resource already exists with this name. Resource names must be unique within an Amazon Web Services account.</p>
capo_transcribe.errors.internal_failure_exception.InternalFailureException: <p>There was an internal error. Check the error message, correct the issue, and try your request again.</p>
capo_transcribe.errors.limit_exceeded_exception.LimitExceededException: <p>You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again.</p>
capo_transcribe.errors.not_found_exception.NotFoundException: <p>We can't find the requested resource. Check that the specified name is correct and try your request again.</p>
capo_transcribe.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_transcribe.types.update_call_analytics_category_request.UpdateCallAnalyticsCategoryRequest]",
) -> OperationResponse[
"capo_transcribe.types.update_call_analytics_category_response.UpdateCallAnalyticsCategoryResponse"
]:
import capo_transcribe._operations.transcribe.update_call_analytics_category
output, http_response = (
capo_transcribe._operations.transcribe.update_call_analytics_category.update_call_analytics_category(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateCallAnalyticsCategory")
)
input_: capo_transcribe.types.update_call_analytics_category_request.UpdateCallAnalyticsCategoryRequest = {
"category_name": category_name,
"rules": rules,
}
if input_type is not None:
input_["input_type"] = input_type
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|