Skip to content

create_app_instance_bot

create_app_instance_bot(
    app_instance_arn: ChimeArn,
    client_request_token: ClientRequestToken,
    configuration: Configuration,
    *,
    config_overrides: Optional[ChimeSDKIdentityClientConfig] = None,
    name: Optional[ResourceName] = None,
    metadata: Optional[Metadata] = None,
    tags: Optional[TagList] = None,
) -> CreateAppInstanceBotResponse

Creates a bot under an Amazon Chime AppInstance. The request consists of a unique Configuration and Name for that bot.

Parameters:

  • app_instance_arn (ChimeArn) –

    The ARN of the AppInstance request.

  • name (Optional[ResourceName], default: None ) –

    The user's name.

  • metadata (Optional[Metadata], default: None ) –

    The request metadata. Limited to a 1KB string in UTF-8.

  • client_request_token (ClientRequestToken) –

    The unique ID for the client making the request. Use different tokens for different AppInstanceBots.

  • tags (Optional[TagList], default: None ) –

    The tags assigned to the AppInstanceBot.

  • configuration (Configuration) –

    Configuration information about the Amazon Lex V2 V2 bot.

Raises:

Source code in docs_src/capo_chime_sdk_identity/_services/chime_sdk_identity.py
def create_app_instance_bot(
    self,
    app_instance_arn: "capo_chime_sdk_identity.types.chime_arn.ChimeArn",
    client_request_token: "capo_chime_sdk_identity.types.client_request_token.ClientRequestToken",
    configuration: "capo_chime_sdk_identity.types.configuration.Configuration",
    *,
    config_overrides: Optional[ChimeSDKIdentityClientConfig] = None,
    name: Optional[
        "capo_chime_sdk_identity.types.resource_name.ResourceName"
    ] = None,
    metadata: Optional["capo_chime_sdk_identity.types.metadata.Metadata"] = None,
    tags: Optional["capo_chime_sdk_identity.types.tag_list.TagList"] = None,
) -> "capo_chime_sdk_identity.types.create_app_instance_bot_response.CreateAppInstanceBotResponse":
    """<p>Creates a bot under an Amazon Chime <code>AppInstance</code>. The request consists of a unique <code>Configuration</code> and <code>Name</code> for that bot.</p>

    Args:
        app_instance_arn: <p>The ARN of the <code>AppInstance</code> request.</p>
        name: <p>The user's name.</p>
        metadata: <p>The request metadata. Limited to a 1KB string in UTF-8.</p>
        client_request_token: <p>The unique ID for the client making the request. Use different tokens for different <code>AppInstanceBots</code>.</p>
        tags: <p>The tags assigned to the <code>AppInstanceBot</code>.</p>
        configuration: <p>Configuration information about the Amazon Lex V2 V2 bot.</p>

    Raises:
        capo_chime_sdk_identity.errors.bad_request_exception.BadRequestException: <p>The input parameters don't match the service's restrictions.</p>
        capo_chime_sdk_identity.errors.conflict_exception.ConflictException: <p>The request could not be processed because of conflict in the current state of the resource.</p>
        capo_chime_sdk_identity.errors.forbidden_exception.ForbiddenException: <p>The client is permanently forbidden from making the request.</p>
        capo_chime_sdk_identity.errors.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>The request exceeds the resource limit.</p>
        capo_chime_sdk_identity.errors.service_failure_exception.ServiceFailureException: <p>The service encountered an unexpected error.</p>
        capo_chime_sdk_identity.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable.</p>
        capo_chime_sdk_identity.errors.throttled_client_exception.ThrottledClientException: <p>The client exceeded its request rate limit.</p>
        capo_chime_sdk_identity.errors.unauthorized_client_exception.UnauthorizedClientException: <p>The client is not currently authorized to make the request.</p>
        capo_chime_sdk_identity.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_chime_sdk_identity.types.create_app_instance_bot_request.CreateAppInstanceBotRequest]",
    ) -> OperationResponse[
        "capo_chime_sdk_identity.types.create_app_instance_bot_response.CreateAppInstanceBotResponse"
    ]:
        import capo_chime_sdk_identity._operations.chime_identity_service.create_app_instance_bot

        output, http_response = (
            capo_chime_sdk_identity._operations.chime_identity_service.create_app_instance_bot.create_app_instance_bot(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_chime_sdk_identity.types.create_app_instance_bot_request.CreateAppInstanceBotRequest",
    ) -> dict[str, Any]:
        import capo_chime_sdk_identity.types.create_app_instance_bot_request

        return capo_chime_sdk_identity.types.create_app_instance_bot_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateAppInstanceBot", redact_input=_redact_input),
    )
    input_: capo_chime_sdk_identity.types.create_app_instance_bot_request.CreateAppInstanceBotRequest = {
        "app_instance_arn": app_instance_arn,
        "client_request_token": client_request_token,
        "configuration": configuration,
    }
    if name is not None:
        input_["name"] = name
    if metadata is not None:
        input_["metadata"] = metadata
    if tags is not None:
        input_["tags"] = tags

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