Skip to content

update_instance_attribute

update_instance_attribute(
    instance_id: InstanceId,
    attribute_type: InstanceAttributeType,
    value: InstanceAttributeValue,
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> None

This API is in preview release for Connect Customer and is subject to change.

Updates the value for the specified attribute type.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • attribute_type (InstanceAttributeType) –

    The type of attribute.

    Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact Amazon Web Services Support for allowlisting.

    If you set the attribute type as MESSAGE_STREAMING, you need to update the Lex bot alias resource based policy to include the lex:RecognizeMessageAsync action for the connect instance ARN resource.

    If you set the attribute type AUTO_MUTE_AGENT_ON_HOLD to true, the system automatically mutes agents while they're on hold and unmutes them when they resume the contact. Agents can't change their mute state while on hold.

  • value (InstanceAttributeValue) –

    The value for the attribute. Maximum character limit is 100.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

Raises:

Source code in docs_src/capo_connect/_services/connect.py
def update_instance_attribute(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    attribute_type: "capo_connect.types.instance_attribute_type.InstanceAttributeType",
    value: "capo_connect.types.instance_attribute_value.InstanceAttributeValue",
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    client_token: Optional["capo_connect.types.client_token.ClientToken"] = None,
) -> None:
    """<p>This API is in preview release for Connect Customer and is subject to change.</p> <p>Updates the value for the specified attribute type.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        attribute_type: <p>The type of attribute.</p> <note> <p>Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact Amazon Web Services Support for allowlisting.</p> </note> <note> <p>If you set the attribute type as <code>MESSAGE_STREAMING</code>, you need to update the Lex bot alias resource based policy to include the <code>lex:RecognizeMessageAsync</code> action for the connect instance ARN resource.</p> </note> <note> <p>If you set the attribute type <code>AUTO_MUTE_AGENT_ON_HOLD</code> to <code>true</code>, the system automatically mutes agents while they're on hold and unmutes them when they resume the contact. Agents can't change their mute state while on hold.</p> </note>
        value: <p>The value for the attribute. Maximum character limit is 100. </p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>

    Raises:
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_connect.types.update_instance_attribute_request.UpdateInstanceAttributeRequest]",
    ) -> OperationResponse[None]:
        import capo_connect._operations.amazon_connect_service.update_instance_attribute

        output, http_response = (
            capo_connect._operations.amazon_connect_service.update_instance_attribute.update_instance_attribute(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateInstanceAttribute")
    )
    input_: capo_connect.types.update_instance_attribute_request.UpdateInstanceAttributeRequest = {
        "instance_id": instance_id,
        "attribute_type": attribute_type,
        "value": value,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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