Skip to content

put_intent async

put_intent(
    name: IntentName,
    *,
    config_overrides: Optional[AsyncLexModelBuildingServiceClientConfig] = None,
    description: Optional[Description] = None,
    slots: Optional[SlotList] = None,
    sample_utterances: Optional[IntentUtteranceList] = None,
    confirmation_prompt: Optional[Prompt] = None,
    rejection_statement: Optional[Statement] = None,
    follow_up_prompt: Optional[FollowUpPrompt] = None,
    conclusion_statement: Optional[Statement] = None,
    dialog_code_hook: Optional[CodeHook] = None,
    fulfillment_activity: Optional[FulfillmentActivity] = None,
    parent_intent_signature: Optional[BuiltinIntentSignature] = None,
    checksum: Optional[String] = None,
    create_version: Optional[Boolean] = None,
    kendra_configuration: Optional[KendraConfiguration] = None,
    input_contexts: Optional[InputContextList] = None,
    output_contexts: Optional[OutputContextList] = None,
) -> PutIntentResponse

Creates an intent or replaces an existing intent.

To define the interaction between the user and your bot, you use one or more intents. For a pizza ordering bot, for example, you would create an OrderPizza intent.

To create an intent or replace an existing intent, you must provide the following:

  • Intent name. For example, OrderPizza.

  • Sample utterances. For example, "Can I order a pizza, please." and "I want to order a pizza."

  • Information to be gathered. You specify slot types for the information that your bot will request from the user. You can specify standard slot types, such as a date or a time, or custom slot types such as the size and crust of a pizza.

  • How the intent will be fulfilled. You can provide a Lambda function or configure the intent to return the intent information to the client application. If you use a Lambda function, when all of the intent information is available, Amazon Lex invokes your Lambda function. If you configure your intent to return the intent information to the client application.

You can specify other optional information in the request, such as:

  • A confirmation prompt to ask the user to confirm an intent. For example, "Shall I order your pizza?"

  • A conclusion statement to send to the user after the intent has been fulfilled. For example, "I placed your pizza order."

  • A follow-up prompt that asks the user for additional activity. For example, asking "Do you want to order a drink with your pizza?"

If you specify an existing intent name to update the intent, Amazon Lex replaces the values in the $LATEST version of the intent with the values in the request. Amazon Lex removes fields that you don't provide in the request. If you don't specify the required fields, Amazon Lex throws an exception. When you update the $LATEST version of an intent, the status field of any bot that uses the $LATEST version of the intent is set to NOT_BUILT.

For more information, see how-it-works.

This operation requires permissions for the lex:PutIntent action.

Parameters:

  • name (IntentName) –

    The name of the intent. The name is not case sensitive.

    The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called AMAZON.HelpIntent, you can't create a custom intent called HelpIntent.

    For a list of built-in intents, see Standard Built-in Intents in the Alexa Skills Kit.

  • description (Optional[Description], default: None ) –

    A description of the intent.

  • slots (Optional[SlotList], default: None ) –

    An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works.

  • sample_utterances (Optional[IntentUtteranceList], default: None ) –

    An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".

    In each utterance, a slot name is enclosed in curly braces.

  • confirmation_prompt (Optional[Prompt], default: None ) –

    Prompts the user to confirm the intent. This question should have a yes or no answer.

    Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.

    You you must provide both the rejectionStatement and the confirmationPrompt, or neither.

  • rejection_statement (Optional[Statement], default: None ) –

    When the user answers "no" to the question defined in confirmationPrompt, Amazon Lex responds with this statement to acknowledge that the intent was canceled.

    You must provide both the rejectionStatement and the confirmationPrompt, or neither.

  • follow_up_prompt (Optional[FollowUpPrompt], default: None ) –

    Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the user to order a drink.

    The action that Amazon Lex takes depends on the user's response, as follows:

    • If the user says "Yes" it responds with the clarification prompt that is configured for the bot.

    • if the user says "Yes" and continues with an utterance that triggers an intent it starts a conversation for the intent.

    • If the user says "No" it responds with the rejection statement configured for the the follow-up prompt.

    • If it doesn't recognize the utterance it repeats the follow-up prompt again.

    The followUpPrompt field and the conclusionStatement field are mutually exclusive. You can specify only one.

  • conclusion_statement (Optional[Statement], default: None ) –

    The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function.

    This element is relevant only if you provide a Lambda function in the fulfillmentActivity. If you return the intent to the client application, you can't specify this element.

    The followUpPrompt and conclusionStatement are mutually exclusive. You can specify only one.

  • dialog_code_hook (Optional[CodeHook], default: None ) –

    Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction.

    For example, suppose your bot determines that the user is John. Your Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, GlutenIntolerant, to true. You might find John's phone number and set the corresponding session attribute.

  • fulfillment_activity (Optional[FulfillmentActivity], default: None ) –

    Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, fulfillmentActivity defines how the bot places an order with a local pizza store.

    You might configure Amazon Lex to return all of the intent information to the client application, or direct it to invoke a Lambda function that can process the intent (for example, place an order with a pizzeria).

  • parent_intent_signature (Optional[BuiltinIntentSignature], default: None ) –

    A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit.

  • checksum (Optional[String], default: None ) –

    Identifies a specific revision of the $LATEST version.

    When you create a new intent, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception.

    When you want to update a intent, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.

  • create_version (Optional[Boolean], default: None ) –

    When set to true a new numbered version of the intent is created. This is the same as calling the CreateIntentVersion operation. If you do not specify createVersion, the default is false.

  • kendra_configuration (Optional[KendraConfiguration], default: None ) –

    Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. For more information, see AMAZON.KendraSearchIntent.

  • input_contexts (Optional[InputContextList], default: None ) –

    An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.

  • output_contexts (Optional[OutputContextList], default: None ) –

    An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.

Raises:

  • BadRequestException –

    The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.

  • ConflictException –

    There was a conflict processing the request. Try your request again.

  • InternalFailureException –

    An internal Amazon Lex error occurred. Try your request again.

  • LimitExceededException –

    The request exceeded a limit. Try your request again.

  • PreconditionFailedException –

    The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

To create an intent This example shows how to create an intent for ordering pizzas.

>>> await client.put_intent(name='DocOrderPizza', description='Order a pizza from a local pizzeria.', slots=[{'name': 'Type', 'description': 'The type of pizza to order.', 'slotConstraint': 'Required', 'slotType': 'DocPizzaType', 'slotTypeVersion': '$LATEST', 'valueElicitationPrompt': {'messages': [{'contentType': 'PlainText', 'content': 'What type of pizza would you like?'}, {'contentType': 'PlainText', 'content': 'Vegie or cheese pizza?'}, {'contentType': 'PlainText', 'content': 'I can get you a vegie or a cheese pizza.'}], 'maxAttempts': 1}, 'priority': 1, 'sampleUtterances': ['Get me a {Type} pizza.', 'A {Type} pizza please.', "I'd like a {Type} pizza."]}, {'name': 'Crust', 'description': 'The type of pizza crust to order.', 'slotConstraint': 'Required', 'slotType': 'DocPizzaCrustType', 'slotTypeVersion': '$LATEST', 'valueElicitationPrompt': {'messages': [{'contentType': 'PlainText', 'content': 'What type of crust would you like?'}, {'contentType': 'PlainText', 'content': 'Thick or thin crust?'}], 'maxAttempts': 1}, 'priority': 2, 'sampleUtterances': ['Make it a {Crust} crust.', "I'd like a {Crust} crust."]}, {'name': 'Sauce', 'description': 'The type of sauce to use on the pizza.', 'slotConstraint': 'Required', 'slotType': 'DocPizzaSauceType', 'slotTypeVersion': '$LATEST', 'valueElicitationPrompt': {'messages': [{'contentType': 'PlainText', 'content': 'White or red sauce?'}, {'contentType': 'PlainText', 'content': 'Garlic or tomato sauce?'}], 'maxAttempts': 1}, 'priority': 3, 'sampleUtterances': ['Make it {Sauce} sauce.', "I'd like {Sauce} sauce."]}], sample_utterances=['Order me a pizza.', 'Order me a {Type} pizza.', 'I want a {Crust} crust {Type} pizza', 'I want a {Crust} crust {Type} pizza with {Sauce} sauce.'], confirmation_prompt={'messages': [{'contentType': 'PlainText', 'content': 'Should I order  your {Crust} crust {Type} pizza with {Sauce} sauce?'}], 'maxAttempts': 1}, rejection_statement={'messages': [{'contentType': 'PlainText', 'content': "Ok, I'll cancel your order."}, {'contentType': 'PlainText', 'content': 'I cancelled your order.'}]}, conclusion_statement={'messages': [{'contentType': 'PlainText', 'content': 'All right, I ordered  you a {Crust} crust {Type} pizza with {Sauce} sauce.'}, {'contentType': 'PlainText', 'content': 'OK, your {Crust} crust {Type} pizza with {Sauce} sauce is on the way.'}], 'responseCard': 'foo'}, fulfillment_activity={'type': 'ReturnIntent'})
Source code in docs_src/capo_lex_model_building_service/_services/async_lex_model_building_service.py
async def put_intent(
    self,
    name: "capo_lex_model_building_service.types.intent_name.IntentName",
    *,
    config_overrides: Optional[AsyncLexModelBuildingServiceClientConfig] = None,
    description: Optional[
        "capo_lex_model_building_service.types.description.Description"
    ] = None,
    slots: Optional[
        "capo_lex_model_building_service.types.slot_list.SlotList"
    ] = None,
    sample_utterances: Optional[
        "capo_lex_model_building_service.types.intent_utterance_list.IntentUtteranceList"
    ] = None,
    confirmation_prompt: Optional[
        "capo_lex_model_building_service.types.prompt.Prompt"
    ] = None,
    rejection_statement: Optional[
        "capo_lex_model_building_service.types.statement.Statement"
    ] = None,
    follow_up_prompt: Optional[
        "capo_lex_model_building_service.types.follow_up_prompt.FollowUpPrompt"
    ] = None,
    conclusion_statement: Optional[
        "capo_lex_model_building_service.types.statement.Statement"
    ] = None,
    dialog_code_hook: Optional[
        "capo_lex_model_building_service.types.code_hook.CodeHook"
    ] = None,
    fulfillment_activity: Optional[
        "capo_lex_model_building_service.types.fulfillment_activity.FulfillmentActivity"
    ] = None,
    parent_intent_signature: Optional[
        "capo_lex_model_building_service.types.builtin_intent_signature.BuiltinIntentSignature"
    ] = None,
    checksum: Optional[
        "capo_lex_model_building_service.types.string.String"
    ] = None,
    create_version: Optional[
        "capo_lex_model_building_service.types.boolean.Boolean"
    ] = None,
    kendra_configuration: Optional[
        "capo_lex_model_building_service.types.kendra_configuration.KendraConfiguration"
    ] = None,
    input_contexts: Optional[
        "capo_lex_model_building_service.types.input_context_list.InputContextList"
    ] = None,
    output_contexts: Optional[
        "capo_lex_model_building_service.types.output_context_list.OutputContextList"
    ] = None,
) -> "capo_lex_model_building_service.types.put_intent_response.PutIntentResponse":
    """<p>Creates an intent or replaces an existing intent.</p> <p>To define the interaction between the user and your bot, you use one or more intents. For a pizza ordering bot, for example, you would create an <code>OrderPizza</code> intent. </p> <p>To create an intent or replace an existing intent, you must provide the following:</p> <ul> <li> <p>Intent name. For example, <code>OrderPizza</code>.</p> </li> <li> <p>Sample utterances. For example, "Can I order a pizza, please." and "I want to order a pizza."</p> </li> <li> <p>Information to be gathered. You specify slot types for the information that your bot will request from the user. You can specify standard slot types, such as a date or a time, or custom slot types such as the size and crust of a pizza.</p> </li> <li> <p>How the intent will be fulfilled. You can provide a Lambda function or configure the intent to return the intent information to the client application. If you use a Lambda function, when all of the intent information is available, Amazon Lex invokes your Lambda function. If you configure your intent to return the intent information to the client application. </p> </li> </ul> <p>You can specify other optional information in the request, such as:</p> <ul> <li> <p>A confirmation prompt to ask the user to confirm an intent. For example, "Shall I order your pizza?"</p> </li> <li> <p>A conclusion statement to send to the user after the intent has been fulfilled. For example, "I placed your pizza order."</p> </li> <li> <p>A follow-up prompt that asks the user for additional activity. For example, asking "Do you want to order a drink with your pizza?"</p> </li> </ul> <p>If you specify an existing intent name to update the intent, Amazon Lex replaces the values in the <code>$LATEST</code> version of the intent with the values in the request. Amazon Lex removes fields that you don't provide in the request. If you don't specify the required fields, Amazon Lex throws an exception. When you update the <code>$LATEST</code> version of an intent, the <code>status</code> field of any bot that uses the <code>$LATEST</code> version of the intent is set to <code>NOT_BUILT</code>.</p> <p>For more information, see <a>how-it-works</a>.</p> <p>This operation requires permissions for the <code>lex:PutIntent</code> action.</p>

    Args:
        name: <p>The name of the intent. The name is <i>not</i> case sensitive. </p> <p>The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called <code>AMAZON.HelpIntent</code>, you can't create a custom intent called <code>HelpIntent</code>.</p> <p>For a list of built-in intents, see <a href="https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents">Standard Built-in Intents</a> in the <i>Alexa Skills Kit</i>.</p>
        description: <p>A description of the intent.</p>
        slots: <p>An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see <a>how-it-works</a>. </p>
        sample_utterances: <p>An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas". </p> <p>In each utterance, a slot name is enclosed in curly braces. </p>
        confirmation_prompt: <p>Prompts the user to confirm the intent. This question should have a yes or no answer.</p> <p>Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the <code>OrderPizza</code> intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information. </p> <note> <p>You you must provide both the <code>rejectionStatement</code> and the <code>confirmationPrompt</code>, or neither.</p> </note>
        rejection_statement: <p>When the user answers "no" to the question defined in <code>confirmationPrompt</code>, Amazon Lex responds with this statement to acknowledge that the intent was canceled. </p> <note> <p>You must provide both the <code>rejectionStatement</code> and the <code>confirmationPrompt</code>, or neither.</p> </note>
        follow_up_prompt: <p>Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the <code>OrderPizza</code> intent is fulfilled, you might prompt the user to order a drink.</p> <p>The action that Amazon Lex takes depends on the user's response, as follows:</p> <ul> <li> <p>If the user says "Yes" it responds with the clarification prompt that is configured for the bot.</p> </li> <li> <p>if the user says "Yes" and continues with an utterance that triggers an intent it starts a conversation for the intent.</p> </li> <li> <p>If the user says "No" it responds with the rejection statement configured for the the follow-up prompt.</p> </li> <li> <p>If it doesn't recognize the utterance it repeats the follow-up prompt again.</p> </li> </ul> <p>The <code>followUpPrompt</code> field and the <code>conclusionStatement</code> field are mutually exclusive. You can specify only one. </p>
        conclusion_statement: <p> The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function. </p> <p>This element is relevant only if you provide a Lambda function in the <code>fulfillmentActivity</code>. If you return the intent to the client application, you can't specify this element.</p> <note> <p>The <code>followUpPrompt</code> and <code>conclusionStatement</code> are mutually exclusive. You can specify only one.</p> </note>
        dialog_code_hook: <p> Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction. </p> <p>For example, suppose your bot determines that the user is John. Your Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, <code>GlutenIntolerant</code>, to true. You might find John's phone number and set the corresponding session attribute. </p>
        fulfillment_activity: <p>Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, <code>fulfillmentActivity</code> defines how the bot places an order with a local pizza store. </p> <p> You might configure Amazon Lex to return all of the intent information to the client application, or direct it to invoke a Lambda function that can process the intent (for example, place an order with a pizzeria). </p>
        parent_intent_signature: <p>A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see <a href="https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents">Standard Built-in Intents</a> in the <i>Alexa Skills Kit</i>.</p>
        checksum: <p>Identifies a specific revision of the <code>$LATEST</code> version.</p> <p>When you create a new intent, leave the <code>checksum</code> field blank. If you specify a checksum you get a <code>BadRequestException</code> exception.</p> <p>When you want to update a intent, set the <code>checksum</code> field to the checksum of the most recent revision of the <code>$LATEST</code> version. If you don't specify the <code> checksum</code> field, or if the checksum does not match the <code>$LATEST</code> version, you get a <code>PreconditionFailedException</code> exception.</p>
        create_version: <p>When set to <code>true</code> a new numbered version of the intent is created. This is the same as calling the <code>CreateIntentVersion</code> operation. If you do not specify <code>createVersion</code>, the default is <code>false</code>.</p>
        kendra_configuration: <p>Configuration information required to use the <code>AMAZON.KendraSearchIntent</code> intent to connect to an Amazon Kendra index. For more information, see <a href="http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html"> AMAZON.KendraSearchIntent</a>.</p>
        input_contexts: <p>An array of <code>InputContext</code> objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.</p>
        output_contexts: <p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>

    Raises:
        capo_lex_model_building_service.errors.bad_request_exception.BadRequestException: <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
        capo_lex_model_building_service.errors.conflict_exception.ConflictException: <p> There was a conflict processing the request. Try your request again. </p>
        capo_lex_model_building_service.errors.internal_failure_exception.InternalFailureException: <p>An internal Amazon Lex error occurred. Try your request again.</p>
        capo_lex_model_building_service.errors.limit_exceeded_exception.LimitExceededException: <p>The request exceeded a limit. Try your request again.</p>
        capo_lex_model_building_service.errors.precondition_failed_exception.PreconditionFailedException: <p> The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.</p>
        capo_lex_model_building_service.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To create an intent
        This example shows how to create an intent for ordering pizzas.

        >>> await client.put_intent(name='DocOrderPizza', description='Order a pizza from a local pizzeria.', slots=[{'name': 'Type', 'description': 'The type of pizza to order.', 'slotConstraint': 'Required', 'slotType': 'DocPizzaType', 'slotTypeVersion': '$LATEST', 'valueElicitationPrompt': {'messages': [{'contentType': 'PlainText', 'content': 'What type of pizza would you like?'}, {'contentType': 'PlainText', 'content': 'Vegie or cheese pizza?'}, {'contentType': 'PlainText', 'content': 'I can get you a vegie or a cheese pizza.'}], 'maxAttempts': 1}, 'priority': 1, 'sampleUtterances': ['Get me a {Type} pizza.', 'A {Type} pizza please.', "I'd like a {Type} pizza."]}, {'name': 'Crust', 'description': 'The type of pizza crust to order.', 'slotConstraint': 'Required', 'slotType': 'DocPizzaCrustType', 'slotTypeVersion': '$LATEST', 'valueElicitationPrompt': {'messages': [{'contentType': 'PlainText', 'content': 'What type of crust would you like?'}, {'contentType': 'PlainText', 'content': 'Thick or thin crust?'}], 'maxAttempts': 1}, 'priority': 2, 'sampleUtterances': ['Make it a {Crust} crust.', "I'd like a {Crust} crust."]}, {'name': 'Sauce', 'description': 'The type of sauce to use on the pizza.', 'slotConstraint': 'Required', 'slotType': 'DocPizzaSauceType', 'slotTypeVersion': '$LATEST', 'valueElicitationPrompt': {'messages': [{'contentType': 'PlainText', 'content': 'White or red sauce?'}, {'contentType': 'PlainText', 'content': 'Garlic or tomato sauce?'}], 'maxAttempts': 1}, 'priority': 3, 'sampleUtterances': ['Make it {Sauce} sauce.', "I'd like {Sauce} sauce."]}], sample_utterances=['Order me a pizza.', 'Order me a {Type} pizza.', 'I want a {Crust} crust {Type} pizza', 'I want a {Crust} crust {Type} pizza with {Sauce} sauce.'], confirmation_prompt={'messages': [{'contentType': 'PlainText', 'content': 'Should I order  your {Crust} crust {Type} pizza with {Sauce} sauce?'}], 'maxAttempts': 1}, rejection_statement={'messages': [{'contentType': 'PlainText', 'content': "Ok, I'll cancel your order."}, {'contentType': 'PlainText', 'content': 'I cancelled your order.'}]}, conclusion_statement={'messages': [{'contentType': 'PlainText', 'content': 'All right, I ordered  you a {Crust} crust {Type} pizza with {Sauce} sauce.'}, {'contentType': 'PlainText', 'content': 'OK, your {Crust} crust {Type} pizza with {Sauce} sauce is on the way.'}], 'responseCard': 'foo'}, fulfillment_activity={'type': 'ReturnIntent'})
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lex_model_building_service.types.put_intent_request.PutIntentRequest]",
    ) -> AsyncOperationResponse[
        "capo_lex_model_building_service.types.put_intent_response.PutIntentResponse"
    ]:
        import capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.put_intent

        (
            output,
            http_response,
        ) = await capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.put_intent.async_put_intent(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutIntent")
    )
    input_: capo_lex_model_building_service.types.put_intent_request.PutIntentRequest = {
        "name": name
    }
    if description is not None:
        input_["description"] = description
    if slots is not None:
        input_["slots"] = slots
    if sample_utterances is not None:
        input_["sample_utterances"] = sample_utterances
    if confirmation_prompt is not None:
        input_["confirmation_prompt"] = confirmation_prompt
    if rejection_statement is not None:
        input_["rejection_statement"] = rejection_statement
    if follow_up_prompt is not None:
        input_["follow_up_prompt"] = follow_up_prompt
    if conclusion_statement is not None:
        input_["conclusion_statement"] = conclusion_statement
    if dialog_code_hook is not None:
        input_["dialog_code_hook"] = dialog_code_hook
    if fulfillment_activity is not None:
        input_["fulfillment_activity"] = fulfillment_activity
    if parent_intent_signature is not None:
        input_["parent_intent_signature"] = parent_intent_signature
    if checksum is not None:
        input_["checksum"] = checksum
    if create_version is not None:
        input_["create_version"] = create_version
    if kendra_configuration is not None:
        input_["kendra_configuration"] = kendra_configuration
    if input_contexts is not None:
        input_["input_contexts"] = input_contexts
    if output_contexts is not None:
        input_["output_contexts"] = output_contexts

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output