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

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-08-10T14:51:08.174Z") @Stability(Stable) public class CfnAgent extends CfnResource implements IInspectable, IAgentRef, ITaggableV2
Resource Type definition for AWS::QuickSight::Agent.

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.quicksight.*;
 CfnAgent cfnAgent = CfnAgent.Builder.create(this, "MyCfnAgent")
         .agentId("agentId")
         .awsAccountId("awsAccountId")
         .name("name")
         // the properties below are optional
         .actionConnectors(List.of("actionConnectors"))
         .agentLifecycle("agentLifecycle")
         .customPromptInput(CustomPromptInputProperty.builder()
                 .existingPrompt(CustomPromptProfileProperty.builder()
                         .modelProfileId("modelProfileId")
                         .qbsAwsAccountId("qbsAwsAccountId")
                         .subscriptionId("subscriptionId")
                         .build())
                 .newPrompt(CustomPromptInputParametersProperty.builder()
                         .customInstructions("customInstructions")
                         .identity("identity")
                         .outputStyle("outputStyle")
                         .responseLength("responseLength")
                         .tone("tone")
                         .build())
                 .build())
         .description("description")
         .iconId("iconId")
         .spaces(List.of("spaces"))
         .starterPrompts(List.of("starterPrompts"))
         .tags(List.of(AgentTagProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .welcomeMessage("welcomeMessage")
         .build();
 

See Also:
  • 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

    • CfnAgent

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

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

      @Stability(Stable) public CfnAgent(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAgentProps props)
      Create a new AWS::QuickSight::Agent.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForAgent

      @Stability(Stable) @NotNull public static String arnForAgent(@NotNull IAgentRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnAgent

      @Stability(Stable) @NotNull public static Boolean isCfnAgent(@NotNull Object x)
      Checks whether the given object is a CfnAgent.

      Parameters:
      x - This parameter is required.
    • 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.
    • getAgentRef

      @Stability(Stable) @NotNull public AgentReference getAgentRef()
      A reference to a Agent resource.
      Specified by:
      getAgentRef in interface IAgentRef
    • getAttrAgentStatus

      @Stability(Stable) @NotNull public String getAttrAgentStatus()
      The current status of the agent.

      One of ACTIVE, CREATING, UPDATING, or FAILED.

    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the agent.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The date and time the agent was created.
    • getAttrCreator

      @Stability(Stable) @NotNull public String getAttrCreator()
      The ARN of the user who created the agent.
    • getAttrCustomPromptInterface

      @Stability(Stable) @NotNull public IResolvable getAttrCustomPromptInterface()
      Read-only view of the resolved custom prompt interface for the agent.
    • getAttrErrorMessage

      @Stability(Stable) @NotNull public String getAttrErrorMessage()
      The error message if the agent is in FAILED status.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The date and time the agent was last updated.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

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

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getAgentId

      @Stability(Stable) @NotNull public String getAgentId()
      The unique identifier for the agent.
    • setAgentId

      @Stability(Stable) public void setAgentId(@NotNull String value)
      The unique identifier for the agent.
    • getAwsAccountId

      @Stability(Stable) @NotNull public String getAwsAccountId()
      The ID of the Amazon Web Services account where the agent is being created.
    • setAwsAccountId

      @Stability(Stable) public void setAwsAccountId(@NotNull String value)
      The ID of the Amazon Web Services account where the agent is being created.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The display name of the agent.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The display name of the agent.
    • getActionConnectors

      @Stability(Stable) @Nullable public List<String> getActionConnectors()
      A list of ActionConnector ARNs (max 10) attached to the agent.
    • setActionConnectors

      @Stability(Stable) public void setActionConnectors(@Nullable List<String> value)
      A list of ActionConnector ARNs (max 10) attached to the agent.
    • getAgentLifecycle

      @Stability(Stable) @Nullable public String getAgentLifecycle()
      The lifecycle stage of the agent.
    • setAgentLifecycle

      @Stability(Stable) public void setAgentLifecycle(@Nullable String value)
      The lifecycle stage of the agent.
    • getCustomPromptInput

      @Stability(Stable) @Nullable public Object getCustomPromptInput()
      Custom prompt configuration.

      Returns union: either IResolvable or CfnAgent.CustomPromptInputProperty

    • setCustomPromptInput

      @Stability(Stable) public void setCustomPromptInput(@Nullable IResolvable value)
      Custom prompt configuration.
    • setCustomPromptInput

      @Stability(Stable) public void setCustomPromptInput(@Nullable CfnAgent.CustomPromptInputProperty value)
      Custom prompt configuration.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description of the agent.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the agent.
    • getIconId

      @Stability(Stable) @Nullable public String getIconId()
      The icon identifier for the agent.
    • setIconId

      @Stability(Stable) public void setIconId(@Nullable String value)
      The icon identifier for the agent.
    • getSpaces

      @Stability(Stable) @Nullable public List<String> getSpaces()
      A list of Space ARNs (max 10) attached to the agent.
    • setSpaces

      @Stability(Stable) public void setSpaces(@Nullable List<String> value)
      A list of Space ARNs (max 10) attached to the agent.
    • getStarterPrompts

      @Stability(Stable) @Nullable public List<String> getStarterPrompts()
      A list of up to 3 starter prompts displayed to users.
    • setStarterPrompts

      @Stability(Stable) public void setStarterPrompts(@Nullable List<String> value)
      A list of up to 3 starter prompts displayed to users.
    • getTags

      @Stability(Stable) @Nullable public List<CfnAgent.AgentTagProperty> getTags()
      A list of key-value pairs to associate with the agent resource.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnAgent.AgentTagProperty> value)
      A list of key-value pairs to associate with the agent resource.
    • getWelcomeMessage

      @Stability(Stable) @Nullable public String getWelcomeMessage()
      The welcome message displayed when a user opens the agent.
    • setWelcomeMessage

      @Stability(Stable) public void setWelcomeMessage(@Nullable String value)
      The welcome message displayed when a user opens the agent.