Skip to content
v2.278.0

CfnAgent L1 construct ​

Specifies an agent as a resource in a top-level template. Minimally, you must specify the following properties:.

For more information about using agents in Amazon Bedrock , see Agents for Amazon Bedrock .

See the Properties section below for descriptions of both the required and optional properties.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';

declare const additionalModelRequestFields: any;
const cfnAgent = new bedrock.CfnAgent(this, 'MyCfnAgent', {
  agentName: 'agentName',

  // the properties below are optional
  actionGroups: [{
    actionGroupName: 'actionGroupName',

    // the properties below are optional
    actionGroupExecutor: {
      customControl: 'customControl',
      lambda: 'lambda',
    },
    actionGroupState: 'actionGroupState',
    apiSchema: {
      payload: 'payload',
      s3: {
        s3BucketName: 's3BucketName',
        s3ObjectKey: 's3ObjectKey',
      },
    },
    description: 'description',
    functionSchema: {
      functions: [{
        name: 'name',

        // the properties below are optional
        description: 'description',
        parameters: {
          parametersKey: {
            type: 'type',

            // the properties below are optional
            description: 'description',
            required: false,
          },
        },
        requireConfirmation: 'requireConfirmation',
      }],
    },
    parentActionGroupSignature: 'parentActionGroupSignature',
    skipResourceInUseCheckOnDelete: false,
  }],
  agentCollaboration: 'agentCollaboration',
  agentCollaborators: [{
    agentDescriptor: {
      aliasArn: 'aliasArn',
    },
    collaborationInstruction: 'collaborationInstruction',
    collaboratorName: 'collaboratorName',

    // the properties below are optional
    relayConversationHistory: 'relayConversationHistory',
  }],
  agentResourceRoleArn: 'agentResourceRoleArn',
  autoPrepare: false,
  customerEncryptionKeyArn: 'customerEncryptionKeyArn',
  customOrchestration: {
    executor: {
      lambda: 'lambda',
    },
  },
  description: 'description',
  foundationModel: 'foundationModel',
  guardrailConfiguration: {
    guardrailIdentifier: 'guardrailIdentifier',
    guardrailVersion: 'guardrailVersion',
  },
  idleSessionTtlInSeconds: 123,
  instruction: 'instruction',
  knowledgeBases: [{
    description: 'description',
    knowledgeBaseId: 'knowledgeBaseId',

    // the properties below are optional
    knowledgeBaseState: 'knowledgeBaseState',
  }],
  memoryConfiguration: {
    enabledMemoryTypes: ['enabledMemoryTypes'],
    sessionSummaryConfiguration: {
      maxRecentSessions: 123,
    },
    storageDays: 123,
  },
  orchestrationType: 'orchestrationType',
  promptOverrideConfiguration: {
    promptConfigurations: [{
      additionalModelRequestFields: additionalModelRequestFields,
      basePromptTemplate: 'basePromptTemplate',
      foundationModel: 'foundationModel',
      inferenceConfiguration: {
        maximumLength: 123,
        stopSequences: ['stopSequences'],
        temperature: 123,
        topK: 123,
        topP: 123,
      },
      parserMode: 'parserMode',
      promptCreationMode: 'promptCreationMode',
      promptState: 'promptState',
      promptType: 'promptType',
    }],

    // the properties below are optional
    overrideLambda: 'overrideLambda',
  },
  skipResourceInUseCheckOnDelete: false,
  tags: {
    tagsKey: 'tags',
  },
  testAliasTags: {
    testAliasTagsKey: 'testAliasTags',
  },
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

# additional_model_request_fields: Any

cfn_agent = bedrock.CfnAgent(self, "MyCfnAgent",
    agent_name="agentName",

    # the properties below are optional
    action_groups=[bedrock.CfnAgent.AgentActionGroupProperty(
        action_group_name="actionGroupName",

        # the properties below are optional
        action_group_executor=bedrock.CfnAgent.ActionGroupExecutorProperty(
            custom_control="customControl",
            lambda_="lambda"
        ),
        action_group_state="actionGroupState",
        api_schema=bedrock.CfnAgent.APISchemaProperty(
            payload="payload",
            s3=bedrock.CfnAgent.S3IdentifierProperty(
                s3_bucket_name="s3BucketName",
                s3_object_key="s3ObjectKey"
            )
        ),
        description="description",
        function_schema=bedrock.CfnAgent.FunctionSchemaProperty(
            functions=[bedrock.CfnAgent.FunctionProperty(
                name="name",

                # the properties below are optional
                description="description",
                parameters={
                    "parameters_key": bedrock.CfnAgent.ParameterDetailProperty(
                        type="type",

                        # the properties below are optional
                        description="description",
                        required=False
                    )
                },
                require_confirmation="requireConfirmation"
            )]
        ),
        parent_action_group_signature="parentActionGroupSignature",
        skip_resource_in_use_check_on_delete=False
    )],
    agent_collaboration="agentCollaboration",
    agent_collaborators=[bedrock.CfnAgent.AgentCollaboratorProperty(
        agent_descriptor=bedrock.CfnAgent.AgentDescriptorProperty(
            alias_arn="aliasArn"
        ),
        collaboration_instruction="collaborationInstruction",
        collaborator_name="collaboratorName",

        # the properties below are optional
        relay_conversation_history="relayConversationHistory"
    )],
    agent_resource_role_arn="agentResourceRoleArn",
    auto_prepare=False,
    customer_encryption_key_arn="customerEncryptionKeyArn",
    custom_orchestration=bedrock.CfnAgent.CustomOrchestrationProperty(
        executor=bedrock.CfnAgent.OrchestrationExecutorProperty(
            lambda_="lambda"
        )
    ),
    description="description",
    foundation_model="foundationModel",
    guardrail_configuration=bedrock.CfnAgent.GuardrailConfigurationProperty(
        guardrail_identifier="guardrailIdentifier",
        guardrail_version="guardrailVersion"
    ),
    idle_session_ttl_in_seconds=123,
    instruction="instruction",
    knowledge_bases=[bedrock.CfnAgent.AgentKnowledgeBaseProperty(
        description="description",
        knowledge_base_id="knowledgeBaseId",

        # the properties below are optional
        knowledge_base_state="knowledgeBaseState"
    )],
    memory_configuration=bedrock.CfnAgent.MemoryConfigurationProperty(
        enabled_memory_types=["enabledMemoryTypes"],
        session_summary_configuration=bedrock.CfnAgent.SessionSummaryConfigurationProperty(
            max_recent_sessions=123
        ),
        storage_days=123
    ),
    orchestration_type="orchestrationType",
    prompt_override_configuration=bedrock.CfnAgent.PromptOverrideConfigurationProperty(
        prompt_configurations=[bedrock.CfnAgent.PromptConfigurationProperty(
            additional_model_request_fields=additional_model_request_fields,
            base_prompt_template="basePromptTemplate",
            foundation_model="foundationModel",
            inference_configuration=bedrock.CfnAgent.InferenceConfigurationProperty(
                maximum_length=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_k=123,
                top_p=123
            ),
            parser_mode="parserMode",
            prompt_creation_mode="promptCreationMode",
            prompt_state="promptState",
            prompt_type="promptType"
        )],

        # the properties below are optional
        override_lambda="overrideLambda"
    ),
    skip_resource_in_use_check_on_delete=False,
    tags={
        "tags_key": "tags"
    },
    test_alias_tags={
        "test_alias_tags_key": "testAliasTags"
    }
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.*;

Object additionalModelRequestFields;

CfnAgent cfnAgent = CfnAgent.Builder.create(this, "MyCfnAgent")
        .agentName("agentName")

        // the properties below are optional
        .actionGroups(List.of(AgentActionGroupProperty.builder()
                .actionGroupName("actionGroupName")

                // the properties below are optional
                .actionGroupExecutor(ActionGroupExecutorProperty.builder()
                        .customControl("customControl")
                        .lambda("lambda")
                        .build())
                .actionGroupState("actionGroupState")
                .apiSchema(APISchemaProperty.builder()
                        .payload("payload")
                        .s3(S3IdentifierProperty.builder()
                                .s3BucketName("s3BucketName")
                                .s3ObjectKey("s3ObjectKey")
                                .build())
                        .build())
                .description("description")
                .functionSchema(FunctionSchemaProperty.builder()
                        .functions(List.of(FunctionProperty.builder()
                                .name("name")

                                // the properties below are optional
                                .description("description")
                                .parameters(Map.of(
                                        "parametersKey", ParameterDetailProperty.builder()
                                                .type("type")

                                                // the properties below are optional
                                                .description("description")
                                                .required(false)
                                                .build()))
                                .requireConfirmation("requireConfirmation")
                                .build()))
                        .build())
                .parentActionGroupSignature("parentActionGroupSignature")
                .skipResourceInUseCheckOnDelete(false)
                .build()))
        .agentCollaboration("agentCollaboration")
        .agentCollaborators(List.of(AgentCollaboratorProperty.builder()
                .agentDescriptor(AgentDescriptorProperty.builder()
                        .aliasArn("aliasArn")
                        .build())
                .collaborationInstruction("collaborationInstruction")
                .collaboratorName("collaboratorName")

                // the properties below are optional
                .relayConversationHistory("relayConversationHistory")
                .build()))
        .agentResourceRoleArn("agentResourceRoleArn")
        .autoPrepare(false)
        .customerEncryptionKeyArn("customerEncryptionKeyArn")
        .customOrchestration(CustomOrchestrationProperty.builder()
                .executor(OrchestrationExecutorProperty.builder()
                        .lambda("lambda")
                        .build())
                .build())
        .description("description")
        .foundationModel("foundationModel")
        .guardrailConfiguration(GuardrailConfigurationProperty.builder()
                .guardrailIdentifier("guardrailIdentifier")
                .guardrailVersion("guardrailVersion")
                .build())
        .idleSessionTtlInSeconds(123)
        .instruction("instruction")
        .knowledgeBases(List.of(AgentKnowledgeBaseProperty.builder()
                .description("description")
                .knowledgeBaseId("knowledgeBaseId")

                // the properties below are optional
                .knowledgeBaseState("knowledgeBaseState")
                .build()))
        .memoryConfiguration(MemoryConfigurationProperty.builder()
                .enabledMemoryTypes(List.of("enabledMemoryTypes"))
                .sessionSummaryConfiguration(SessionSummaryConfigurationProperty.builder()
                        .maxRecentSessions(123)
                        .build())
                .storageDays(123)
                .build())
        .orchestrationType("orchestrationType")
        .promptOverrideConfiguration(PromptOverrideConfigurationProperty.builder()
                .promptConfigurations(List.of(PromptConfigurationProperty.builder()
                        .additionalModelRequestFields(additionalModelRequestFields)
                        .basePromptTemplate("basePromptTemplate")
                        .foundationModel("foundationModel")
                        .inferenceConfiguration(InferenceConfigurationProperty.builder()
                                .maximumLength(123)
                                .stopSequences(List.of("stopSequences"))
                                .temperature(123)
                                .topK(123)
                                .topP(123)
                                .build())
                        .parserMode("parserMode")
                        .promptCreationMode("promptCreationMode")
                        .promptState("promptState")
                        .promptType("promptType")
                        .build()))

                // the properties below are optional
                .overrideLambda("overrideLambda")
                .build())
        .skipResourceInUseCheckOnDelete(false)
        .tags(Map.of(
                "tagsKey", "tags"))
        .testAliasTags(Map.of(
                "testAliasTagsKey", "testAliasTags"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock;

var additionalModelRequestFields;

var cfnAgent = new CfnAgent(this, "MyCfnAgent", new CfnAgentProps {
    AgentName = "agentName",

    // the properties below are optional
    ActionGroups = new [] { new AgentActionGroupProperty {
        ActionGroupName = "actionGroupName",

        // the properties below are optional
        ActionGroupExecutor = new ActionGroupExecutorProperty {
            CustomControl = "customControl",
            Lambda = "lambda"
        },
        ActionGroupState = "actionGroupState",
        ApiSchema = new APISchemaProperty {
            Payload = "payload",
            S3 = new S3IdentifierProperty {
                S3BucketName = "s3BucketName",
                S3ObjectKey = "s3ObjectKey"
            }
        },
        Description = "description",
        FunctionSchema = new FunctionSchemaProperty {
            Functions = new [] { new FunctionProperty {
                Name = "name",

                // the properties below are optional
                Description = "description",
                Parameters = new Dictionary<string, object> {
                    { "parametersKey", new ParameterDetailProperty {
                        Type = "type",

                        // the properties below are optional
                        Description = "description",
                        Required = false
                    } }
                },
                RequireConfirmation = "requireConfirmation"
            } }
        },
        ParentActionGroupSignature = "parentActionGroupSignature",
        SkipResourceInUseCheckOnDelete = false
    } },
    AgentCollaboration = "agentCollaboration",
    AgentCollaborators = new [] { new AgentCollaboratorProperty {
        AgentDescriptor = new AgentDescriptorProperty {
            AliasArn = "aliasArn"
        },
        CollaborationInstruction = "collaborationInstruction",
        CollaboratorName = "collaboratorName",

        // the properties below are optional
        RelayConversationHistory = "relayConversationHistory"
    } },
    AgentResourceRoleArn = "agentResourceRoleArn",
    AutoPrepare = false,
    CustomerEncryptionKeyArn = "customerEncryptionKeyArn",
    CustomOrchestration = new CustomOrchestrationProperty {
        Executor = new OrchestrationExecutorProperty {
            Lambda = "lambda"
        }
    },
    Description = "description",
    FoundationModel = "foundationModel",
    GuardrailConfiguration = new GuardrailConfigurationProperty {
        GuardrailIdentifier = "guardrailIdentifier",
        GuardrailVersion = "guardrailVersion"
    },
    IdleSessionTtlInSeconds = 123,
    Instruction = "instruction",
    KnowledgeBases = new [] { new AgentKnowledgeBaseProperty {
        Description = "description",
        KnowledgeBaseId = "knowledgeBaseId",

        // the properties below are optional
        KnowledgeBaseState = "knowledgeBaseState"
    } },
    MemoryConfiguration = new MemoryConfigurationProperty {
        EnabledMemoryTypes = new [] { "enabledMemoryTypes" },
        SessionSummaryConfiguration = new SessionSummaryConfigurationProperty {
            MaxRecentSessions = 123
        },
        StorageDays = 123
    },
    OrchestrationType = "orchestrationType",
    PromptOverrideConfiguration = new PromptOverrideConfigurationProperty {
        PromptConfigurations = new [] { new PromptConfigurationProperty {
            AdditionalModelRequestFields = additionalModelRequestFields,
            BasePromptTemplate = "basePromptTemplate",
            FoundationModel = "foundationModel",
            InferenceConfiguration = new InferenceConfigurationProperty {
                MaximumLength = 123,
                StopSequences = new [] { "stopSequences" },
                Temperature = 123,
                TopK = 123,
                TopP = 123
            },
            ParserMode = "parserMode",
            PromptCreationMode = "promptCreationMode",
            PromptState = "promptState",
            PromptType = "promptType"
        } },

        // the properties below are optional
        OverrideLambda = "overrideLambda"
    },
    SkipResourceInUseCheckOnDelete = false,
    Tags = new Dictionary<string, string> {
        { "tagsKey", "tags" }
    },
    TestAliasTags = new Dictionary<string, string> {
        { "testAliasTagsKey", "testAliasTags" }
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var additionalModelRequestFields interface{}

cfnAgent := awscdk.Aws_bedrock.NewCfnAgent(this, jsii.String("MyCfnAgent"), &CfnAgentProps{
	AgentName: jsii.String("agentName"),

	// the properties below are optional
	ActionGroups: []interface{}{
		&AgentActionGroupProperty{
			ActionGroupName: jsii.String("actionGroupName"),

			// the properties below are optional
			ActionGroupExecutor: &ActionGroupExecutorProperty{
				CustomControl: jsii.String("customControl"),
				Lambda: jsii.String("lambda"),
			},
			ActionGroupState: jsii.String("actionGroupState"),
			ApiSchema: &APISchemaProperty{
				Payload: jsii.String("payload"),
				S3: &S3IdentifierProperty{
					S3BucketName: jsii.String("s3BucketName"),
					S3ObjectKey: jsii.String("s3ObjectKey"),
				},
			},
			Description: jsii.String("description"),
			FunctionSchema: &FunctionSchemaProperty{
				Functions: []interface{}{
					&FunctionProperty{
						Name: jsii.String("name"),

						// the properties below are optional
						Description: jsii.String("description"),
						Parameters: map[string]interface{}{
							"parametersKey": &ParameterDetailProperty{
								"type": jsii.String("type"),

								// the properties below are optional
								"description": jsii.String("description"),
								"required": jsii.Boolean(false),
							},
						},
						RequireConfirmation: jsii.String("requireConfirmation"),
					},
				},
			},
			ParentActionGroupSignature: jsii.String("parentActionGroupSignature"),
			SkipResourceInUseCheckOnDelete: jsii.Boolean(false),
		},
	},
	AgentCollaboration: jsii.String("agentCollaboration"),
	AgentCollaborators: []interface{}{
		&AgentCollaboratorProperty{
			AgentDescriptor: &AgentDescriptorProperty{
				AliasArn: jsii.String("aliasArn"),
			},
			CollaborationInstruction: jsii.String("collaborationInstruction"),
			CollaboratorName: jsii.String("collaboratorName"),

			// the properties below are optional
			RelayConversationHistory: jsii.String("relayConversationHistory"),
		},
	},
	AgentResourceRoleArn: jsii.String("agentResourceRoleArn"),
	AutoPrepare: jsii.Boolean(false),
	CustomerEncryptionKeyArn: jsii.String("customerEncryptionKeyArn"),
	CustomOrchestration: &CustomOrchestrationProperty{
		Executor: &OrchestrationExecutorProperty{
			Lambda: jsii.String("lambda"),
		},
	},
	Description: jsii.String("description"),
	FoundationModel: jsii.String("foundationModel"),
	GuardrailConfiguration: &GuardrailConfigurationProperty{
		GuardrailIdentifier: jsii.String("guardrailIdentifier"),
		GuardrailVersion: jsii.String("guardrailVersion"),
	},
	IdleSessionTtlInSeconds: jsii.Number(123),
	Instruction: jsii.String("instruction"),
	KnowledgeBases: []interface{}{
		&AgentKnowledgeBaseProperty{
			Description: jsii.String("description"),
			KnowledgeBaseId: jsii.String("knowledgeBaseId"),

			// the properties below are optional
			KnowledgeBaseState: jsii.String("knowledgeBaseState"),
		},
	},
	MemoryConfiguration: &MemoryConfigurationProperty{
		EnabledMemoryTypes: []*string{
			jsii.String("enabledMemoryTypes"),
		},
		SessionSummaryConfiguration: &SessionSummaryConfigurationProperty{
			MaxRecentSessions: jsii.Number(123),
		},
		StorageDays: jsii.Number(123),
	},
	OrchestrationType: jsii.String("orchestrationType"),
	PromptOverrideConfiguration: &PromptOverrideConfigurationProperty{
		PromptConfigurations: []interface{}{
			&PromptConfigurationProperty{
				AdditionalModelRequestFields: additionalModelRequestFields,
				BasePromptTemplate: jsii.String("basePromptTemplate"),
				FoundationModel: jsii.String("foundationModel"),
				InferenceConfiguration: &InferenceConfigurationProperty{
					MaximumLength: jsii.Number(123),
					StopSequences: []*string{
						jsii.String("stopSequences"),
					},
					Temperature: jsii.Number(123),
					TopK: jsii.Number(123),
					TopP: jsii.Number(123),
				},
				ParserMode: jsii.String("parserMode"),
				PromptCreationMode: jsii.String("promptCreationMode"),
				PromptState: jsii.String("promptState"),
				PromptType: jsii.String("promptType"),
			},
		},

		// the properties below are optional
		OverrideLambda: jsii.String("overrideLambda"),
	},
	SkipResourceInUseCheckOnDelete: jsii.Boolean(false),
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
	TestAliasTags: map[string]*string{
		"testAliasTagsKey": jsii.String("testAliasTags"),
	},
})

Initializer ​

ts
new CfnAgent(scope: Construct, id: string, props: CfnAgentProps)
python
CfnAgent(scope: Construct, id: str, props: CfnAgentProps)
java
new CfnAgent(Construct scope, String id, CfnAgentProps props)
csharp
new CfnAgent(Construct scope, string id, CfnAgentProps props)
go
NewCfnAgent(Scope Construct, Id *string, Props CfnAgentProps)

Construct Props ​

actionGroupsoptionalIResolvable | IResolvable | CfnAgent.AgentActionGroupProperty[]action_groupsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AgentActionGroupProperty]]]actionGroupsoptionalIResolvableActionGroupsoptionalIResolvableActionGroupsoptionalinterface{} #
The action groups that belong to an agent.
agentCollaborationoptionalstringagent_collaborationoptionalstragentCollaborationoptionalStringAgentCollaborationoptionalstringAgentCollaborationoptional*string #
The agent's collaboration settings.
agentCollaboratorsoptionalIResolvable | IResolvable | CfnAgent.AgentCollaboratorProperty[]agent_collaboratorsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AgentCollaboratorProperty]]]agentCollaboratorsoptionalIResolvableAgentCollaboratorsoptionalIResolvableAgentCollaboratorsoptionalinterface{} #
List of Agent Collaborators.
agentNamestringagent_namestragentNameStringAgentNamestringAgentName*string required #
The name of the agent.
agentResourceRoleArnoptionalstringagent_resource_role_arnoptionalstragentResourceRoleArnoptionalStringAgentResourceRoleArnoptionalstringAgentResourceRoleArnoptional*string #
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
autoPrepareoptionalboolean | IResolvableauto_prepareoptionaltyping.Union[bool, IResolvable]autoPrepareoptionalBooleanAutoPrepareoptionalboolAutoPrepareoptionalinterface{} = false #
Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent.

The DRAFT version can be continually iterated upon during internal development. By default, this value is false .

customerEncryptionKeyArnoptionalstringcustomer_encryption_key_arnoptionalstrcustomerEncryptionKeyArnoptionalStringCustomerEncryptionKeyArnoptionalstringCustomerEncryptionKeyArnoptional*string #
The Amazon Resource Name (ARN) of the AWS key that encrypts the agent.
customOrchestrationoptionalIResolvable | CfnAgent.CustomOrchestrationPropertycustom_orchestrationoptionaltyping.Union[IResolvable, CustomOrchestrationProperty]customOrchestrationoptionalIResolvableCustomOrchestrationoptionalIResolvableCustomOrchestrationoptionalinterface{} #
Contains custom orchestration configurations for the agent.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
The description of the agent.
foundationModeloptionalstringfoundation_modeloptionalstrfoundationModeloptionalStringFoundationModeloptionalstringFoundationModeloptional*string #
The foundation model used for orchestration by the agent.
guardrailConfigurationoptionalIResolvable | CfnAgent.GuardrailConfigurationPropertyguardrail_configurationoptionaltyping.Union[IResolvable, GuardrailConfigurationProperty]guardrailConfigurationoptionalIResolvableGuardrailConfigurationoptionalIResolvableGuardrailConfigurationoptionalinterface{} #
Details about the guardrail associated with the agent.
idleSessionTtlInSecondsoptionalnumberidle_session_ttl_in_secondsoptionalint | floatidleSessionTtlInSecondsoptionalNumberIdleSessionTtlInSecondsoptionaldoubleIdleSessionTtlInSecondsoptional*float64 #
The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.

A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.

instructionoptionalstringinstructionoptionalstrinstructionoptionalStringInstructionoptionalstringInstructionoptional*string #
Instructions that tell the agent what it should do and how it should interact with users.
knowledgeBasesoptionalIResolvable | IResolvable | CfnAgent.AgentKnowledgeBaseProperty[]knowledge_basesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AgentKnowledgeBaseProperty]]]knowledgeBasesoptionalIResolvableKnowledgeBasesoptionalIResolvableKnowledgeBasesoptionalinterface{} #
The knowledge bases associated with the agent.
memoryConfigurationoptionalIResolvable | CfnAgent.MemoryConfigurationPropertymemory_configurationoptionaltyping.Union[IResolvable, MemoryConfigurationProperty]memoryConfigurationoptionalIResolvableMemoryConfigurationoptionalIResolvableMemoryConfigurationoptionalinterface{} #
Contains memory configuration for the agent.
orchestrationTypeoptionalstringorchestration_typeoptionalstrorchestrationTypeoptionalStringOrchestrationTypeoptionalstringOrchestrationTypeoptional*string #
Specifies the orchestration strategy for the agent.
promptOverrideConfigurationoptionalIResolvable | CfnAgent.PromptOverrideConfigurationPropertyprompt_override_configurationoptionaltyping.Union[IResolvable, PromptOverrideConfigurationProperty]promptOverrideConfigurationoptionalIResolvablePromptOverrideConfigurationoptionalIResolvablePromptOverrideConfigurationoptionalinterface{} #
Contains configurations to override prompt templates in different parts of an agent sequence.

For more information, see Advanced prompts .

skipResourceInUseCheckOnDeleteoptionalboolean | IResolvableskip_resource_in_use_check_on_deleteoptionaltyping.Union[bool, IResolvable]skipResourceInUseCheckOnDeleteoptionalBooleanSkipResourceInUseCheckOnDeleteoptionalboolSkipResourceInUseCheckOnDeleteoptionalinterface{} = false #
Specifies whether to delete the resource even if it's in use.

By default, this value is false .

tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #
Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.
testAliasTagsoptionalIResolvable | { [key: string]: string }test_alias_tagsoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]testAliasTagsoptionalIResolvableTestAliasTagsoptionalIResolvableTestAliasTagsoptionalinterface{} #
Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.

Properties ​

actionGroupsmay be undefinedIResolvable | IResolvable | CfnAgent.AgentActionGroupProperty[]action_groupsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AgentActionGroupProperty]]]actionGroupsmay be undefinedIResolvableActionGroupsmay be undefinedIResolvableActionGroupsmay be undefinedinterface{} #
The action groups that belong to an agent.
agentCollaborationmay be undefinedstringagent_collaborationmay be undefinedstragentCollaborationmay be undefinedStringAgentCollaborationmay be undefinedstringAgentCollaborationmay be undefined*string #
The agent's collaboration settings.
agentCollaboratorsmay be undefinedIResolvable | IResolvable | CfnAgent.AgentCollaboratorProperty[]agent_collaboratorsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AgentCollaboratorProperty]]]agentCollaboratorsmay be undefinedIResolvableAgentCollaboratorsmay be undefinedIResolvableAgentCollaboratorsmay be undefinedinterface{} #
List of Agent Collaborators.
agentNamestringagent_namestragentNameStringAgentNamestringAgentName*string #
The name of the agent.
A reference to a Agent resource.
agentResourceRoleArnmay be undefinedstringagent_resource_role_arnmay be undefinedstragentResourceRoleArnmay be undefinedStringAgentResourceRoleArnmay be undefinedstringAgentResourceRoleArnmay be undefined*string #
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
attrAgentArnstringattr_agent_arnstrattrAgentArnStringAttrAgentArnstringAttrAgentArn*string #
The Amazon Resource Name (ARN) of the agent.
attrAgentIdstringattr_agent_idstrattrAgentIdStringAttrAgentIdstringAttrAgentId*string #
The unique identifier of the agent.
attrAgentStatusstringattr_agent_statusstrattrAgentStatusStringAttrAgentStatusstringAttrAgentStatus*string #
The status of the agent and whether it is ready for use. The following statuses are possible:.
notes
  • CREATING – The agent is being created.
  • PREPARING – The agent is being prepared.
  • PREPARED – The agent is prepared and ready to be invoked.
  • NOT_PREPARED – The agent has been created but not yet prepared.
  • FAILED – The agent API operation failed.
  • UPDATING – The agent is being updated.
  • DELETING – The agent is being deleted.
attrAgentVersionstringattr_agent_versionstrattrAgentVersionStringAttrAgentVersionstringAttrAgentVersion*string #
The version of the agent.
attrCreatedAtstringattr_created_atstrattrCreatedAtStringAttrCreatedAtstringAttrCreatedAt*string #
The time at which the agent was created.
attrFailureReasonsstring[]attr_failure_reasonstyping.List[str]attrFailureReasonsList<String>AttrFailureReasonsstring[]AttrFailureReasons*[]*string #
Contains reasons that the agent-related API that you invoked failed.
attrPreparedAtstringattr_prepared_atstrattrPreparedAtStringAttrPreparedAtstringAttrPreparedAt*string #
The time at which the agent was last prepared.
attrRecommendedActionsstring[]attr_recommended_actionstyping.List[str]attrRecommendedActionsList<String>AttrRecommendedActionsstring[]AttrRecommendedActions*[]*string #
Contains recommended actions to take for the agent-related API that you invoked to succeed.
attrUpdatedAtstringattr_updated_atstrattrUpdatedAtStringAttrUpdatedAtstringAttrUpdatedAt*string #
The time at which the agent was last updated.
autoPreparemay be undefinedboolean | IResolvableauto_preparemay be undefinedtyping.Union[bool, IResolvable]autoPreparemay be undefinedBooleanAutoPreparemay be undefinedboolAutoPreparemay be undefinedinterface{} #
Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent.
cdkTagManagerTagManagercdk_tag_managerTagManagercdkTagManagerTagManagerCdkTagManagerTagManagerCdkTagManagerTagManager #
Tag Manager which manages the tags for this resource.
CFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAMEstrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*string static #
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string #
AWS resource type.
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string #
customerEncryptionKeyArnmay be undefinedstringcustomer_encryption_key_arnmay be undefinedstrcustomerEncryptionKeyArnmay be undefinedStringCustomerEncryptionKeyArnmay be undefinedstringCustomerEncryptionKeyArnmay be undefined*string #
The Amazon Resource Name (ARN) of the AWS key that encrypts the agent.
customOrchestrationmay be undefinedIResolvable | CfnAgent.CustomOrchestrationPropertycustom_orchestrationmay be undefinedtyping.Union[IResolvable, CustomOrchestrationProperty]customOrchestrationmay be undefinedIResolvableCustomOrchestrationmay be undefinedIResolvableCustomOrchestrationmay be undefinedinterface{} #
Contains custom orchestration configurations for the agent.
descriptionmay be undefinedstringdescriptionmay be undefinedstrdescriptionmay be undefinedStringDescriptionmay be undefinedstringDescriptionmay be undefined*string #
The description of the agent.
foundationModelmay be undefinedstringfoundation_modelmay be undefinedstrfoundationModelmay be undefinedStringFoundationModelmay be undefinedstringFoundationModelmay be undefined*string #
The foundation model used for orchestration by the agent.
guardrailConfigurationmay be undefinedIResolvable | CfnAgent.GuardrailConfigurationPropertyguardrail_configurationmay be undefinedtyping.Union[IResolvable, GuardrailConfigurationProperty]guardrailConfigurationmay be undefinedIResolvableGuardrailConfigurationmay be undefinedIResolvableGuardrailConfigurationmay be undefinedinterface{} #
Details about the guardrail associated with the agent.
idleSessionTtlInSecondsmay be undefinednumberidle_session_ttl_in_secondsmay be undefinedint | floatidleSessionTtlInSecondsmay be undefinedNumberIdleSessionTtlInSecondsmay be undefineddoubleIdleSessionTtlInSecondsmay be undefined*float64 #
The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.
instructionmay be undefinedstringinstructionmay be undefinedstrinstructionmay be undefinedStringInstructionmay be undefinedstringInstructionmay be undefined*string #
Instructions that tell the agent what it should do and how it should interact with users.
knowledgeBasesmay be undefinedIResolvable | IResolvable | CfnAgent.AgentKnowledgeBaseProperty[]knowledge_basesmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AgentKnowledgeBaseProperty]]]knowledgeBasesmay be undefinedIResolvableKnowledgeBasesmay be undefinedIResolvableKnowledgeBasesmay be undefinedinterface{} #
The knowledge bases associated with the agent.
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*string #
The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

memoryConfigurationmay be undefinedIResolvable | CfnAgent.MemoryConfigurationPropertymemory_configurationmay be undefinedtyping.Union[IResolvable, MemoryConfigurationProperty]memoryConfigurationmay be undefinedIResolvableMemoryConfigurationmay be undefinedIResolvableMemoryConfigurationmay be undefinedinterface{} #
Contains memory configuration for the agent.
nodeNodenodeNodenodeNodeNodeNodeNodeNode #
The tree node.
orchestrationTypemay be undefinedstringorchestration_typemay be undefinedstrorchestrationTypemay be undefinedStringOrchestrationTypemay be undefinedstringOrchestrationTypemay be undefined*string #
Specifies the orchestration strategy for the agent.
promptOverrideConfigurationmay be undefinedIResolvable | CfnAgent.PromptOverrideConfigurationPropertyprompt_override_configurationmay be undefinedtyping.Union[IResolvable, PromptOverrideConfigurationProperty]promptOverrideConfigurationmay be undefinedIResolvablePromptOverrideConfigurationmay be undefinedIResolvablePromptOverrideConfigurationmay be undefinedinterface{} #
Contains configurations to override prompt templates in different parts of an agent sequence.
refstringrefstrrefStringRefstringRef*string #
Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

skipResourceInUseCheckOnDeletemay be undefinedboolean | IResolvableskip_resource_in_use_check_on_deletemay be undefinedtyping.Union[bool, IResolvable]skipResourceInUseCheckOnDeletemay be undefinedBooleanSkipResourceInUseCheckOnDeletemay be undefinedboolSkipResourceInUseCheckOnDeletemay be undefinedinterface{} #
Specifies whether to delete the resource even if it's in use.
stackStackstackStackstackStackStackStackStackStack #
The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tagsmay be undefined{ [key: string]: string }tagsmay be undefinedtyping.Mapping[str, str]tagsmay be undefinedMap<String, String>Tagsmay be undefinedIDictionary<string, string>Tagsmay be undefined*map[string]*string #
Metadata that you can assign to a resource as key-value pairs.

For more information, see the following resources:.

testAliasTagsmay be undefinedIResolvable | { [key: string]: string }test_alias_tagsmay be undefinedtyping.Union[IResolvable, typing.Mapping[str, str]]testAliasTagsmay be undefinedIResolvableTestAliasTagsmay be undefinedIResolvableTestAliasTagsmay be undefinedinterface{} #
Metadata that you can assign to a resource as key-value pairs.

For more information, see the following resources:.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string) #
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource) deprecated #
Use `addResourceDependency` instead.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource) deprecated #
Use `addResourceDependency` instead.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{}) #
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{}) #
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

typescript
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');

would add the overrides

json
"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string) #
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{}) #
Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string) #
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength) #
Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions) #
Sets the deletion policy of the resource based on the removal policy specified.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

arnForAgent(resource: IAgentRef): string@staticmethod def arn_for_agent(resource: IAgentRef) -> strpublic static String arnForAgent(IAgentRef resource)public static string ArnForAgent(IAgentRef resource)func ArnForAgent(Resource IAgentRef) *string static #
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string #
fromAgentArn(scope: Construct, id: string, arn: string): IAgentRef@staticmethod def from_agent_arn(scope: Construct, id: str, arn: str) -> IAgentRefpublic static IAgentRef fromAgentArn(Construct scope, String id, String arn)public static IAgentRef FromAgentArn(Construct scope, string id, string arn)func FromAgentArn(Scope Construct, Id *string, Arn *string) IAgentRef static #
Creates a new IAgentRef from an ARN.
fromAgentId(scope: Construct, id: string, agentId: string): IAgentRef@staticmethod def from_agent_id(scope: Construct, id: str, agent_id: str) -> IAgentRefpublic static IAgentRef fromAgentId(Construct scope, String id, String agentId)public static IAgentRef FromAgentId(Construct scope, string id, string agentId)func FromAgentId(Scope Construct, Id *string, AgentId *string) IAgentRef static #
Creates a new IAgentRef from a agentId.
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference #
Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{} #
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector) #
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnAgent(x: any): boolean@staticmethod def is_cfn_agent(x: Any) -> boolpublic static Boolean isCfnAgent(Object x)public static bool IsCfnAgent(object x)func IsCfnAgent(X interface{}) *bool static #
Checks whether the given object is a CfnAgent.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *bool static #
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

returns

Returns: The construct as a stack element or undefined if it is not a stack element.

isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *bool static #
Check whether the given object is a CfnResource.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *bool static #
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{} #
Retrieves an array of resources and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string) #
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource) deprecated #
Use `removeResourceDependency` instead

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource) #
Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource) #
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string #
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct #
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.