Class CfnBotAlias

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:59.429Z") @Stability(Stable) public class CfnBotAlias extends CfnResource implements IInspectable
A CloudFormation AWS::Lex::BotAlias.

Amazon Lex V2 is the only supported version in AWS CloudFormation .

Specifies an alias for the specified version of a bot. Use an alias to enable you to change the version of a bot without updating applications that use the bot.

For example, you can specify an alias called "PROD" that your applications use to call the Amazon Lex bot.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.lex.*;
 Object sentimentAnalysisSettings;
 CfnBotAlias cfnBotAlias = CfnBotAlias.Builder.create(this, "MyCfnBotAlias")
         .botAliasName("botAliasName")
         .botId("botId")
         // the properties below are optional
         .botAliasLocaleSettings(List.of(BotAliasLocaleSettingsItemProperty.builder()
                 .botAliasLocaleSetting(BotAliasLocaleSettingsProperty.builder()
                         .enabled(false)
                         // the properties below are optional
                         .codeHookSpecification(CodeHookSpecificationProperty.builder()
                                 .lambdaCodeHook(LambdaCodeHookProperty.builder()
                                         .codeHookInterfaceVersion("codeHookInterfaceVersion")
                                         .lambdaArn("lambdaArn")
                                         .build())
                                 .build())
                         .build())
                 .localeId("localeId")
                 .build()))
         .botAliasTags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .botVersion("botVersion")
         .conversationLogSettings(ConversationLogSettingsProperty.builder()
                 .audioLogSettings(List.of(AudioLogSettingProperty.builder()
                         .destination(AudioLogDestinationProperty.builder()
                                 .s3Bucket(S3BucketLogDestinationProperty.builder()
                                         .logPrefix("logPrefix")
                                         .s3BucketArn("s3BucketArn")
                                         // the properties below are optional
                                         .kmsKeyArn("kmsKeyArn")
                                         .build())
                                 .build())
                         .enabled(false)
                         .build()))
                 .textLogSettings(List.of(TextLogSettingProperty.builder()
                         .destination(TextLogDestinationProperty.builder()
                                 .cloudWatch(CloudWatchLogGroupLogDestinationProperty.builder()
                                         .cloudWatchLogGroupArn("cloudWatchLogGroupArn")
                                         .logPrefix("logPrefix")
                                         .build())
                                 .build())
                         .enabled(false)
                         .build()))
                 .build())
         .description("description")
         .sentimentAnalysisSettings(sentimentAnalysisSettings)
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnBotAlias

      protected CfnBotAlias(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnBotAlias

      protected CfnBotAlias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnBotAlias

      @Stability(Stable) public CfnBotAlias(@NotNull Construct scope, @NotNull String id, @NotNull CfnBotAliasProps props)
      Create a new AWS::Lex::BotAlias.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the bot alias.
    • getAttrBotAliasId

      @Stability(Stable) @NotNull public String getAttrBotAliasId()
      The unique identifier of the bot alias.
    • getAttrBotAliasStatus

      @Stability(Stable) @NotNull public String getAttrBotAliasStatus()
      The current status of the bot alias.

      When the status is Available the alias is ready for use with your bot.

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getBotAliasName

      @Stability(Stable) @NotNull public String getBotAliasName()
      The name of the bot alias.
    • setBotAliasName

      @Stability(Stable) public void setBotAliasName(@NotNull String value)
      The name of the bot alias.
    • getBotId

      @Stability(Stable) @NotNull public String getBotId()
      The unique identifier of the bot.
    • setBotId

      @Stability(Stable) public void setBotId(@NotNull String value)
      The unique identifier of the bot.
    • getSentimentAnalysisSettings

      @Stability(Stable) @NotNull public Object getSentimentAnalysisSettings()
      Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
    • setSentimentAnalysisSettings

      @Stability(Stable) public void setSentimentAnalysisSettings(@NotNull Object value)
      Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
    • getBotAliasLocaleSettings

      @Stability(Stable) @Nullable public Object getBotAliasLocaleSettings()
      Specifies settings that are unique to a locale.

      For example, you can use different Lambda function depending on the bot's locale.

    • setBotAliasLocaleSettings

      @Stability(Stable) public void setBotAliasLocaleSettings(@Nullable IResolvable value)
      Specifies settings that are unique to a locale.

      For example, you can use different Lambda function depending on the bot's locale.

    • setBotAliasLocaleSettings

      @Stability(Stable) public void setBotAliasLocaleSettings(@Nullable List<Object> value)
      Specifies settings that are unique to a locale.

      For example, you can use different Lambda function depending on the bot's locale.

    • getBotAliasTags

      @Stability(Stable) @Nullable public Object getBotAliasTags()
      An array of key-value pairs to apply to this resource.

      You can only add tags when you specify an alias.

      For more information, see Tag .

    • setBotAliasTags

      @Stability(Stable) public void setBotAliasTags(@Nullable IResolvable value)
      An array of key-value pairs to apply to this resource.

      You can only add tags when you specify an alias.

      For more information, see Tag .

    • setBotAliasTags

      @Stability(Stable) public void setBotAliasTags(@Nullable List<Object> value)
      An array of key-value pairs to apply to this resource.

      You can only add tags when you specify an alias.

      For more information, see Tag .

    • getBotVersion

      @Stability(Stable) @Nullable public String getBotVersion()
      The version of the bot that the bot alias references.
    • setBotVersion

      @Stability(Stable) public void setBotVersion(@Nullable String value)
      The version of the bot that the bot alias references.
    • getConversationLogSettings

      @Stability(Stable) @Nullable public Object getConversationLogSettings()
      Specifies whether Amazon Lex logs text and audio for conversations with the bot.

      When you enable conversation logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch logs. Audio logs store input in Amazon S3 .

    • setConversationLogSettings

      @Stability(Stable) public void setConversationLogSettings(@Nullable IResolvable value)
      Specifies whether Amazon Lex logs text and audio for conversations with the bot.

      When you enable conversation logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch logs. Audio logs store input in Amazon S3 .

    • setConversationLogSettings

      @Stability(Stable) public void setConversationLogSettings(@Nullable CfnBotAlias.ConversationLogSettingsProperty value)
      Specifies whether Amazon Lex logs text and audio for conversations with the bot.

      When you enable conversation logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch logs. Audio logs store input in Amazon S3 .

    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the bot alias.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the bot alias.