AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

LexModelBuildingService

import "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice"

type LexModelBuildingService struct { *client.Client }

LexModelBuildingService provides the API operation methods for making requests to Amazon Lex Model Building Service. See this package's package overview docs for details on the service.

LexModelBuildingService methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

Client

Type: *client.Client

Method

CreateBotVersion

func (c *LexModelBuildingService) CreateBotVersion(input *CreateBotVersionInput) (*CreateBotVersionOutput, error)

CreateBotVersion API operation for Amazon Lex Model Building Service.

Creates a new version of the bot based on the $LATEST version. If the $LATEST version of this resource hasn't changed since you created the last version, Amazon Lex doesn't create a new version. It returns the last created version.

You can update only the $LATEST version of the bot. You can't update the numbered versions that you create with the CreateBotVersion operation.

When you create the first version of a bot, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see versioning-intro.

This operation requires permission for the lex:CreateBotVersion action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation CreateBotVersion for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodePreconditionFailedException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateBotVersion

CreateBotVersionRequest

func (c *LexModelBuildingService) CreateBotVersionRequest(input *CreateBotVersionInput) (req *request.Request, output *CreateBotVersionOutput)

CreateBotVersionRequest generates a "aws/request.Request" representing the client's request for the CreateBotVersion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateBotVersion for more information on using the CreateBotVersion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateBotVersionRequest method. req, resp := client.CreateBotVersionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateBotVersion

CreateBotVersionWithContext

func (c *LexModelBuildingService) CreateBotVersionWithContext(ctx aws.Context, input *CreateBotVersionInput, opts ...request.Option) (*CreateBotVersionOutput, error)

CreateBotVersionWithContext is the same as CreateBotVersion with the addition of the ability to pass a context and additional request options.

See CreateBotVersion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateIntentVersion

func (c *LexModelBuildingService) CreateIntentVersion(input *CreateIntentVersionInput) (*CreateIntentVersionOutput, error)

CreateIntentVersion API operation for Amazon Lex Model Building Service.

Creates a new version of an intent based on the $LATEST version of the intent. If the $LATEST version of this intent hasn't changed since you last updated it, Amazon Lex doesn't create a new version. It returns the last version you created.

You can update only the $LATEST version of the intent. You can't update the numbered versions that you create with the CreateIntentVersion operation.

When you create a version of an intent, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see versioning-intro.

This operation requires permissions to perform the lex:CreateIntentVersion action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation CreateIntentVersion for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodePreconditionFailedException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateIntentVersion

CreateIntentVersionRequest

func (c *LexModelBuildingService) CreateIntentVersionRequest(input *CreateIntentVersionInput) (req *request.Request, output *CreateIntentVersionOutput)

CreateIntentVersionRequest generates a "aws/request.Request" representing the client's request for the CreateIntentVersion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateIntentVersion for more information on using the CreateIntentVersion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateIntentVersionRequest method. req, resp := client.CreateIntentVersionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateIntentVersion

CreateIntentVersionWithContext

func (c *LexModelBuildingService) CreateIntentVersionWithContext(ctx aws.Context, input *CreateIntentVersionInput, opts ...request.Option) (*CreateIntentVersionOutput, error)

CreateIntentVersionWithContext is the same as CreateIntentVersion with the addition of the ability to pass a context and additional request options.

See CreateIntentVersion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateSlotTypeVersion

func (c *LexModelBuildingService) CreateSlotTypeVersion(input *CreateSlotTypeVersionInput) (*CreateSlotTypeVersionOutput, error)

CreateSlotTypeVersion API operation for Amazon Lex Model Building Service.

Creates a new version of a slot type based on the $LATEST version of the specified slot type. If the $LATEST version of this resource has not changed since the last version that you created, Amazon Lex doesn't create a new version. It returns the last version that you created.

You can update only the $LATEST version of a slot type. You can't update the numbered versions that you create with the CreateSlotTypeVersion operation.

When you create a version of a slot type, Amazon Lex sets the version to 1. Subsequent versions increment by 1. For more information, see versioning-intro.

This operation requires permissions for the lex:CreateSlotTypeVersion action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation CreateSlotTypeVersion for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodePreconditionFailedException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateSlotTypeVersion

CreateSlotTypeVersionRequest

func (c *LexModelBuildingService) CreateSlotTypeVersionRequest(input *CreateSlotTypeVersionInput) (req *request.Request, output *CreateSlotTypeVersionOutput)

CreateSlotTypeVersionRequest generates a "aws/request.Request" representing the client's request for the CreateSlotTypeVersion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateSlotTypeVersion for more information on using the CreateSlotTypeVersion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateSlotTypeVersionRequest method. req, resp := client.CreateSlotTypeVersionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateSlotTypeVersion

CreateSlotTypeVersionWithContext

func (c *LexModelBuildingService) CreateSlotTypeVersionWithContext(ctx aws.Context, input *CreateSlotTypeVersionInput, opts ...request.Option) (*CreateSlotTypeVersionOutput, error)

CreateSlotTypeVersionWithContext is the same as CreateSlotTypeVersion with the addition of the ability to pass a context and additional request options.

See CreateSlotTypeVersion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteBot

func (c *LexModelBuildingService) DeleteBot(input *DeleteBotInput) (*DeleteBotOutput, error)

DeleteBot API operation for Amazon Lex Model Building Service.

Deletes all versions of the bot, including the $LATEST version. To delete a specific version of the bot, use the DeleteBotVersion operation.

If a bot has an alias, you can't delete it. Instead, the DeleteBot operation returns a ResourceInUseException exception that includes a reference to the alias that refers to the bot. To remove the reference to the bot, delete the alias. If you get the same exception again, delete the referring alias until the DeleteBot operation is successful.

This operation requires permissions for the lex:DeleteBot action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation DeleteBot for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodeResourceInUseException "ResourceInUseException" The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.

The body of the exception contains a JSON object that describes the resource. { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, "resourceReference": { "name": string, "version": string } }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBot

DeleteBotAlias

func (c *LexModelBuildingService) DeleteBotAlias(input *DeleteBotAliasInput) (*DeleteBotAliasOutput, error)

DeleteBotAlias API operation for Amazon Lex Model Building Service.

Deletes an alias for the specified bot.

You can't delete an alias that is used in the association between a bot and a messaging channel. If an alias is used in a channel association, the DeleteBot operation returns a ResourceInUseException exception that includes a reference to the channel association that refers to the bot. You can remove the reference to the alias by deleting the channel association. If you get the same exception again, delete the referring association until the DeleteBotAlias operation is successful.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation DeleteBotAlias for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodeResourceInUseException "ResourceInUseException" The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.

The body of the exception contains a JSON object that describes the resource. { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, "resourceReference": { "name": string, "version": string } }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotAlias

DeleteBotAliasRequest

func (c *LexModelBuildingService) DeleteBotAliasRequest(input *DeleteBotAliasInput) (req *request.Request, output *DeleteBotAliasOutput)

DeleteBotAliasRequest generates a "aws/request.Request" representing the client's request for the DeleteBotAlias operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteBotAlias for more information on using the DeleteBotAlias API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteBotAliasRequest method. req, resp := client.DeleteBotAliasRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotAlias

DeleteBotAliasWithContext

func (c *LexModelBuildingService) DeleteBotAliasWithContext(ctx aws.Context, input *DeleteBotAliasInput, opts ...request.Option) (*DeleteBotAliasOutput, error)

DeleteBotAliasWithContext is the same as DeleteBotAlias with the addition of the ability to pass a context and additional request options.

See DeleteBotAlias for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteBotChannelAssociation

func (c *LexModelBuildingService) DeleteBotChannelAssociation(input *DeleteBotChannelAssociationInput) (*DeleteBotChannelAssociationOutput, error)

DeleteBotChannelAssociation API operation for Amazon Lex Model Building Service.

Deletes the association between an Amazon Lex bot and a messaging platform.

This operation requires permission for the lex:DeleteBotChannelAssociation action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation DeleteBotChannelAssociation for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotChannelAssociation

DeleteBotChannelAssociationRequest

func (c *LexModelBuildingService) DeleteBotChannelAssociationRequest(input *DeleteBotChannelAssociationInput) (req *request.Request, output *DeleteBotChannelAssociationOutput)

DeleteBotChannelAssociationRequest generates a "aws/request.Request" representing the client's request for the DeleteBotChannelAssociation operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteBotChannelAssociation for more information on using the DeleteBotChannelAssociation API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteBotChannelAssociationRequest method. req, resp := client.DeleteBotChannelAssociationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotChannelAssociation

DeleteBotChannelAssociationWithContext

func (c *LexModelBuildingService) DeleteBotChannelAssociationWithContext(ctx aws.Context, input *DeleteBotChannelAssociationInput, opts ...request.Option) (*DeleteBotChannelAssociationOutput, error)

DeleteBotChannelAssociationWithContext is the same as DeleteBotChannelAssociation with the addition of the ability to pass a context and additional request options.

See DeleteBotChannelAssociation for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteBotRequest

func (c *LexModelBuildingService) DeleteBotRequest(input *DeleteBotInput) (req *request.Request, output *DeleteBotOutput)

DeleteBotRequest generates a "aws/request.Request" representing the client's request for the DeleteBot operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteBot for more information on using the DeleteBot API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteBotRequest method. req, resp := client.DeleteBotRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBot

DeleteBotVersion

func (c *LexModelBuildingService) DeleteBotVersion(input *DeleteBotVersionInput) (*DeleteBotVersionOutput, error)

DeleteBotVersion API operation for Amazon Lex Model Building Service.

Deletes a specific version of a bot. To delete all versions of a bot, use the DeleteBot operation.

This operation requires permissions for the lex:DeleteBotVersion action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation DeleteBotVersion for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodeResourceInUseException "ResourceInUseException" The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.

The body of the exception contains a JSON object that describes the resource. { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, "resourceReference": { "name": string, "version": string } }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotVersion

DeleteBotVersionRequest

func (c *LexModelBuildingService) DeleteBotVersionRequest(input *DeleteBotVersionInput) (req *request.Request, output *DeleteBotVersionOutput)

DeleteBotVersionRequest generates a "aws/request.Request" representing the client's request for the DeleteBotVersion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteBotVersion for more information on using the DeleteBotVersion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteBotVersionRequest method. req, resp := client.DeleteBotVersionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotVersion

DeleteBotVersionWithContext

func (c *LexModelBuildingService) DeleteBotVersionWithContext(ctx aws.Context, input *DeleteBotVersionInput, opts ...request.Option) (*DeleteBotVersionOutput, error)

DeleteBotVersionWithContext is the same as DeleteBotVersion with the addition of the ability to pass a context and additional request options.

See DeleteBotVersion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteBotWithContext

func (c *LexModelBuildingService) DeleteBotWithContext(ctx aws.Context, input *DeleteBotInput, opts ...request.Option) (*DeleteBotOutput, error)

DeleteBotWithContext is the same as DeleteBot with the addition of the ability to pass a context and additional request options.

See DeleteBot for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteIntent

func (c *LexModelBuildingService) DeleteIntent(input *DeleteIntentInput) (*DeleteIntentOutput, error)

DeleteIntent API operation for Amazon Lex Model Building Service.

Deletes all versions of the intent, including the $LATEST version. To delete a specific version of the intent, use the DeleteIntentVersion operation.

You can delete a version of an intent only if it is not referenced. To delete an intent that is referred to in one or more bots (see how-it-works), you must remove those references first.

If you get the ResourceInUseException exception, it provides an example reference that shows where the intent is referenced. To remove the reference to the intent, either update the bot or delete it. If you get the same exception when you attempt to delete the intent again, repeat until the intent has no references and the call to DeleteIntent is successful.

This operation requires permission for the lex:DeleteIntent action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation DeleteIntent for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodeResourceInUseException "ResourceInUseException" The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.

The body of the exception contains a JSON object that describes the resource. { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, "resourceReference": { "name": string, "version": string } }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntent

DeleteIntentRequest

func (c *LexModelBuildingService) DeleteIntentRequest(input *DeleteIntentInput) (req *request.Request, output *DeleteIntentOutput)

DeleteIntentRequest generates a "aws/request.Request" representing the client's request for the DeleteIntent operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteIntent for more information on using the DeleteIntent API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteIntentRequest method. req, resp := client.DeleteIntentRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntent

DeleteIntentVersion

func (c *LexModelBuildingService) DeleteIntentVersion(input *DeleteIntentVersionInput) (*DeleteIntentVersionOutput, error)

DeleteIntentVersion API operation for Amazon Lex Model Building Service.

Deletes a specific version of an intent. To delete all versions of a intent, use the DeleteIntent operation.

This operation requires permissions for the lex:DeleteIntentVersion action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation DeleteIntentVersion for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodeResourceInUseException "ResourceInUseException" The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.

The body of the exception contains a JSON object that describes the resource. { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, "resourceReference": { "name": string, "version": string } }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentVersion

DeleteIntentVersionRequest

func (c *LexModelBuildingService) DeleteIntentVersionRequest(input *DeleteIntentVersionInput) (req *request.Request, output *DeleteIntentVersionOutput)

DeleteIntentVersionRequest generates a "aws/request.Request" representing the client's request for the DeleteIntentVersion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteIntentVersion for more information on using the DeleteIntentVersion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteIntentVersionRequest method. req, resp := client.DeleteIntentVersionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentVersion

DeleteIntentVersionWithContext

func (c *LexModelBuildingService) DeleteIntentVersionWithContext(ctx aws.Context, input *DeleteIntentVersionInput, opts ...request.Option) (*DeleteIntentVersionOutput, error)

DeleteIntentVersionWithContext is the same as DeleteIntentVersion with the addition of the ability to pass a context and additional request options.

See DeleteIntentVersion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteIntentWithContext

func (c *LexModelBuildingService) DeleteIntentWithContext(ctx aws.Context, input *DeleteIntentInput, opts ...request.Option) (*DeleteIntentOutput, error)

DeleteIntentWithContext is the same as DeleteIntent with the addition of the ability to pass a context and additional request options.

See DeleteIntent for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteSlotType

func (c *LexModelBuildingService) DeleteSlotType(input *DeleteSlotTypeInput) (*DeleteSlotTypeOutput, error)

DeleteSlotType API operation for Amazon Lex Model Building Service.

Deletes all versions of the slot type, including the $LATEST version. To delete a specific version of the slot type, use the DeleteSlotTypeVersion operation.

You can delete a version of a slot type only if it is not referenced. To delete a slot type that is referred to in one or more intents, you must remove those references first.

If you get the ResourceInUseException exception, the exception provides an example reference that shows the intent where the slot type is referenced. To remove the reference to the slot type, either update the intent or delete it. If you get the same exception when you attempt to delete the slot type again, repeat until the slot type has no references and the DeleteSlotType call is successful.

This operation requires permission for the lex:DeleteSlotType action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation DeleteSlotType for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodeResourceInUseException "ResourceInUseException" The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.

The body of the exception contains a JSON object that describes the resource. { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, "resourceReference": { "name": string, "version": string } }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotType

DeleteSlotTypeRequest

func (c *LexModelBuildingService) DeleteSlotTypeRequest(input *DeleteSlotTypeInput) (req *request.Request, output *DeleteSlotTypeOutput)

DeleteSlotTypeRequest generates a "aws/request.Request" representing the client's request for the DeleteSlotType operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteSlotType for more information on using the DeleteSlotType API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteSlotTypeRequest method. req, resp := client.DeleteSlotTypeRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotType

DeleteSlotTypeVersion

func (c *LexModelBuildingService) DeleteSlotTypeVersion(input *DeleteSlotTypeVersionInput) (*DeleteSlotTypeVersionOutput, error)

DeleteSlotTypeVersion API operation for Amazon Lex Model Building Service.

Deletes a specific version of a slot type. To delete all versions of a slot type, use the DeleteSlotType operation.

This operation requires permissions for the lex:DeleteSlotTypeVersion action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation DeleteSlotTypeVersion for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodeResourceInUseException "ResourceInUseException" The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.

The body of the exception contains a JSON object that describes the resource. { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, "resourceReference": { "name": string, "version": string } }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeVersion

DeleteSlotTypeVersionRequest

func (c *LexModelBuildingService) DeleteSlotTypeVersionRequest(input *DeleteSlotTypeVersionInput) (req *request.Request, output *DeleteSlotTypeVersionOutput)

DeleteSlotTypeVersionRequest generates a "aws/request.Request" representing the client's request for the DeleteSlotTypeVersion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteSlotTypeVersion for more information on using the DeleteSlotTypeVersion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteSlotTypeVersionRequest method. req, resp := client.DeleteSlotTypeVersionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeVersion

DeleteSlotTypeVersionWithContext

func (c *LexModelBuildingService) DeleteSlotTypeVersionWithContext(ctx aws.Context, input *DeleteSlotTypeVersionInput, opts ...request.Option) (*DeleteSlotTypeVersionOutput, error)

DeleteSlotTypeVersionWithContext is the same as DeleteSlotTypeVersion with the addition of the ability to pass a context and additional request options.

See DeleteSlotTypeVersion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteSlotTypeWithContext

func (c *LexModelBuildingService) DeleteSlotTypeWithContext(ctx aws.Context, input *DeleteSlotTypeInput, opts ...request.Option) (*DeleteSlotTypeOutput, error)

DeleteSlotTypeWithContext is the same as DeleteSlotType with the addition of the ability to pass a context and additional request options.

See DeleteSlotType for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteUtterances

func (c *LexModelBuildingService) DeleteUtterances(input *DeleteUtterancesInput) (*DeleteUtterancesOutput, error)

DeleteUtterances API operation for Amazon Lex Model Building Service.

Deletes stored utterances.

Amazon Lex stores the utterances that users send to your bot. Utterances are stored for 15 days for use with the GetUtterancesView operation, and then stored indefinitely for use in improving the ability of your bot to respond to user input.

Use the DeleteStoredUtterances operation to manually delete stored utterances for a specific user.

This operation requires permissions for the lex:DeleteUtterances action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation DeleteUtterances for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteUtterances

DeleteUtterancesRequest

func (c *LexModelBuildingService) DeleteUtterancesRequest(input *DeleteUtterancesInput) (req *request.Request, output *DeleteUtterancesOutput)

DeleteUtterancesRequest generates a "aws/request.Request" representing the client's request for the DeleteUtterances operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteUtterances for more information on using the DeleteUtterances API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteUtterancesRequest method. req, resp := client.DeleteUtterancesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteUtterances

DeleteUtterancesWithContext

func (c *LexModelBuildingService) DeleteUtterancesWithContext(ctx aws.Context, input *DeleteUtterancesInput, opts ...request.Option) (*DeleteUtterancesOutput, error)

DeleteUtterancesWithContext is the same as DeleteUtterances with the addition of the ability to pass a context and additional request options.

See DeleteUtterances for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBot

func (c *LexModelBuildingService) GetBot(input *GetBotInput) (*GetBotOutput, error)

GetBot API operation for Amazon Lex Model Building Service.

Returns metadata information for a specific bot. You must provide the bot name and the bot version or alias.

This operation requires permissions for the lex:GetBot action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetBot for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBot

Example

LexModelBuildingService GetBot shared00

To get information about a bot

This example shows how to get configuration information for a bot.

{ svc := lexmodelbuildingservice.New(session.New()) input := &lexmodelbuildingservice.GetBotInput{ Name: aws.String("DocOrderPizza"), VersionOrAlias: aws.String("$LATEST"), } result, err := svc.GetBot(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lexmodelbuildingservice.ErrCodeNotFoundException: fmt.Println(lexmodelbuildingservice.ErrCodeNotFoundException, aerr.Error()) case lexmodelbuildingservice.ErrCodeLimitExceededException: fmt.Println(lexmodelbuildingservice.ErrCodeLimitExceededException, aerr.Error()) case lexmodelbuildingservice.ErrCodeInternalFailureException: fmt.Println(lexmodelbuildingservice.ErrCodeInternalFailureException, aerr.Error()) case lexmodelbuildingservice.ErrCodeBadRequestException: fmt.Println(lexmodelbuildingservice.ErrCodeBadRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetBotAlias

func (c *LexModelBuildingService) GetBotAlias(input *GetBotAliasInput) (*GetBotAliasOutput, error)

GetBotAlias API operation for Amazon Lex Model Building Service.

Returns information about an Amazon Lex bot alias. For more information about aliases, see versioning-aliases.

This operation requires permissions for the lex:GetBotAlias action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetBotAlias for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAlias

GetBotAliasRequest

func (c *LexModelBuildingService) GetBotAliasRequest(input *GetBotAliasInput) (req *request.Request, output *GetBotAliasOutput)

GetBotAliasRequest generates a "aws/request.Request" representing the client's request for the GetBotAlias operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBotAlias for more information on using the GetBotAlias API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBotAliasRequest method. req, resp := client.GetBotAliasRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAlias

GetBotAliasWithContext

func (c *LexModelBuildingService) GetBotAliasWithContext(ctx aws.Context, input *GetBotAliasInput, opts ...request.Option) (*GetBotAliasOutput, error)

GetBotAliasWithContext is the same as GetBotAlias with the addition of the ability to pass a context and additional request options.

See GetBotAlias for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBotAliases

func (c *LexModelBuildingService) GetBotAliases(input *GetBotAliasesInput) (*GetBotAliasesOutput, error)

GetBotAliases API operation for Amazon Lex Model Building Service.

Returns a list of aliases for a specified Amazon Lex bot.

This operation requires permissions for the lex:GetBotAliases action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetBotAliases for usage and error information.

Returned Error Codes:

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliases

GetBotAliasesPages

func (c *LexModelBuildingService) GetBotAliasesPages(input *GetBotAliasesInput, fn func(*GetBotAliasesOutput, bool) bool) error

GetBotAliasesPages iterates over the pages of a GetBotAliases operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetBotAliases method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetBotAliases operation. pageNum := 0 err := client.GetBotAliasesPages(params, func(page *GetBotAliasesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetBotAliasesPagesWithContext

func (c *LexModelBuildingService) GetBotAliasesPagesWithContext(ctx aws.Context, input *GetBotAliasesInput, fn func(*GetBotAliasesOutput, bool) bool, opts ...request.Option) error

GetBotAliasesPagesWithContext same as GetBotAliasesPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBotAliasesRequest

func (c *LexModelBuildingService) GetBotAliasesRequest(input *GetBotAliasesInput) (req *request.Request, output *GetBotAliasesOutput)

GetBotAliasesRequest generates a "aws/request.Request" representing the client's request for the GetBotAliases operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBotAliases for more information on using the GetBotAliases API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBotAliasesRequest method. req, resp := client.GetBotAliasesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliases

GetBotAliasesWithContext

func (c *LexModelBuildingService) GetBotAliasesWithContext(ctx aws.Context, input *GetBotAliasesInput, opts ...request.Option) (*GetBotAliasesOutput, error)

GetBotAliasesWithContext is the same as GetBotAliases with the addition of the ability to pass a context and additional request options.

See GetBotAliases for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBotChannelAssociation

func (c *LexModelBuildingService) GetBotChannelAssociation(input *GetBotChannelAssociationInput) (*GetBotChannelAssociationOutput, error)

GetBotChannelAssociation API operation for Amazon Lex Model Building Service.

Returns information about the association between an Amazon Lex bot and a messaging platform.

This operation requires permissions for the lex:GetBotChannelAssociation action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetBotChannelAssociation for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociation

GetBotChannelAssociationRequest

func (c *LexModelBuildingService) GetBotChannelAssociationRequest(input *GetBotChannelAssociationInput) (req *request.Request, output *GetBotChannelAssociationOutput)

GetBotChannelAssociationRequest generates a "aws/request.Request" representing the client's request for the GetBotChannelAssociation operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBotChannelAssociation for more information on using the GetBotChannelAssociation API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBotChannelAssociationRequest method. req, resp := client.GetBotChannelAssociationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociation

GetBotChannelAssociationWithContext

func (c *LexModelBuildingService) GetBotChannelAssociationWithContext(ctx aws.Context, input *GetBotChannelAssociationInput, opts ...request.Option) (*GetBotChannelAssociationOutput, error)

GetBotChannelAssociationWithContext is the same as GetBotChannelAssociation with the addition of the ability to pass a context and additional request options.

See GetBotChannelAssociation for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBotChannelAssociations

func (c *LexModelBuildingService) GetBotChannelAssociations(input *GetBotChannelAssociationsInput) (*GetBotChannelAssociationsOutput, error)

GetBotChannelAssociations API operation for Amazon Lex Model Building Service.

Returns a list of all of the channels associated with the specified bot.

The GetBotChannelAssociations operation requires permissions for the lex:GetBotChannelAssociations action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetBotChannelAssociations for usage and error information.

Returned Error Codes:

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociations

GetBotChannelAssociationsPages

func (c *LexModelBuildingService) GetBotChannelAssociationsPages(input *GetBotChannelAssociationsInput, fn func(*GetBotChannelAssociationsOutput, bool) bool) error

GetBotChannelAssociationsPages iterates over the pages of a GetBotChannelAssociations operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetBotChannelAssociations method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetBotChannelAssociations operation. pageNum := 0 err := client.GetBotChannelAssociationsPages(params, func(page *GetBotChannelAssociationsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetBotChannelAssociationsPagesWithContext

func (c *LexModelBuildingService) GetBotChannelAssociationsPagesWithContext(ctx aws.Context, input *GetBotChannelAssociationsInput, fn func(*GetBotChannelAssociationsOutput, bool) bool, opts ...request.Option) error

GetBotChannelAssociationsPagesWithContext same as GetBotChannelAssociationsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBotChannelAssociationsRequest

func (c *LexModelBuildingService) GetBotChannelAssociationsRequest(input *GetBotChannelAssociationsInput) (req *request.Request, output *GetBotChannelAssociationsOutput)

GetBotChannelAssociationsRequest generates a "aws/request.Request" representing the client's request for the GetBotChannelAssociations operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBotChannelAssociations for more information on using the GetBotChannelAssociations API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBotChannelAssociationsRequest method. req, resp := client.GetBotChannelAssociationsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociations

GetBotChannelAssociationsWithContext

func (c *LexModelBuildingService) GetBotChannelAssociationsWithContext(ctx aws.Context, input *GetBotChannelAssociationsInput, opts ...request.Option) (*GetBotChannelAssociationsOutput, error)

GetBotChannelAssociationsWithContext is the same as GetBotChannelAssociations with the addition of the ability to pass a context and additional request options.

See GetBotChannelAssociations for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBotRequest

func (c *LexModelBuildingService) GetBotRequest(input *GetBotInput) (req *request.Request, output *GetBotOutput)

GetBotRequest generates a "aws/request.Request" representing the client's request for the GetBot operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBot for more information on using the GetBot API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBotRequest method. req, resp := client.GetBotRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBot

GetBotVersions

func (c *LexModelBuildingService) GetBotVersions(input *GetBotVersionsInput) (*GetBotVersionsOutput, error)

GetBotVersions API operation for Amazon Lex Model Building Service.

Gets information about all of the versions of a bot.

The GetBotVersions operation returns a BotMetadata object for each version of a bot. For example, if a bot has three numbered versions, the GetBotVersions operation returns four BotMetadata objects in the response, one for each numbered version and one for the $LATEST version.

The GetBotVersions operation always returns at least one version, the $LATEST version.

This operation requires permissions for the lex:GetBotVersions action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetBotVersions for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersions

GetBotVersionsPages

func (c *LexModelBuildingService) GetBotVersionsPages(input *GetBotVersionsInput, fn func(*GetBotVersionsOutput, bool) bool) error

GetBotVersionsPages iterates over the pages of a GetBotVersions operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetBotVersions method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetBotVersions operation. pageNum := 0 err := client.GetBotVersionsPages(params, func(page *GetBotVersionsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetBotVersionsPagesWithContext

func (c *LexModelBuildingService) GetBotVersionsPagesWithContext(ctx aws.Context, input *GetBotVersionsInput, fn func(*GetBotVersionsOutput, bool) bool, opts ...request.Option) error

GetBotVersionsPagesWithContext same as GetBotVersionsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBotVersionsRequest

func (c *LexModelBuildingService) GetBotVersionsRequest(input *GetBotVersionsInput) (req *request.Request, output *GetBotVersionsOutput)

GetBotVersionsRequest generates a "aws/request.Request" representing the client's request for the GetBotVersions operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBotVersions for more information on using the GetBotVersions API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBotVersionsRequest method. req, resp := client.GetBotVersionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersions

GetBotVersionsWithContext

func (c *LexModelBuildingService) GetBotVersionsWithContext(ctx aws.Context, input *GetBotVersionsInput, opts ...request.Option) (*GetBotVersionsOutput, error)

GetBotVersionsWithContext is the same as GetBotVersions with the addition of the ability to pass a context and additional request options.

See GetBotVersions for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBotWithContext

func (c *LexModelBuildingService) GetBotWithContext(ctx aws.Context, input *GetBotInput, opts ...request.Option) (*GetBotOutput, error)

GetBotWithContext is the same as GetBot with the addition of the ability to pass a context and additional request options.

See GetBot for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBots

func (c *LexModelBuildingService) GetBots(input *GetBotsInput) (*GetBotsOutput, error)

GetBots API operation for Amazon Lex Model Building Service.

Returns bot information as follows:

  • If you provide the nameContains field, the response includes information for the $LATEST version of all bots whose name contains the specified string.

  • If you don't specify the nameContains field, the operation returns information about the $LATEST version of all of your bots.

This operation requires permission for the lex:GetBots action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetBots for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBots

Example

LexModelBuildingService GetBots shared00

To get a list of bots

This example shows how to get a list of all of the bots in your account.

{ svc := lexmodelbuildingservice.New(session.New()) input := &lexmodelbuildingservice.GetBotsInput{ MaxResults: aws.Int64(5), NextToken: aws.String(""), } result, err := svc.GetBots(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lexmodelbuildingservice.ErrCodeNotFoundException: fmt.Println(lexmodelbuildingservice.ErrCodeNotFoundException, aerr.Error()) case lexmodelbuildingservice.ErrCodeLimitExceededException: fmt.Println(lexmodelbuildingservice.ErrCodeLimitExceededException, aerr.Error()) case lexmodelbuildingservice.ErrCodeInternalFailureException: fmt.Println(lexmodelbuildingservice.ErrCodeInternalFailureException, aerr.Error()) case lexmodelbuildingservice.ErrCodeBadRequestException: fmt.Println(lexmodelbuildingservice.ErrCodeBadRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetBotsPages

func (c *LexModelBuildingService) GetBotsPages(input *GetBotsInput, fn func(*GetBotsOutput, bool) bool) error

GetBotsPages iterates over the pages of a GetBots operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetBots method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetBots operation. pageNum := 0 err := client.GetBotsPages(params, func(page *GetBotsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetBotsPagesWithContext

func (c *LexModelBuildingService) GetBotsPagesWithContext(ctx aws.Context, input *GetBotsInput, fn func(*GetBotsOutput, bool) bool, opts ...request.Option) error

GetBotsPagesWithContext same as GetBotsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBotsRequest

func (c *LexModelBuildingService) GetBotsRequest(input *GetBotsInput) (req *request.Request, output *GetBotsOutput)

GetBotsRequest generates a "aws/request.Request" representing the client's request for the GetBots operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBots for more information on using the GetBots API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBotsRequest method. req, resp := client.GetBotsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBots

GetBotsWithContext

func (c *LexModelBuildingService) GetBotsWithContext(ctx aws.Context, input *GetBotsInput, opts ...request.Option) (*GetBotsOutput, error)

GetBotsWithContext is the same as GetBots with the addition of the ability to pass a context and additional request options.

See GetBots for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBuiltinIntent

func (c *LexModelBuildingService) GetBuiltinIntent(input *GetBuiltinIntentInput) (*GetBuiltinIntentOutput, error)

GetBuiltinIntent API operation for Amazon Lex Model Building Service.

Returns information about a built-in intent.

This operation requires permission for the lex:GetBuiltinIntent action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetBuiltinIntent for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntent

GetBuiltinIntentRequest

func (c *LexModelBuildingService) GetBuiltinIntentRequest(input *GetBuiltinIntentInput) (req *request.Request, output *GetBuiltinIntentOutput)

GetBuiltinIntentRequest generates a "aws/request.Request" representing the client's request for the GetBuiltinIntent operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBuiltinIntent for more information on using the GetBuiltinIntent API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBuiltinIntentRequest method. req, resp := client.GetBuiltinIntentRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntent

GetBuiltinIntentWithContext

func (c *LexModelBuildingService) GetBuiltinIntentWithContext(ctx aws.Context, input *GetBuiltinIntentInput, opts ...request.Option) (*GetBuiltinIntentOutput, error)

GetBuiltinIntentWithContext is the same as GetBuiltinIntent with the addition of the ability to pass a context and additional request options.

See GetBuiltinIntent for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBuiltinIntents

func (c *LexModelBuildingService) GetBuiltinIntents(input *GetBuiltinIntentsInput) (*GetBuiltinIntentsOutput, error)

GetBuiltinIntents API operation for Amazon Lex Model Building Service.

Gets a list of built-in intents that meet the specified criteria.

This operation requires permission for the lex:GetBuiltinIntents action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetBuiltinIntents for usage and error information.

Returned Error Codes:

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntents

GetBuiltinIntentsPages

func (c *LexModelBuildingService) GetBuiltinIntentsPages(input *GetBuiltinIntentsInput, fn func(*GetBuiltinIntentsOutput, bool) bool) error

GetBuiltinIntentsPages iterates over the pages of a GetBuiltinIntents operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetBuiltinIntents method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetBuiltinIntents operation. pageNum := 0 err := client.GetBuiltinIntentsPages(params, func(page *GetBuiltinIntentsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetBuiltinIntentsPagesWithContext

func (c *LexModelBuildingService) GetBuiltinIntentsPagesWithContext(ctx aws.Context, input *GetBuiltinIntentsInput, fn func(*GetBuiltinIntentsOutput, bool) bool, opts ...request.Option) error

GetBuiltinIntentsPagesWithContext same as GetBuiltinIntentsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBuiltinIntentsRequest

func (c *LexModelBuildingService) GetBuiltinIntentsRequest(input *GetBuiltinIntentsInput) (req *request.Request, output *GetBuiltinIntentsOutput)

GetBuiltinIntentsRequest generates a "aws/request.Request" representing the client's request for the GetBuiltinIntents operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBuiltinIntents for more information on using the GetBuiltinIntents API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBuiltinIntentsRequest method. req, resp := client.GetBuiltinIntentsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntents

GetBuiltinIntentsWithContext

func (c *LexModelBuildingService) GetBuiltinIntentsWithContext(ctx aws.Context, input *GetBuiltinIntentsInput, opts ...request.Option) (*GetBuiltinIntentsOutput, error)

GetBuiltinIntentsWithContext is the same as GetBuiltinIntents with the addition of the ability to pass a context and additional request options.

See GetBuiltinIntents for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBuiltinSlotTypes

func (c *LexModelBuildingService) GetBuiltinSlotTypes(input *GetBuiltinSlotTypesInput) (*GetBuiltinSlotTypesOutput, error)

GetBuiltinSlotTypes API operation for Amazon Lex Model Building Service.

Gets a list of built-in slot types that meet the specified criteria.

For a list of built-in slot types, see Slot Type Reference (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference) in the Alexa Skills Kit.

This operation requires permission for the lex:GetBuiltInSlotTypes action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetBuiltinSlotTypes for usage and error information.

Returned Error Codes:

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinSlotTypes

GetBuiltinSlotTypesPages

func (c *LexModelBuildingService) GetBuiltinSlotTypesPages(input *GetBuiltinSlotTypesInput, fn func(*GetBuiltinSlotTypesOutput, bool) bool) error

GetBuiltinSlotTypesPages iterates over the pages of a GetBuiltinSlotTypes operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetBuiltinSlotTypes method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetBuiltinSlotTypes operation. pageNum := 0 err := client.GetBuiltinSlotTypesPages(params, func(page *GetBuiltinSlotTypesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetBuiltinSlotTypesPagesWithContext

func (c *LexModelBuildingService) GetBuiltinSlotTypesPagesWithContext(ctx aws.Context, input *GetBuiltinSlotTypesInput, fn func(*GetBuiltinSlotTypesOutput, bool) bool, opts ...request.Option) error

GetBuiltinSlotTypesPagesWithContext same as GetBuiltinSlotTypesPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetBuiltinSlotTypesRequest

func (c *LexModelBuildingService) GetBuiltinSlotTypesRequest(input *GetBuiltinSlotTypesInput) (req *request.Request, output *GetBuiltinSlotTypesOutput)

GetBuiltinSlotTypesRequest generates a "aws/request.Request" representing the client's request for the GetBuiltinSlotTypes operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetBuiltinSlotTypes for more information on using the GetBuiltinSlotTypes API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetBuiltinSlotTypesRequest method. req, resp := client.GetBuiltinSlotTypesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinSlotTypes

GetBuiltinSlotTypesWithContext

func (c *LexModelBuildingService) GetBuiltinSlotTypesWithContext(ctx aws.Context, input *GetBuiltinSlotTypesInput, opts ...request.Option) (*GetBuiltinSlotTypesOutput, error)

GetBuiltinSlotTypesWithContext is the same as GetBuiltinSlotTypes with the addition of the ability to pass a context and additional request options.

See GetBuiltinSlotTypes for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetExport

func (c *LexModelBuildingService) GetExport(input *GetExportInput) (*GetExportOutput, error)

GetExport API operation for Amazon Lex Model Building Service.

Exports the contents of a Amazon Lex resource in a specified format.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetExport for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetExport

GetExportRequest

func (c *LexModelBuildingService) GetExportRequest(input *GetExportInput) (req *request.Request, output *GetExportOutput)

GetExportRequest generates a "aws/request.Request" representing the client's request for the GetExport operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetExport for more information on using the GetExport API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetExportRequest method. req, resp := client.GetExportRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetExport

GetExportWithContext

func (c *LexModelBuildingService) GetExportWithContext(ctx aws.Context, input *GetExportInput, opts ...request.Option) (*GetExportOutput, error)

GetExportWithContext is the same as GetExport with the addition of the ability to pass a context and additional request options.

See GetExport for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetImport

func (c *LexModelBuildingService) GetImport(input *GetImportInput) (*GetImportOutput, error)

GetImport API operation for Amazon Lex Model Building Service.

Gets information about an import job started with the StartImport operation.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetImport for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetImport

GetImportRequest

func (c *LexModelBuildingService) GetImportRequest(input *GetImportInput) (req *request.Request, output *GetImportOutput)

GetImportRequest generates a "aws/request.Request" representing the client's request for the GetImport operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetImport for more information on using the GetImport API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetImportRequest method. req, resp := client.GetImportRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetImport

GetImportWithContext

func (c *LexModelBuildingService) GetImportWithContext(ctx aws.Context, input *GetImportInput, opts ...request.Option) (*GetImportOutput, error)

GetImportWithContext is the same as GetImport with the addition of the ability to pass a context and additional request options.

See GetImport for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetIntent

func (c *LexModelBuildingService) GetIntent(input *GetIntentInput) (*GetIntentOutput, error)

GetIntent API operation for Amazon Lex Model Building Service.

Returns information about an intent. In addition to the intent name, you must specify the intent version.

This operation requires permissions to perform the lex:GetIntent action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetIntent for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntent

Example

LexModelBuildingService GetIntent shared00

To get a information about an intent

This example shows how to get information about an intent.

{ svc := lexmodelbuildingservice.New(session.New()) input := &lexmodelbuildingservice.GetIntentInput{ Name: aws.String("DocOrderPizza"), Version: aws.String("$LATEST"), } result, err := svc.GetIntent(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lexmodelbuildingservice.ErrCodeNotFoundException: fmt.Println(lexmodelbuildingservice.ErrCodeNotFoundException, aerr.Error()) case lexmodelbuildingservice.ErrCodeLimitExceededException: fmt.Println(lexmodelbuildingservice.ErrCodeLimitExceededException, aerr.Error()) case lexmodelbuildingservice.ErrCodeInternalFailureException: fmt.Println(lexmodelbuildingservice.ErrCodeInternalFailureException, aerr.Error()) case lexmodelbuildingservice.ErrCodeBadRequestException: fmt.Println(lexmodelbuildingservice.ErrCodeBadRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetIntentRequest

func (c *LexModelBuildingService) GetIntentRequest(input *GetIntentInput) (req *request.Request, output *GetIntentOutput)

GetIntentRequest generates a "aws/request.Request" representing the client's request for the GetIntent operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetIntent for more information on using the GetIntent API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetIntentRequest method. req, resp := client.GetIntentRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntent

GetIntentVersions

func (c *LexModelBuildingService) GetIntentVersions(input *GetIntentVersionsInput) (*GetIntentVersionsOutput, error)

GetIntentVersions API operation for Amazon Lex Model Building Service.

Gets information about all of the versions of an intent.

The GetIntentVersions operation returns an IntentMetadata object for each version of an intent. For example, if an intent has three numbered versions, the GetIntentVersions operation returns four IntentMetadata objects in the response, one for each numbered version and one for the $LATEST version.

The GetIntentVersions operation always returns at least one version, the $LATEST version.

This operation requires permissions for the lex:GetIntentVersions action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetIntentVersions for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentVersions

GetIntentVersionsPages

func (c *LexModelBuildingService) GetIntentVersionsPages(input *GetIntentVersionsInput, fn func(*GetIntentVersionsOutput, bool) bool) error

GetIntentVersionsPages iterates over the pages of a GetIntentVersions operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetIntentVersions method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetIntentVersions operation. pageNum := 0 err := client.GetIntentVersionsPages(params, func(page *GetIntentVersionsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetIntentVersionsPagesWithContext

func (c *LexModelBuildingService) GetIntentVersionsPagesWithContext(ctx aws.Context, input *GetIntentVersionsInput, fn func(*GetIntentVersionsOutput, bool) bool, opts ...request.Option) error

GetIntentVersionsPagesWithContext same as GetIntentVersionsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetIntentVersionsRequest

func (c *LexModelBuildingService) GetIntentVersionsRequest(input *GetIntentVersionsInput) (req *request.Request, output *GetIntentVersionsOutput)

GetIntentVersionsRequest generates a "aws/request.Request" representing the client's request for the GetIntentVersions operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetIntentVersions for more information on using the GetIntentVersions API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetIntentVersionsRequest method. req, resp := client.GetIntentVersionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentVersions

GetIntentVersionsWithContext

func (c *LexModelBuildingService) GetIntentVersionsWithContext(ctx aws.Context, input *GetIntentVersionsInput, opts ...request.Option) (*GetIntentVersionsOutput, error)

GetIntentVersionsWithContext is the same as GetIntentVersions with the addition of the ability to pass a context and additional request options.

See GetIntentVersions for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetIntentWithContext

func (c *LexModelBuildingService) GetIntentWithContext(ctx aws.Context, input *GetIntentInput, opts ...request.Option) (*GetIntentOutput, error)

GetIntentWithContext is the same as GetIntent with the addition of the ability to pass a context and additional request options.

See GetIntent for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetIntents

func (c *LexModelBuildingService) GetIntents(input *GetIntentsInput) (*GetIntentsOutput, error)

GetIntents API operation for Amazon Lex Model Building Service.

Returns intent information as follows:

  • If you specify the nameContains field, returns the $LATEST version of all intents that contain the specified string.

  • If you don't specify the nameContains field, returns information about the $LATEST version of all intents.

The operation requires permission for the lex:GetIntents action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetIntents for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntents

Example

LexModelBuildingService GetIntents shared00

To get a list of intents

This example shows how to get a list of all of the intents in your account.

{ svc := lexmodelbuildingservice.New(session.New()) input := &lexmodelbuildingservice.GetIntentsInput{ MaxResults: aws.Int64(10), NextToken: aws.String(""), } result, err := svc.GetIntents(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lexmodelbuildingservice.ErrCodeNotFoundException: fmt.Println(lexmodelbuildingservice.ErrCodeNotFoundException, aerr.Error()) case lexmodelbuildingservice.ErrCodeLimitExceededException: fmt.Println(lexmodelbuildingservice.ErrCodeLimitExceededException, aerr.Error()) case lexmodelbuildingservice.ErrCodeInternalFailureException: fmt.Println(lexmodelbuildingservice.ErrCodeInternalFailureException, aerr.Error()) case lexmodelbuildingservice.ErrCodeBadRequestException: fmt.Println(lexmodelbuildingservice.ErrCodeBadRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetIntentsPages

func (c *LexModelBuildingService) GetIntentsPages(input *GetIntentsInput, fn func(*GetIntentsOutput, bool) bool) error

GetIntentsPages iterates over the pages of a GetIntents operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetIntents method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetIntents operation. pageNum := 0 err := client.GetIntentsPages(params, func(page *GetIntentsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetIntentsPagesWithContext

func (c *LexModelBuildingService) GetIntentsPagesWithContext(ctx aws.Context, input *GetIntentsInput, fn func(*GetIntentsOutput, bool) bool, opts ...request.Option) error

GetIntentsPagesWithContext same as GetIntentsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetIntentsRequest

func (c *LexModelBuildingService) GetIntentsRequest(input *GetIntentsInput) (req *request.Request, output *GetIntentsOutput)

GetIntentsRequest generates a "aws/request.Request" representing the client's request for the GetIntents operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetIntents for more information on using the GetIntents API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetIntentsRequest method. req, resp := client.GetIntentsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntents

GetIntentsWithContext

func (c *LexModelBuildingService) GetIntentsWithContext(ctx aws.Context, input *GetIntentsInput, opts ...request.Option) (*GetIntentsOutput, error)

GetIntentsWithContext is the same as GetIntents with the addition of the ability to pass a context and additional request options.

See GetIntents for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetSlotType

func (c *LexModelBuildingService) GetSlotType(input *GetSlotTypeInput) (*GetSlotTypeOutput, error)

GetSlotType API operation for Amazon Lex Model Building Service.

Returns information about a specific version of a slot type. In addition to specifying the slot type name, you must specify the slot type version.

This operation requires permissions for the lex:GetSlotType action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetSlotType for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotType

Example

LexModelBuildingService GetSlotType shared00

To get information about a slot type

This example shows how to get information about a slot type.

{ svc := lexmodelbuildingservice.New(session.New()) input := &lexmodelbuildingservice.GetSlotTypeInput{ Name: aws.String("DocPizzaCrustType"), Version: aws.String("$LATEST"), } result, err := svc.GetSlotType(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lexmodelbuildingservice.ErrCodeNotFoundException: fmt.Println(lexmodelbuildingservice.ErrCodeNotFoundException, aerr.Error()) case lexmodelbuildingservice.ErrCodeLimitExceededException: fmt.Println(lexmodelbuildingservice.ErrCodeLimitExceededException, aerr.Error()) case lexmodelbuildingservice.ErrCodeInternalFailureException: fmt.Println(lexmodelbuildingservice.ErrCodeInternalFailureException, aerr.Error()) case lexmodelbuildingservice.ErrCodeBadRequestException: fmt.Println(lexmodelbuildingservice.ErrCodeBadRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetSlotTypeRequest

func (c *LexModelBuildingService) GetSlotTypeRequest(input *GetSlotTypeInput) (req *request.Request, output *GetSlotTypeOutput)

GetSlotTypeRequest generates a "aws/request.Request" representing the client's request for the GetSlotType operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetSlotType for more information on using the GetSlotType API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetSlotTypeRequest method. req, resp := client.GetSlotTypeRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotType

GetSlotTypeVersions

func (c *LexModelBuildingService) GetSlotTypeVersions(input *GetSlotTypeVersionsInput) (*GetSlotTypeVersionsOutput, error)

GetSlotTypeVersions API operation for Amazon Lex Model Building Service.

Gets information about all versions of a slot type.

The GetSlotTypeVersions operation returns a SlotTypeMetadata object for each version of a slot type. For example, if a slot type has three numbered versions, the GetSlotTypeVersions operation returns four SlotTypeMetadata objects in the response, one for each numbered version and one for the $LATEST version.

The GetSlotTypeVersions operation always returns at least one version, the $LATEST version.

This operation requires permissions for the lex:GetSlotTypeVersions action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetSlotTypeVersions for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeVersions

GetSlotTypeVersionsPages

func (c *LexModelBuildingService) GetSlotTypeVersionsPages(input *GetSlotTypeVersionsInput, fn func(*GetSlotTypeVersionsOutput, bool) bool) error

GetSlotTypeVersionsPages iterates over the pages of a GetSlotTypeVersions operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetSlotTypeVersions method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetSlotTypeVersions operation. pageNum := 0 err := client.GetSlotTypeVersionsPages(params, func(page *GetSlotTypeVersionsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetSlotTypeVersionsPagesWithContext

func (c *LexModelBuildingService) GetSlotTypeVersionsPagesWithContext(ctx aws.Context, input *GetSlotTypeVersionsInput, fn func(*GetSlotTypeVersionsOutput, bool) bool, opts ...request.Option) error

GetSlotTypeVersionsPagesWithContext same as GetSlotTypeVersionsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetSlotTypeVersionsRequest

func (c *LexModelBuildingService) GetSlotTypeVersionsRequest(input *GetSlotTypeVersionsInput) (req *request.Request, output *GetSlotTypeVersionsOutput)

GetSlotTypeVersionsRequest generates a "aws/request.Request" representing the client's request for the GetSlotTypeVersions operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetSlotTypeVersions for more information on using the GetSlotTypeVersions API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetSlotTypeVersionsRequest method. req, resp := client.GetSlotTypeVersionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeVersions

GetSlotTypeVersionsWithContext

func (c *LexModelBuildingService) GetSlotTypeVersionsWithContext(ctx aws.Context, input *GetSlotTypeVersionsInput, opts ...request.Option) (*GetSlotTypeVersionsOutput, error)

GetSlotTypeVersionsWithContext is the same as GetSlotTypeVersions with the addition of the ability to pass a context and additional request options.

See GetSlotTypeVersions for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetSlotTypeWithContext

func (c *LexModelBuildingService) GetSlotTypeWithContext(ctx aws.Context, input *GetSlotTypeInput, opts ...request.Option) (*GetSlotTypeOutput, error)

GetSlotTypeWithContext is the same as GetSlotType with the addition of the ability to pass a context and additional request options.

See GetSlotType for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetSlotTypes

func (c *LexModelBuildingService) GetSlotTypes(input *GetSlotTypesInput) (*GetSlotTypesOutput, error)

GetSlotTypes API operation for Amazon Lex Model Building Service.

Returns slot type information as follows:

  • If you specify the nameContains field, returns the $LATEST version of all slot types that contain the specified string.

  • If you don't specify the nameContains field, returns information about the $LATEST version of all slot types.

The operation requires permission for the lex:GetSlotTypes action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetSlotTypes for usage and error information.

Returned Error Codes:

  • ErrCodeNotFoundException "NotFoundException" The resource specified in the request was not found. Check the resource and try again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypes

Example

LexModelBuildingService GetSlotTypes shared00

To get a list of slot types

This example shows how to get a list of all of the slot types in your account.

{ svc := lexmodelbuildingservice.New(session.New()) input := &lexmodelbuildingservice.GetSlotTypesInput{ MaxResults: aws.Int64(10), NextToken: aws.String(""), } result, err := svc.GetSlotTypes(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lexmodelbuildingservice.ErrCodeNotFoundException: fmt.Println(lexmodelbuildingservice.ErrCodeNotFoundException, aerr.Error()) case lexmodelbuildingservice.ErrCodeLimitExceededException: fmt.Println(lexmodelbuildingservice.ErrCodeLimitExceededException, aerr.Error()) case lexmodelbuildingservice.ErrCodeInternalFailureException: fmt.Println(lexmodelbuildingservice.ErrCodeInternalFailureException, aerr.Error()) case lexmodelbuildingservice.ErrCodeBadRequestException: fmt.Println(lexmodelbuildingservice.ErrCodeBadRequestException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetSlotTypesPages

func (c *LexModelBuildingService) GetSlotTypesPages(input *GetSlotTypesInput, fn func(*GetSlotTypesOutput, bool) bool) error

GetSlotTypesPages iterates over the pages of a GetSlotTypes operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetSlotTypes method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetSlotTypes operation. pageNum := 0 err := client.GetSlotTypesPages(params, func(page *GetSlotTypesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetSlotTypesPagesWithContext

func (c *LexModelBuildingService) GetSlotTypesPagesWithContext(ctx aws.Context, input *GetSlotTypesInput, fn func(*GetSlotTypesOutput, bool) bool, opts ...request.Option) error

GetSlotTypesPagesWithContext same as GetSlotTypesPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetSlotTypesRequest

func (c *LexModelBuildingService) GetSlotTypesRequest(input *GetSlotTypesInput) (req *request.Request, output *GetSlotTypesOutput)

GetSlotTypesRequest generates a "aws/request.Request" representing the client's request for the GetSlotTypes operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetSlotTypes for more information on using the GetSlotTypes API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetSlotTypesRequest method. req, resp := client.GetSlotTypesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypes

GetSlotTypesWithContext

func (c *LexModelBuildingService) GetSlotTypesWithContext(ctx aws.Context, input *GetSlotTypesInput, opts ...request.Option) (*GetSlotTypesOutput, error)

GetSlotTypesWithContext is the same as GetSlotTypes with the addition of the ability to pass a context and additional request options.

See GetSlotTypes for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetUtterancesView

func (c *LexModelBuildingService) GetUtterancesView(input *GetUtterancesViewInput) (*GetUtterancesViewOutput, error)

GetUtterancesView API operation for Amazon Lex Model Building Service.

Use the GetUtterancesView operation to get information about the utterances that your users have made to your bot. You can use this list to tune the utterances that your bot responds to.

For example, say that you have created a bot to order flowers. After your users have used your bot for a while, use the GetUtterancesView operation to see the requests that they have made and whether they have been successful. You might find that the utterance "I want flowers" is not being recognized. You could add this utterance to the OrderFlowers intent so that your bot recognizes that utterance.

After you publish a new version of a bot, you can get information about the old version and the new so that you can compare the performance across the two versions.

Utterance statistics are generated once a day. Data is available for the last 15 days. You can request information for up to 5 versions in each request. The response contains information about a maximum of 100 utterances for each version.

This operation requires permissions for the lex:GetUtterancesView action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation GetUtterancesView for usage and error information.

Returned Error Codes:

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetUtterancesView

GetUtterancesViewRequest

func (c *LexModelBuildingService) GetUtterancesViewRequest(input *GetUtterancesViewInput) (req *request.Request, output *GetUtterancesViewOutput)

GetUtterancesViewRequest generates a "aws/request.Request" representing the client's request for the GetUtterancesView operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetUtterancesView for more information on using the GetUtterancesView API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetUtterancesViewRequest method. req, resp := client.GetUtterancesViewRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetUtterancesView

GetUtterancesViewWithContext

func (c *LexModelBuildingService) GetUtterancesViewWithContext(ctx aws.Context, input *GetUtterancesViewInput, opts ...request.Option) (*GetUtterancesViewOutput, error)

GetUtterancesViewWithContext is the same as GetUtterancesView with the addition of the ability to pass a context and additional request options.

See GetUtterancesView for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

PutBot

func (c *LexModelBuildingService) PutBot(input *PutBotInput) (*PutBotOutput, error)

PutBot API operation for Amazon Lex Model Building Service.

Creates an Amazon Lex conversational bot or replaces an existing bot. When you create or update a bot you are only required to specify a name, a locale, and whether the bot is directed toward children under age 13. You can use this to add intents later, or to remove intents from an existing bot. When you create a bot with the minimum information, the bot is created or updated but Amazon Lex returns the response FAILED. You can build the bot after you add one or more intents. For more information about Amazon Lex bots, see how-it-works.

If you specify the name of an existing bot, the fields in the request replace the existing values in the $LATESTversion of the bot. Amazon Lex removes any fields that you don't provide values for in the request, except for the idleTTLInSecondsand privacySettingsfields, which are set to their default values. If you don't specify values for required fields, Amazon Lex throws an exception.

This operation requires permissions for the lex:PutBotaction. For more information, see auth-and-access-control

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation PutBot for usage and error information.

Returned Error Codes:

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodePreconditionFailedException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBot

Example

LexModelBuildingService PutBot shared00

To create a bot

This example shows how to create a bot for ordering pizzas.

{ svc := lexmodelbuildingservice.New(session.New()) input := &lexmodelbuildingservice.PutBotInput{ AbortStatement: &lexmodelbuildingservice.Statement{ Messages: []*lexmodelbuildingservice.Message{ { Content: aws.String("I don't understand. Can you try again?"), ContentType: aws.String("PlainText"), }, { Content: aws.String("I'm sorry, I don't understand."), ContentType: aws.String("PlainText"), }, }, }, ChildDirected: aws.Bool(true), ClarificationPrompt: &lexmodelbuildingservice.Prompt{ MaxAttempts: aws.Int64(1), Messages: []*lexmodelbuildingservice.Message{ { Content: aws.String("I'm sorry, I didn't hear that. Can you repeate what you just said?"), ContentType: aws.String("PlainText"), }, { Content: aws.String("Can you say that again?"), ContentType: aws.String("PlainText"), }, }, }, Description: aws.String("Orders a pizza from a local pizzeria."), IdleSessionTTLInSeconds: aws.Int64(300), Intents: []*lexmodelbuildingservice.Intent{ { IntentName: aws.String("DocOrderPizza"), IntentVersion: aws.String("$LATEST"), }, }, Locale: aws.String("en-US"), Name: aws.String("DocOrderPizzaBot"), ProcessBehavior: aws.String("SAVE"), } result, err := svc.PutBot(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lexmodelbuildingservice.ErrCodeConflictException: fmt.Println(lexmodelbuildingservice.ErrCodeConflictException, aerr.Error()) case lexmodelbuildingservice.ErrCodeLimitExceededException: fmt.Println(lexmodelbuildingservice.ErrCodeLimitExceededException, aerr.Error()) case lexmodelbuildingservice.ErrCodeInternalFailureException: fmt.Println(lexmodelbuildingservice.ErrCodeInternalFailureException, aerr.Error()) case lexmodelbuildingservice.ErrCodeBadRequestException: fmt.Println(lexmodelbuildingservice.ErrCodeBadRequestException, aerr.Error()) case lexmodelbuildingservice.ErrCodePreconditionFailedException: fmt.Println(lexmodelbuildingservice.ErrCodePreconditionFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

PutBotAlias

func (c *LexModelBuildingService) PutBotAlias(input *PutBotAliasInput) (*PutBotAliasOutput, error)

PutBotAlias API operation for Amazon Lex Model Building Service.

Creates an alias for the specified version of the bot or replaces an alias for the specified bot. To change the version of the bot that the alias points to, replace the alias. For more information about aliases, see versioning-aliases.

This operation requires permissions for the lex:PutBotAlias action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation PutBotAlias for usage and error information.

Returned Error Codes:

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodePreconditionFailedException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotAlias

PutBotAliasRequest

func (c *LexModelBuildingService) PutBotAliasRequest(input *PutBotAliasInput) (req *request.Request, output *PutBotAliasOutput)

PutBotAliasRequest generates a "aws/request.Request" representing the client's request for the PutBotAlias operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutBotAlias for more information on using the PutBotAlias API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutBotAliasRequest method. req, resp := client.PutBotAliasRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotAlias

PutBotAliasWithContext

func (c *LexModelBuildingService) PutBotAliasWithContext(ctx aws.Context, input *PutBotAliasInput, opts ...request.Option) (*PutBotAliasOutput, error)

PutBotAliasWithContext is the same as PutBotAlias with the addition of the ability to pass a context and additional request options.

See PutBotAlias for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

PutBotRequest

func (c *LexModelBuildingService) PutBotRequest(input *PutBotInput) (req *request.Request, output *PutBotOutput)

PutBotRequest generates a "aws/request.Request" representing the client's request for the PutBot operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutBot for more information on using the PutBot API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutBotRequest method. req, resp := client.PutBotRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBot

PutBotWithContext

func (c *LexModelBuildingService) PutBotWithContext(ctx aws.Context, input *PutBotInput, opts ...request.Option) (*PutBotOutput, error)

PutBotWithContext is the same as PutBot with the addition of the ability to pass a context and additional request options.

See PutBot for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

PutIntent

func (c *LexModelBuildingService) PutIntent(input *PutIntentInput) (*PutIntentOutput, error)

PutIntent API operation for Amazon Lex Model Building Service.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation PutIntent for usage and error information.

Returned Error Codes:

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodePreconditionFailedException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutIntent

Example

LexModelBuildingService PutIntent shared00

To create an intent

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

{ svc := lexmodelbuildingservice.New(session.New()) input := &lexmodelbuildingservice.PutIntentInput{ ConclusionStatement: &lexmodelbuildingservice.Statement{ Messages: []*lexmodelbuildingservice.Message{ { Content: aws.String("All right, I ordered you a {Crust} crust {Type} pizza with {Sauce} sauce."), ContentType: aws.String("PlainText"), }, { Content: aws.String("OK, your {Crust} crust {Type} pizza with {Sauce} sauce is on the way."), ContentType: aws.String("PlainText"), }, }, ResponseCard: aws.String("foo"), }, ConfirmationPrompt: &lexmodelbuildingservice.Prompt{ MaxAttempts: aws.Int64(1), Messages: []*lexmodelbuildingservice.Message{ { Content: aws.String("Should I order your {Crust} crust {Type} pizza with {Sauce} sauce?"), ContentType: aws.String("PlainText"), }, }, }, Description: aws.String("Order a pizza from a local pizzeria."), FulfillmentActivity: &lexmodelbuildingservice.FulfillmentActivity{ Type: aws.String("ReturnIntent"), }, Name: aws.String("DocOrderPizza"), RejectionStatement: &lexmodelbuildingservice.Statement{ Messages: []*lexmodelbuildingservice.Message{ { Content: aws.String("Ok, I'll cancel your order."), ContentType: aws.String("PlainText"), }, { Content: aws.String("I cancelled your order."), ContentType: aws.String("PlainText"), }, }, }, SampleUtterances: []*string{ aws.String("Order me a pizza."), aws.String("Order me a {Type} pizza."), aws.String("I want a {Crust} crust {Type} pizza"), aws.String("I want a {Crust} crust {Type} pizza with {Sauce} sauce."), }, Slots: []*lexmodelbuildingservice.Slot{ { Description: aws.String("The type of pizza to order."), Name: aws.String("Type"), Priority: aws.Int64(1), SampleUtterances: []*string{ aws.String("Get me a {Type} pizza."), aws.String("A {Type} pizza please."), aws.String("I'd like a {Type} pizza."), }, SlotConstraint: aws.String("Required"), SlotType: aws.String("DocPizzaType"), SlotTypeVersion: aws.String("$LATEST"), ValueElicitationPrompt: &lexmodelbuildingservice.Prompt{ MaxAttempts: aws.Int64(1), Messages: []*lexmodelbuildingservice.Message{ { Content: aws.String("What type of pizza would you like?"), ContentType: aws.String("PlainText"), }, { Content: aws.String("Vegie or cheese pizza?"), ContentType: aws.String("PlainText"), }, { Content: aws.String("I can get you a vegie or a cheese pizza."), ContentType: aws.String("PlainText"), }, }, }, }, { Description: aws.String("The type of pizza crust to order."), Name: aws.String("Crust"), Priority: aws.Int64(2), SampleUtterances: []*string{ aws.String("Make it a {Crust} crust."), aws.String("I'd like a {Crust} crust."), }, SlotConstraint: aws.String("Required"), SlotType: aws.String("DocPizzaCrustType"), SlotTypeVersion: aws.String("$LATEST"), ValueElicitationPrompt: &lexmodelbuildingservice.Prompt{ MaxAttempts: aws.Int64(1), Messages: []*lexmodelbuildingservice.Message{ { Content: aws.String("What type of crust would you like?"), ContentType: aws.String("PlainText"), }, { Content: aws.String("Thick or thin crust?"), ContentType: aws.String("PlainText"), }, }, }, }, { Description: aws.String("The type of sauce to use on the pizza."), Name: aws.String("Sauce"), Priority: aws.Int64(3), SampleUtterances: []*string{ aws.String("Make it {Sauce} sauce."), aws.String("I'd like {Sauce} sauce."), }, SlotConstraint: aws.String("Required"), SlotType: aws.String("DocPizzaSauceType"), SlotTypeVersion: aws.String("$LATEST"), ValueElicitationPrompt: &lexmodelbuildingservice.Prompt{ MaxAttempts: aws.Int64(1), Messages: []*lexmodelbuildingservice.Message{ { Content: aws.String("White or red sauce?"), ContentType: aws.String("PlainText"), }, { Content: aws.String("Garlic or tomato sauce?"), ContentType: aws.String("PlainText"), }, }, }, }, }, } result, err := svc.PutIntent(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lexmodelbuildingservice.ErrCodeConflictException: fmt.Println(lexmodelbuildingservice.ErrCodeConflictException, aerr.Error()) case lexmodelbuildingservice.ErrCodeLimitExceededException: fmt.Println(lexmodelbuildingservice.ErrCodeLimitExceededException, aerr.Error()) case lexmodelbuildingservice.ErrCodeInternalFailureException: fmt.Println(lexmodelbuildingservice.ErrCodeInternalFailureException, aerr.Error()) case lexmodelbuildingservice.ErrCodeBadRequestException: fmt.Println(lexmodelbuildingservice.ErrCodeBadRequestException, aerr.Error()) case lexmodelbuildingservice.ErrCodePreconditionFailedException: fmt.Println(lexmodelbuildingservice.ErrCodePreconditionFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

PutIntentRequest

func (c *LexModelBuildingService) PutIntentRequest(input *PutIntentInput) (req *request.Request, output *PutIntentOutput)

PutIntentRequest generates a "aws/request.Request" representing the client's request for the PutIntent operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutIntent for more information on using the PutIntent API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutIntentRequest method. req, resp := client.PutIntentRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutIntent

PutIntentWithContext

func (c *LexModelBuildingService) PutIntentWithContext(ctx aws.Context, input *PutIntentInput, opts ...request.Option) (*PutIntentOutput, error)

PutIntentWithContext is the same as PutIntent with the addition of the ability to pass a context and additional request options.

See PutIntent for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

PutSlotType

func (c *LexModelBuildingService) PutSlotType(input *PutSlotTypeInput) (*PutSlotTypeOutput, error)

PutSlotType API operation for Amazon Lex Model Building Service.

Creates a custom slot type or replaces an existing custom slot type.

To create a custom slot type, specify a name for the slot type and a set of enumeration values, which are the values that a slot of this type can assume. For more information, see how-it-works.

If you specify the name of an existing slot type, the fields in the request replace the existing values in the $LATEST version of the slot type. Amazon Lex removes the fields that you don't provide in the request. If you don't specify required fields, Amazon Lex throws an exception. When you update the $LATEST version of a slot type, if a bot uses the $LATEST version of an intent that contains the slot type, the bot's status field is set to NOT_BUILT.

This operation requires permissions for the lex:PutSlotType action.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation PutSlotType for usage and error information.

Returned Error Codes:

  • ErrCodeConflictException "ConflictException" There was a conflict processing the request. Try your request again.

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

  • ErrCodePreconditionFailedException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutSlotType

Example

LexModelBuildingService PutSlotType shared00

To Create a Slot Type

This example shows how to create a slot type that describes pizza sauces.

{ svc := lexmodelbuildingservice.New(session.New()) input := &lexmodelbuildingservice.PutSlotTypeInput{ Description: aws.String("Available pizza sauces"), EnumerationValues: []*lexmodelbuildingservice.EnumerationValue{ { Value: aws.String("red"), }, { Value: aws.String("white"), }, }, Name: aws.String("PizzaSauceType"), } result, err := svc.PutSlotType(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case lexmodelbuildingservice.ErrCodeConflictException: fmt.Println(lexmodelbuildingservice.ErrCodeConflictException, aerr.Error()) case lexmodelbuildingservice.ErrCodeLimitExceededException: fmt.Println(lexmodelbuildingservice.ErrCodeLimitExceededException, aerr.Error()) case lexmodelbuildingservice.ErrCodeInternalFailureException: fmt.Println(lexmodelbuildingservice.ErrCodeInternalFailureException, aerr.Error()) case lexmodelbuildingservice.ErrCodeBadRequestException: fmt.Println(lexmodelbuildingservice.ErrCodeBadRequestException, aerr.Error()) case lexmodelbuildingservice.ErrCodePreconditionFailedException: fmt.Println(lexmodelbuildingservice.ErrCodePreconditionFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

PutSlotTypeRequest

func (c *LexModelBuildingService) PutSlotTypeRequest(input *PutSlotTypeInput) (req *request.Request, output *PutSlotTypeOutput)

PutSlotTypeRequest generates a "aws/request.Request" representing the client's request for the PutSlotType operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutSlotType for more information on using the PutSlotType API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutSlotTypeRequest method. req, resp := client.PutSlotTypeRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutSlotType

PutSlotTypeWithContext

func (c *LexModelBuildingService) PutSlotTypeWithContext(ctx aws.Context, input *PutSlotTypeInput, opts ...request.Option) (*PutSlotTypeOutput, error)

PutSlotTypeWithContext is the same as PutSlotType with the addition of the ability to pass a context and additional request options.

See PutSlotType for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

StartImport

func (c *LexModelBuildingService) StartImport(input *StartImportInput) (*StartImportOutput, error)

StartImport API operation for Amazon Lex Model Building Service.

Starts a job to import a resource to Amazon Lex.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon Lex Model Building Service's API operation StartImport for usage and error information.

Returned Error Codes:

  • ErrCodeLimitExceededException "LimitExceededException" The request exceeded a limit. Try your request again.

  • ErrCodeInternalFailureException "InternalFailureException" An internal Amazon Lex error occurred. Try your request again.

  • ErrCodeBadRequestException "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.

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/StartImport

StartImportRequest

func (c *LexModelBuildingService) StartImportRequest(input *StartImportInput) (req *request.Request, output *StartImportOutput)

StartImportRequest generates a "aws/request.Request" representing the client's request for the StartImport operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See StartImport for more information on using the StartImport API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the StartImportRequest method. req, resp := client.StartImportRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/StartImport

StartImportWithContext

func (c *LexModelBuildingService) StartImportWithContext(ctx aws.Context, input *StartImportInput, opts ...request.Option) (*StartImportOutput, error)

StartImportWithContext is the same as StartImport with the addition of the ability to pass a context and additional request options.

See StartImport for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

On this page: