CfnHarness L1 construct
Resource Type definition for AWS::BedrockAgentCore::Harness - a managed agentic loop service that provides a turnkey solution for running stateful, tool-equipped AI agents.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
declare const additionalParams: any;
declare const awsIam: any;
declare const disabled: any;
declare const inputSchema: any;
declare const none: any;
const cfnHarness = new bedrockagentcore.CfnHarness(this, 'MyCfnHarness', {
executionRoleArn: 'executionRoleArn',
harnessName: 'harnessName',
model: {
bedrockModelConfig: {
modelId: 'modelId',
// the properties below are optional
additionalParams: additionalParams,
apiFormat: 'apiFormat',
maxTokens: 123,
temperature: 123,
topP: 123,
},
geminiModelConfig: {
apiKeyArn: 'apiKeyArn',
modelId: 'modelId',
// the properties below are optional
additionalParams: additionalParams,
maxTokens: 123,
temperature: 123,
topK: 123,
topP: 123,
},
liteLlmModelConfig: {
modelId: 'modelId',
// the properties below are optional
additionalParams: additionalParams,
apiBase: 'apiBase',
apiKeyArn: 'apiKeyArn',
maxTokens: 123,
temperature: 123,
topP: 123,
},
openAiModelConfig: {
apiKeyArn: 'apiKeyArn',
modelId: 'modelId',
// the properties below are optional
additionalParams: additionalParams,
apiBase: 'apiBase',
apiFormat: 'apiFormat',
maxTokens: 123,
temperature: 123,
topP: 123,
},
},
// the properties below are optional
allowedTools: ['allowedTools'],
authorizerConfiguration: {
customJwtAuthorizer: {
discoveryUrl: 'discoveryUrl',
// the properties below are optional
advertisedScopeMapping: {
advertisedScopeMappingKey: 'advertisedScopeMapping',
},
allowedAudience: ['allowedAudience'],
allowedClients: ['allowedClients'],
allowedScopes: ['allowedScopes'],
customClaims: [{
authorizingClaimMatchValue: {
claimMatchOperator: 'claimMatchOperator',
claimMatchValue: {
matchValueString: 'matchValueString',
matchValueStringList: ['matchValueStringList'],
},
},
inboundTokenClaimName: 'inboundTokenClaimName',
inboundTokenClaimValueType: 'inboundTokenClaimValueType',
}],
privateEndpoint: {
managedVpcResource: {
endpointIpAddressType: 'endpointIpAddressType',
subnetIds: ['subnetIds'],
vpcIdentifier: 'vpcIdentifier',
// the properties below are optional
routingDomain: 'routingDomain',
securityGroupIds: ['securityGroupIds'],
tags: {
tagsKey: 'tags',
},
},
selfManagedLatticeResource: {
resourceConfigurationIdentifier: 'resourceConfigurationIdentifier',
},
},
privateEndpointOverrides: [{
domain: 'domain',
privateEndpoint: {
managedVpcResource: {
endpointIpAddressType: 'endpointIpAddressType',
subnetIds: ['subnetIds'],
vpcIdentifier: 'vpcIdentifier',
// the properties below are optional
routingDomain: 'routingDomain',
securityGroupIds: ['securityGroupIds'],
tags: {
tagsKey: 'tags',
},
},
selfManagedLatticeResource: {
resourceConfigurationIdentifier: 'resourceConfigurationIdentifier',
},
},
}],
},
},
environment: {
agentCoreRuntimeEnvironment: {
agentRuntimeArn: 'agentRuntimeArn',
agentRuntimeId: 'agentRuntimeId',
agentRuntimeName: 'agentRuntimeName',
filesystemConfigurations: [{
efsAccessPoint: {
accessPointArn: 'accessPointArn',
mountPath: 'mountPath',
},
s3FilesAccessPoint: {
accessPointArn: 'accessPointArn',
mountPath: 'mountPath',
},
sessionStorage: {
mountPath: 'mountPath',
},
}],
lifecycleConfiguration: {
idleRuntimeSessionTimeout: 123,
maxLifetime: 123,
},
networkConfiguration: {
networkMode: 'networkMode',
// the properties below are optional
networkModeConfig: {
securityGroups: ['securityGroups'],
subnets: ['subnets'],
},
},
},
},
environmentArtifact: {
containerConfiguration: {
containerUri: 'containerUri',
},
},
environmentVariables: {
environmentVariablesKey: 'environmentVariables',
},
hooks: [{
afterInvocation: {
name: 'name',
target: {
eventBridge: {
arn: 'arn',
},
lambda: {
arn: 'arn',
// the properties below are optional
failureMode: 'failureMode',
timeoutSeconds: 123,
},
sns: {
arn: 'arn',
},
},
},
afterToolCall: {
name: 'name',
target: {
eventBridge: {
arn: 'arn',
},
lambda: {
arn: 'arn',
// the properties below are optional
failureMode: 'failureMode',
timeoutSeconds: 123,
},
sns: {
arn: 'arn',
},
},
},
beforeInvocation: {
name: 'name',
target: {
eventBridge: {
arn: 'arn',
},
lambda: {
arn: 'arn',
// the properties below are optional
failureMode: 'failureMode',
timeoutSeconds: 123,
},
sns: {
arn: 'arn',
},
},
},
beforeToolCall: {
name: 'name',
target: {
eventBridge: {
arn: 'arn',
},
lambda: {
arn: 'arn',
// the properties below are optional
failureMode: 'failureMode',
timeoutSeconds: 123,
},
sns: {
arn: 'arn',
},
},
},
}],
maxIterations: 123,
maxTokens: 123,
memory: {
agentCoreMemoryConfiguration: {
arn: 'arn',
// the properties below are optional
actorId: 'actorId',
messagesCount: 123,
retrievalConfig: {
retrievalConfigKey: {
relevanceScore: 123,
strategyId: 'strategyId',
topK: 123,
},
},
},
disabled: disabled,
managedMemoryConfiguration: {
arn: 'arn',
encryptionKeyArn: 'encryptionKeyArn',
eventExpiryDuration: 123,
strategies: ['strategies'],
},
},
skills: [{
awsSkills: {
paths: ['paths'],
},
git: {
url: 'url',
// the properties below are optional
auth: {
credentialArn: 'credentialArn',
// the properties below are optional
username: 'username',
},
path: 'path',
},
path: 'path',
s3: {
uri: 'uri',
},
}],
systemPrompt: [{
text: 'text',
}],
tags: [{
key: 'key',
value: 'value',
}],
timeoutSeconds: 123,
tools: [{
type: 'type',
// the properties below are optional
config: {
agentCoreBrowser: {
browserArn: 'browserArn',
},
agentCoreCodeInterpreter: {
codeInterpreterArn: 'codeInterpreterArn',
},
agentCoreGateway: {
gatewayArn: 'gatewayArn',
// the properties below are optional
outboundAuth: {
awsIam: awsIam,
none: none,
oauth: {
providerArn: 'providerArn',
scopes: ['scopes'],
// the properties below are optional
customParameters: {
customParametersKey: 'customParameters',
},
defaultReturnUrl: 'defaultReturnUrl',
grantType: 'grantType',
},
},
},
inlineFunction: {
description: 'description',
inputSchema: inputSchema,
},
remoteMcp: {
url: 'url',
// the properties below are optional
headers: {
headersKey: 'headers',
},
},
},
name: 'name',
}],
truncation: {
strategy: 'strategy',
// the properties below are optional
config: {
slidingWindow: {
messagesCount: 123,
},
summarization: {
preserveRecentMessages: 123,
summarizationSystemPrompt: 'summarizationSystemPrompt',
summaryRatio: 123,
},
},
},
});
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrockagentcore as bedrockagentcore
# additional_params: Any
# aws_iam: Any
# disabled: Any
# input_schema: Any
# none: Any
cfn_harness = bedrockagentcore.CfnHarness(self, "MyCfnHarness",
execution_role_arn="executionRoleArn",
harness_name="harnessName",
model=bedrockagentcore.CfnHarness.HarnessModelConfigurationProperty(
bedrock_model_config=bedrockagentcore.CfnHarness.HarnessBedrockModelConfigProperty(
model_id="modelId",
# the properties below are optional
additional_params=additional_params,
api_format="apiFormat",
max_tokens=123,
temperature=123,
top_p=123
),
gemini_model_config=bedrockagentcore.CfnHarness.HarnessGeminiModelConfigProperty(
api_key_arn="apiKeyArn",
model_id="modelId",
# the properties below are optional
additional_params=additional_params,
max_tokens=123,
temperature=123,
top_k=123,
top_p=123
),
lite_llm_model_config=bedrockagentcore.CfnHarness.HarnessLiteLlmModelConfigProperty(
model_id="modelId",
# the properties below are optional
additional_params=additional_params,
api_base="apiBase",
api_key_arn="apiKeyArn",
max_tokens=123,
temperature=123,
top_p=123
),
open_ai_model_config=bedrockagentcore.CfnHarness.HarnessOpenAiModelConfigProperty(
api_key_arn="apiKeyArn",
model_id="modelId",
# the properties below are optional
additional_params=additional_params,
api_base="apiBase",
api_format="apiFormat",
max_tokens=123,
temperature=123,
top_p=123
)
),
# the properties below are optional
allowed_tools=["allowedTools"],
authorizer_configuration=bedrockagentcore.CfnHarness.AuthorizerConfigurationProperty(
custom_jwt_authorizer=bedrockagentcore.CfnHarness.CustomJWTAuthorizerConfigurationProperty(
discovery_url="discoveryUrl",
# the properties below are optional
advertised_scope_mapping={
"advertised_scope_mapping_key": "advertisedScopeMapping"
},
allowed_audience=["allowedAudience"],
allowed_clients=["allowedClients"],
allowed_scopes=["allowedScopes"],
custom_claims=[bedrockagentcore.CfnHarness.CustomClaimValidationTypeProperty(
authorizing_claim_match_value=bedrockagentcore.CfnHarness.AuthorizingClaimMatchValueTypeProperty(
claim_match_operator="claimMatchOperator",
claim_match_value=bedrockagentcore.CfnHarness.ClaimMatchValueTypeProperty(
match_value_string="matchValueString",
match_value_string_list=["matchValueStringList"]
)
),
inbound_token_claim_name="inboundTokenClaimName",
inbound_token_claim_value_type="inboundTokenClaimValueType"
)],
private_endpoint=bedrockagentcore.CfnHarness.PrivateEndpointProperty(
managed_vpc_resource=bedrockagentcore.CfnHarness.ManagedVpcResourceProperty(
endpoint_ip_address_type="endpointIpAddressType",
subnet_ids=["subnetIds"],
vpc_identifier="vpcIdentifier",
# the properties below are optional
routing_domain="routingDomain",
security_group_ids=["securityGroupIds"],
tags={
"tags_key": "tags"
}
),
self_managed_lattice_resource=bedrockagentcore.CfnHarness.SelfManagedLatticeResourceProperty(
resource_configuration_identifier="resourceConfigurationIdentifier"
)
),
private_endpoint_overrides=[bedrockagentcore.CfnHarness.PrivateEndpointOverrideProperty(
domain="domain",
private_endpoint=bedrockagentcore.CfnHarness.PrivateEndpointProperty(
managed_vpc_resource=bedrockagentcore.CfnHarness.ManagedVpcResourceProperty(
endpoint_ip_address_type="endpointIpAddressType",
subnet_ids=["subnetIds"],
vpc_identifier="vpcIdentifier",
# the properties below are optional
routing_domain="routingDomain",
security_group_ids=["securityGroupIds"],
tags={
"tags_key": "tags"
}
),
self_managed_lattice_resource=bedrockagentcore.CfnHarness.SelfManagedLatticeResourceProperty(
resource_configuration_identifier="resourceConfigurationIdentifier"
)
)
)]
)
),
environment=bedrockagentcore.CfnHarness.HarnessEnvironmentProviderProperty(
agent_core_runtime_environment=bedrockagentcore.CfnHarness.HarnessAgentCoreRuntimeEnvironmentProperty(
agent_runtime_arn="agentRuntimeArn",
agent_runtime_id="agentRuntimeId",
agent_runtime_name="agentRuntimeName",
filesystem_configurations=[bedrockagentcore.CfnHarness.FilesystemConfigurationProperty(
efs_access_point=bedrockagentcore.CfnHarness.EfsAccessPointConfigurationProperty(
access_point_arn="accessPointArn",
mount_path="mountPath"
),
s3_files_access_point=bedrockagentcore.CfnHarness.S3FilesAccessPointConfigurationProperty(
access_point_arn="accessPointArn",
mount_path="mountPath"
),
session_storage=bedrockagentcore.CfnHarness.SessionStorageConfigurationProperty(
mount_path="mountPath"
)
)],
lifecycle_configuration=bedrockagentcore.CfnHarness.LifecycleConfigurationProperty(
idle_runtime_session_timeout=123,
max_lifetime=123
),
network_configuration=bedrockagentcore.CfnHarness.NetworkConfigurationProperty(
network_mode="networkMode",
# the properties below are optional
network_mode_config=bedrockagentcore.CfnHarness.VpcConfigProperty(
security_groups=["securityGroups"],
subnets=["subnets"]
)
)
)
),
environment_artifact=bedrockagentcore.CfnHarness.HarnessEnvironmentArtifactProperty(
container_configuration=bedrockagentcore.CfnHarness.ContainerConfigurationProperty(
container_uri="containerUri"
)
),
environment_variables={
"environment_variables_key": "environmentVariables"
},
hooks=[bedrockagentcore.CfnHarness.HarnessHookProperty(
after_invocation=bedrockagentcore.CfnHarness.HarnessAfterInvocationHookProperty(
name="name",
target=bedrockagentcore.CfnHarness.HarnessHookTargetProperty(
event_bridge=bedrockagentcore.CfnHarness.HarnessHookEventBridgeTargetProperty(
arn="arn"
),
lambda_=bedrockagentcore.CfnHarness.HarnessHookLambdaTargetProperty(
arn="arn",
# the properties below are optional
failure_mode="failureMode",
timeout_seconds=123
),
sns=bedrockagentcore.CfnHarness.HarnessHookSnsTargetProperty(
arn="arn"
)
)
),
after_tool_call=bedrockagentcore.CfnHarness.HarnessAfterToolCallHookProperty(
name="name",
target=bedrockagentcore.CfnHarness.HarnessHookTargetProperty(
event_bridge=bedrockagentcore.CfnHarness.HarnessHookEventBridgeTargetProperty(
arn="arn"
),
lambda_=bedrockagentcore.CfnHarness.HarnessHookLambdaTargetProperty(
arn="arn",
# the properties below are optional
failure_mode="failureMode",
timeout_seconds=123
),
sns=bedrockagentcore.CfnHarness.HarnessHookSnsTargetProperty(
arn="arn"
)
)
),
before_invocation=bedrockagentcore.CfnHarness.HarnessBeforeInvocationHookProperty(
name="name",
target=bedrockagentcore.CfnHarness.HarnessHookTargetProperty(
event_bridge=bedrockagentcore.CfnHarness.HarnessHookEventBridgeTargetProperty(
arn="arn"
),
lambda_=bedrockagentcore.CfnHarness.HarnessHookLambdaTargetProperty(
arn="arn",
# the properties below are optional
failure_mode="failureMode",
timeout_seconds=123
),
sns=bedrockagentcore.CfnHarness.HarnessHookSnsTargetProperty(
arn="arn"
)
)
),
before_tool_call=bedrockagentcore.CfnHarness.HarnessBeforeToolCallHookProperty(
name="name",
target=bedrockagentcore.CfnHarness.HarnessHookTargetProperty(
event_bridge=bedrockagentcore.CfnHarness.HarnessHookEventBridgeTargetProperty(
arn="arn"
),
lambda_=bedrockagentcore.CfnHarness.HarnessHookLambdaTargetProperty(
arn="arn",
# the properties below are optional
failure_mode="failureMode",
timeout_seconds=123
),
sns=bedrockagentcore.CfnHarness.HarnessHookSnsTargetProperty(
arn="arn"
)
)
)
)],
max_iterations=123,
max_tokens=123,
memory=bedrockagentcore.CfnHarness.HarnessMemoryConfigurationProperty(
agent_core_memory_configuration=bedrockagentcore.CfnHarness.HarnessAgentCoreMemoryConfigurationProperty(
arn="arn",
# the properties below are optional
actor_id="actorId",
messages_count=123,
retrieval_config={
"retrieval_config_key": bedrockagentcore.CfnHarness.HarnessAgentCoreMemoryRetrievalConfigProperty(
relevance_score=123,
strategy_id="strategyId",
top_k=123
)
}
),
disabled=disabled,
managed_memory_configuration=bedrockagentcore.CfnHarness.HarnessManagedMemoryConfigurationProperty(
arn="arn",
encryption_key_arn="encryptionKeyArn",
event_expiry_duration=123,
strategies=["strategies"]
)
),
skills=[bedrockagentcore.CfnHarness.HarnessSkillProperty(
aws_skills=bedrockagentcore.CfnHarness.HarnessSkillAwsSkillsSourceProperty(
paths=["paths"]
),
git=bedrockagentcore.CfnHarness.HarnessSkillGitSourceProperty(
url="url",
# the properties below are optional
auth=bedrockagentcore.CfnHarness.HarnessSkillGitAuthProperty(
credential_arn="credentialArn",
# the properties below are optional
username="username"
),
path="path"
),
path="path",
s3=bedrockagentcore.CfnHarness.HarnessSkillS3SourceProperty(
uri="uri"
)
)],
system_prompt=[bedrockagentcore.CfnHarness.HarnessSystemContentBlockProperty(
text="text"
)],
tags=[CfnTag(
key="key",
value="value"
)],
timeout_seconds=123,
tools=[bedrockagentcore.CfnHarness.HarnessToolProperty(
type="type",
# the properties below are optional
config=bedrockagentcore.CfnHarness.HarnessToolConfigurationProperty(
agent_core_browser=bedrockagentcore.CfnHarness.HarnessAgentCoreBrowserConfigProperty(
browser_arn="browserArn"
),
agent_core_code_interpreter=bedrockagentcore.CfnHarness.HarnessAgentCoreCodeInterpreterConfigProperty(
code_interpreter_arn="codeInterpreterArn"
),
agent_core_gateway=bedrockagentcore.CfnHarness.HarnessAgentCoreGatewayConfigProperty(
gateway_arn="gatewayArn",
# the properties below are optional
outbound_auth=bedrockagentcore.CfnHarness.HarnessGatewayOutboundAuthProperty(
aws_iam=aws_iam,
none=none,
oauth=bedrockagentcore.CfnHarness.OAuthCredentialProviderProperty(
provider_arn="providerArn",
scopes=["scopes"],
# the properties below are optional
custom_parameters={
"custom_parameters_key": "customParameters"
},
default_return_url="defaultReturnUrl",
grant_type="grantType"
)
)
),
inline_function=bedrockagentcore.CfnHarness.HarnessInlineFunctionConfigProperty(
description="description",
input_schema=input_schema
),
remote_mcp=bedrockagentcore.CfnHarness.HarnessRemoteMcpConfigProperty(
url="url",
# the properties below are optional
headers={
"headers_key": "headers"
}
)
),
name="name"
)],
truncation=bedrockagentcore.CfnHarness.HarnessTruncationConfigurationProperty(
strategy="strategy",
# the properties below are optional
config=bedrockagentcore.CfnHarness.HarnessTruncationStrategyConfigurationProperty(
sliding_window=bedrockagentcore.CfnHarness.HarnessSlidingWindowConfigurationProperty(
messages_count=123
),
summarization=bedrockagentcore.CfnHarness.HarnessSummarizationConfigurationProperty(
preserve_recent_messages=123,
summarization_system_prompt="summarizationSystemPrompt",
summary_ratio=123
)
)
)
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrockagentcore.*;
Object additionalParams;
Object awsIam;
Object disabled;
Object inputSchema;
Object none;
CfnHarness cfnHarness = CfnHarness.Builder.create(this, "MyCfnHarness")
.executionRoleArn("executionRoleArn")
.harnessName("harnessName")
.model(HarnessModelConfigurationProperty.builder()
.bedrockModelConfig(HarnessBedrockModelConfigProperty.builder()
.modelId("modelId")
// the properties below are optional
.additionalParams(additionalParams)
.apiFormat("apiFormat")
.maxTokens(123)
.temperature(123)
.topP(123)
.build())
.geminiModelConfig(HarnessGeminiModelConfigProperty.builder()
.apiKeyArn("apiKeyArn")
.modelId("modelId")
// the properties below are optional
.additionalParams(additionalParams)
.maxTokens(123)
.temperature(123)
.topK(123)
.topP(123)
.build())
.liteLlmModelConfig(HarnessLiteLlmModelConfigProperty.builder()
.modelId("modelId")
// the properties below are optional
.additionalParams(additionalParams)
.apiBase("apiBase")
.apiKeyArn("apiKeyArn")
.maxTokens(123)
.temperature(123)
.topP(123)
.build())
.openAiModelConfig(HarnessOpenAiModelConfigProperty.builder()
.apiKeyArn("apiKeyArn")
.modelId("modelId")
// the properties below are optional
.additionalParams(additionalParams)
.apiBase("apiBase")
.apiFormat("apiFormat")
.maxTokens(123)
.temperature(123)
.topP(123)
.build())
.build())
// the properties below are optional
.allowedTools(List.of("allowedTools"))
.authorizerConfiguration(AuthorizerConfigurationProperty.builder()
.customJwtAuthorizer(CustomJWTAuthorizerConfigurationProperty.builder()
.discoveryUrl("discoveryUrl")
// the properties below are optional
.advertisedScopeMapping(Map.of(
"advertisedScopeMappingKey", "advertisedScopeMapping"))
.allowedAudience(List.of("allowedAudience"))
.allowedClients(List.of("allowedClients"))
.allowedScopes(List.of("allowedScopes"))
.customClaims(List.of(CustomClaimValidationTypeProperty.builder()
.authorizingClaimMatchValue(AuthorizingClaimMatchValueTypeProperty.builder()
.claimMatchOperator("claimMatchOperator")
.claimMatchValue(ClaimMatchValueTypeProperty.builder()
.matchValueString("matchValueString")
.matchValueStringList(List.of("matchValueStringList"))
.build())
.build())
.inboundTokenClaimName("inboundTokenClaimName")
.inboundTokenClaimValueType("inboundTokenClaimValueType")
.build()))
.privateEndpoint(PrivateEndpointProperty.builder()
.managedVpcResource(ManagedVpcResourceProperty.builder()
.endpointIpAddressType("endpointIpAddressType")
.subnetIds(List.of("subnetIds"))
.vpcIdentifier("vpcIdentifier")
// the properties below are optional
.routingDomain("routingDomain")
.securityGroupIds(List.of("securityGroupIds"))
.tags(Map.of(
"tagsKey", "tags"))
.build())
.selfManagedLatticeResource(SelfManagedLatticeResourceProperty.builder()
.resourceConfigurationIdentifier("resourceConfigurationIdentifier")
.build())
.build())
.privateEndpointOverrides(List.of(PrivateEndpointOverrideProperty.builder()
.domain("domain")
.privateEndpoint(PrivateEndpointProperty.builder()
.managedVpcResource(ManagedVpcResourceProperty.builder()
.endpointIpAddressType("endpointIpAddressType")
.subnetIds(List.of("subnetIds"))
.vpcIdentifier("vpcIdentifier")
// the properties below are optional
.routingDomain("routingDomain")
.securityGroupIds(List.of("securityGroupIds"))
.tags(Map.of(
"tagsKey", "tags"))
.build())
.selfManagedLatticeResource(SelfManagedLatticeResourceProperty.builder()
.resourceConfigurationIdentifier("resourceConfigurationIdentifier")
.build())
.build())
.build()))
.build())
.build())
.environment(HarnessEnvironmentProviderProperty.builder()
.agentCoreRuntimeEnvironment(HarnessAgentCoreRuntimeEnvironmentProperty.builder()
.agentRuntimeArn("agentRuntimeArn")
.agentRuntimeId("agentRuntimeId")
.agentRuntimeName("agentRuntimeName")
.filesystemConfigurations(List.of(FilesystemConfigurationProperty.builder()
.efsAccessPoint(EfsAccessPointConfigurationProperty.builder()
.accessPointArn("accessPointArn")
.mountPath("mountPath")
.build())
.s3FilesAccessPoint(S3FilesAccessPointConfigurationProperty.builder()
.accessPointArn("accessPointArn")
.mountPath("mountPath")
.build())
.sessionStorage(SessionStorageConfigurationProperty.builder()
.mountPath("mountPath")
.build())
.build()))
.lifecycleConfiguration(LifecycleConfigurationProperty.builder()
.idleRuntimeSessionTimeout(123)
.maxLifetime(123)
.build())
.networkConfiguration(NetworkConfigurationProperty.builder()
.networkMode("networkMode")
// the properties below are optional
.networkModeConfig(VpcConfigProperty.builder()
.securityGroups(List.of("securityGroups"))
.subnets(List.of("subnets"))
.build())
.build())
.build())
.build())
.environmentArtifact(HarnessEnvironmentArtifactProperty.builder()
.containerConfiguration(ContainerConfigurationProperty.builder()
.containerUri("containerUri")
.build())
.build())
.environmentVariables(Map.of(
"environmentVariablesKey", "environmentVariables"))
.hooks(List.of(HarnessHookProperty.builder()
.afterInvocation(HarnessAfterInvocationHookProperty.builder()
.name("name")
.target(HarnessHookTargetProperty.builder()
.eventBridge(HarnessHookEventBridgeTargetProperty.builder()
.arn("arn")
.build())
.lambda(HarnessHookLambdaTargetProperty.builder()
.arn("arn")
// the properties below are optional
.failureMode("failureMode")
.timeoutSeconds(123)
.build())
.sns(HarnessHookSnsTargetProperty.builder()
.arn("arn")
.build())
.build())
.build())
.afterToolCall(HarnessAfterToolCallHookProperty.builder()
.name("name")
.target(HarnessHookTargetProperty.builder()
.eventBridge(HarnessHookEventBridgeTargetProperty.builder()
.arn("arn")
.build())
.lambda(HarnessHookLambdaTargetProperty.builder()
.arn("arn")
// the properties below are optional
.failureMode("failureMode")
.timeoutSeconds(123)
.build())
.sns(HarnessHookSnsTargetProperty.builder()
.arn("arn")
.build())
.build())
.build())
.beforeInvocation(HarnessBeforeInvocationHookProperty.builder()
.name("name")
.target(HarnessHookTargetProperty.builder()
.eventBridge(HarnessHookEventBridgeTargetProperty.builder()
.arn("arn")
.build())
.lambda(HarnessHookLambdaTargetProperty.builder()
.arn("arn")
// the properties below are optional
.failureMode("failureMode")
.timeoutSeconds(123)
.build())
.sns(HarnessHookSnsTargetProperty.builder()
.arn("arn")
.build())
.build())
.build())
.beforeToolCall(HarnessBeforeToolCallHookProperty.builder()
.name("name")
.target(HarnessHookTargetProperty.builder()
.eventBridge(HarnessHookEventBridgeTargetProperty.builder()
.arn("arn")
.build())
.lambda(HarnessHookLambdaTargetProperty.builder()
.arn("arn")
// the properties below are optional
.failureMode("failureMode")
.timeoutSeconds(123)
.build())
.sns(HarnessHookSnsTargetProperty.builder()
.arn("arn")
.build())
.build())
.build())
.build()))
.maxIterations(123)
.maxTokens(123)
.memory(HarnessMemoryConfigurationProperty.builder()
.agentCoreMemoryConfiguration(HarnessAgentCoreMemoryConfigurationProperty.builder()
.arn("arn")
// the properties below are optional
.actorId("actorId")
.messagesCount(123)
.retrievalConfig(Map.of(
"retrievalConfigKey", HarnessAgentCoreMemoryRetrievalConfigProperty.builder()
.relevanceScore(123)
.strategyId("strategyId")
.topK(123)
.build()))
.build())
.disabled(disabled)
.managedMemoryConfiguration(HarnessManagedMemoryConfigurationProperty.builder()
.arn("arn")
.encryptionKeyArn("encryptionKeyArn")
.eventExpiryDuration(123)
.strategies(List.of("strategies"))
.build())
.build())
.skills(List.of(HarnessSkillProperty.builder()
.awsSkills(HarnessSkillAwsSkillsSourceProperty.builder()
.paths(List.of("paths"))
.build())
.git(HarnessSkillGitSourceProperty.builder()
.url("url")
// the properties below are optional
.auth(HarnessSkillGitAuthProperty.builder()
.credentialArn("credentialArn")
// the properties below are optional
.username("username")
.build())
.path("path")
.build())
.path("path")
.s3(HarnessSkillS3SourceProperty.builder()
.uri("uri")
.build())
.build()))
.systemPrompt(List.of(HarnessSystemContentBlockProperty.builder()
.text("text")
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.timeoutSeconds(123)
.tools(List.of(HarnessToolProperty.builder()
.type("type")
// the properties below are optional
.config(HarnessToolConfigurationProperty.builder()
.agentCoreBrowser(HarnessAgentCoreBrowserConfigProperty.builder()
.browserArn("browserArn")
.build())
.agentCoreCodeInterpreter(HarnessAgentCoreCodeInterpreterConfigProperty.builder()
.codeInterpreterArn("codeInterpreterArn")
.build())
.agentCoreGateway(HarnessAgentCoreGatewayConfigProperty.builder()
.gatewayArn("gatewayArn")
// the properties below are optional
.outboundAuth(HarnessGatewayOutboundAuthProperty.builder()
.awsIam(awsIam)
.none(none)
.oauth(OAuthCredentialProviderProperty.builder()
.providerArn("providerArn")
.scopes(List.of("scopes"))
// the properties below are optional
.customParameters(Map.of(
"customParametersKey", "customParameters"))
.defaultReturnUrl("defaultReturnUrl")
.grantType("grantType")
.build())
.build())
.build())
.inlineFunction(HarnessInlineFunctionConfigProperty.builder()
.description("description")
.inputSchema(inputSchema)
.build())
.remoteMcp(HarnessRemoteMcpConfigProperty.builder()
.url("url")
// the properties below are optional
.headers(Map.of(
"headersKey", "headers"))
.build())
.build())
.name("name")
.build()))
.truncation(HarnessTruncationConfigurationProperty.builder()
.strategy("strategy")
// the properties below are optional
.config(HarnessTruncationStrategyConfigurationProperty.builder()
.slidingWindow(HarnessSlidingWindowConfigurationProperty.builder()
.messagesCount(123)
.build())
.summarization(HarnessSummarizationConfigurationProperty.builder()
.preserveRecentMessages(123)
.summarizationSystemPrompt("summarizationSystemPrompt")
.summaryRatio(123)
.build())
.build())
.build())
.build();
// 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.BedrockAgentCore;
var additionalParams;
var awsIam;
var disabled;
var inputSchema;
var none;
var cfnHarness = new CfnHarness(this, "MyCfnHarness", new CfnHarnessProps {
ExecutionRoleArn = "executionRoleArn",
HarnessName = "harnessName",
Model = new HarnessModelConfigurationProperty {
BedrockModelConfig = new HarnessBedrockModelConfigProperty {
ModelId = "modelId",
// the properties below are optional
AdditionalParams = additionalParams,
ApiFormat = "apiFormat",
MaxTokens = 123,
Temperature = 123,
TopP = 123
},
GeminiModelConfig = new HarnessGeminiModelConfigProperty {
ApiKeyArn = "apiKeyArn",
ModelId = "modelId",
// the properties below are optional
AdditionalParams = additionalParams,
MaxTokens = 123,
Temperature = 123,
TopK = 123,
TopP = 123
},
LiteLlmModelConfig = new HarnessLiteLlmModelConfigProperty {
ModelId = "modelId",
// the properties below are optional
AdditionalParams = additionalParams,
ApiBase = "apiBase",
ApiKeyArn = "apiKeyArn",
MaxTokens = 123,
Temperature = 123,
TopP = 123
},
OpenAiModelConfig = new HarnessOpenAiModelConfigProperty {
ApiKeyArn = "apiKeyArn",
ModelId = "modelId",
// the properties below are optional
AdditionalParams = additionalParams,
ApiBase = "apiBase",
ApiFormat = "apiFormat",
MaxTokens = 123,
Temperature = 123,
TopP = 123
}
},
// the properties below are optional
AllowedTools = new [] { "allowedTools" },
AuthorizerConfiguration = new AuthorizerConfigurationProperty {
CustomJwtAuthorizer = new CustomJWTAuthorizerConfigurationProperty {
DiscoveryUrl = "discoveryUrl",
// the properties below are optional
AdvertisedScopeMapping = new Dictionary<string, string> {
{ "advertisedScopeMappingKey", "advertisedScopeMapping" }
},
AllowedAudience = new [] { "allowedAudience" },
AllowedClients = new [] { "allowedClients" },
AllowedScopes = new [] { "allowedScopes" },
CustomClaims = new [] { new CustomClaimValidationTypeProperty {
AuthorizingClaimMatchValue = new AuthorizingClaimMatchValueTypeProperty {
ClaimMatchOperator = "claimMatchOperator",
ClaimMatchValue = new ClaimMatchValueTypeProperty {
MatchValueString = "matchValueString",
MatchValueStringList = new [] { "matchValueStringList" }
}
},
InboundTokenClaimName = "inboundTokenClaimName",
InboundTokenClaimValueType = "inboundTokenClaimValueType"
} },
PrivateEndpoint = new PrivateEndpointProperty {
ManagedVpcResource = new ManagedVpcResourceProperty {
EndpointIpAddressType = "endpointIpAddressType",
SubnetIds = new [] { "subnetIds" },
VpcIdentifier = "vpcIdentifier",
// the properties below are optional
RoutingDomain = "routingDomain",
SecurityGroupIds = new [] { "securityGroupIds" },
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
},
SelfManagedLatticeResource = new SelfManagedLatticeResourceProperty {
ResourceConfigurationIdentifier = "resourceConfigurationIdentifier"
}
},
PrivateEndpointOverrides = new [] { new PrivateEndpointOverrideProperty {
Domain = "domain",
PrivateEndpoint = new PrivateEndpointProperty {
ManagedVpcResource = new ManagedVpcResourceProperty {
EndpointIpAddressType = "endpointIpAddressType",
SubnetIds = new [] { "subnetIds" },
VpcIdentifier = "vpcIdentifier",
// the properties below are optional
RoutingDomain = "routingDomain",
SecurityGroupIds = new [] { "securityGroupIds" },
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
},
SelfManagedLatticeResource = new SelfManagedLatticeResourceProperty {
ResourceConfigurationIdentifier = "resourceConfigurationIdentifier"
}
}
} }
}
},
Environment = new HarnessEnvironmentProviderProperty {
AgentCoreRuntimeEnvironment = new HarnessAgentCoreRuntimeEnvironmentProperty {
AgentRuntimeArn = "agentRuntimeArn",
AgentRuntimeId = "agentRuntimeId",
AgentRuntimeName = "agentRuntimeName",
FilesystemConfigurations = new [] { new FilesystemConfigurationProperty {
EfsAccessPoint = new EfsAccessPointConfigurationProperty {
AccessPointArn = "accessPointArn",
MountPath = "mountPath"
},
S3FilesAccessPoint = new S3FilesAccessPointConfigurationProperty {
AccessPointArn = "accessPointArn",
MountPath = "mountPath"
},
SessionStorage = new SessionStorageConfigurationProperty {
MountPath = "mountPath"
}
} },
LifecycleConfiguration = new LifecycleConfigurationProperty {
IdleRuntimeSessionTimeout = 123,
MaxLifetime = 123
},
NetworkConfiguration = new NetworkConfigurationProperty {
NetworkMode = "networkMode",
// the properties below are optional
NetworkModeConfig = new VpcConfigProperty {
SecurityGroups = new [] { "securityGroups" },
Subnets = new [] { "subnets" }
}
}
}
},
EnvironmentArtifact = new HarnessEnvironmentArtifactProperty {
ContainerConfiguration = new ContainerConfigurationProperty {
ContainerUri = "containerUri"
}
},
EnvironmentVariables = new Dictionary<string, string> {
{ "environmentVariablesKey", "environmentVariables" }
},
Hooks = new [] { new HarnessHookProperty {
AfterInvocation = new HarnessAfterInvocationHookProperty {
Name = "name",
Target = new HarnessHookTargetProperty {
EventBridge = new HarnessHookEventBridgeTargetProperty {
Arn = "arn"
},
Lambda = new HarnessHookLambdaTargetProperty {
Arn = "arn",
// the properties below are optional
FailureMode = "failureMode",
TimeoutSeconds = 123
},
Sns = new HarnessHookSnsTargetProperty {
Arn = "arn"
}
}
},
AfterToolCall = new HarnessAfterToolCallHookProperty {
Name = "name",
Target = new HarnessHookTargetProperty {
EventBridge = new HarnessHookEventBridgeTargetProperty {
Arn = "arn"
},
Lambda = new HarnessHookLambdaTargetProperty {
Arn = "arn",
// the properties below are optional
FailureMode = "failureMode",
TimeoutSeconds = 123
},
Sns = new HarnessHookSnsTargetProperty {
Arn = "arn"
}
}
},
BeforeInvocation = new HarnessBeforeInvocationHookProperty {
Name = "name",
Target = new HarnessHookTargetProperty {
EventBridge = new HarnessHookEventBridgeTargetProperty {
Arn = "arn"
},
Lambda = new HarnessHookLambdaTargetProperty {
Arn = "arn",
// the properties below are optional
FailureMode = "failureMode",
TimeoutSeconds = 123
},
Sns = new HarnessHookSnsTargetProperty {
Arn = "arn"
}
}
},
BeforeToolCall = new HarnessBeforeToolCallHookProperty {
Name = "name",
Target = new HarnessHookTargetProperty {
EventBridge = new HarnessHookEventBridgeTargetProperty {
Arn = "arn"
},
Lambda = new HarnessHookLambdaTargetProperty {
Arn = "arn",
// the properties below are optional
FailureMode = "failureMode",
TimeoutSeconds = 123
},
Sns = new HarnessHookSnsTargetProperty {
Arn = "arn"
}
}
}
} },
MaxIterations = 123,
MaxTokens = 123,
Memory = new HarnessMemoryConfigurationProperty {
AgentCoreMemoryConfiguration = new HarnessAgentCoreMemoryConfigurationProperty {
Arn = "arn",
// the properties below are optional
ActorId = "actorId",
MessagesCount = 123,
RetrievalConfig = new Dictionary<string, object> {
{ "retrievalConfigKey", new HarnessAgentCoreMemoryRetrievalConfigProperty {
RelevanceScore = 123,
StrategyId = "strategyId",
TopK = 123
} }
}
},
Disabled = disabled,
ManagedMemoryConfiguration = new HarnessManagedMemoryConfigurationProperty {
Arn = "arn",
EncryptionKeyArn = "encryptionKeyArn",
EventExpiryDuration = 123,
Strategies = new [] { "strategies" }
}
},
Skills = new [] { new HarnessSkillProperty {
AwsSkills = new HarnessSkillAwsSkillsSourceProperty {
Paths = new [] { "paths" }
},
Git = new HarnessSkillGitSourceProperty {
Url = "url",
// the properties below are optional
Auth = new HarnessSkillGitAuthProperty {
CredentialArn = "credentialArn",
// the properties below are optional
Username = "username"
},
Path = "path"
},
Path = "path",
S3 = new HarnessSkillS3SourceProperty {
Uri = "uri"
}
} },
SystemPrompt = new [] { new HarnessSystemContentBlockProperty {
Text = "text"
} },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TimeoutSeconds = 123,
Tools = new [] { new HarnessToolProperty {
Type = "type",
// the properties below are optional
Config = new HarnessToolConfigurationProperty {
AgentCoreBrowser = new HarnessAgentCoreBrowserConfigProperty {
BrowserArn = "browserArn"
},
AgentCoreCodeInterpreter = new HarnessAgentCoreCodeInterpreterConfigProperty {
CodeInterpreterArn = "codeInterpreterArn"
},
AgentCoreGateway = new HarnessAgentCoreGatewayConfigProperty {
GatewayArn = "gatewayArn",
// the properties below are optional
OutboundAuth = new HarnessGatewayOutboundAuthProperty {
AwsIam = awsIam,
None = none,
Oauth = new OAuthCredentialProviderProperty {
ProviderArn = "providerArn",
Scopes = new [] { "scopes" },
// the properties below are optional
CustomParameters = new Dictionary<string, string> {
{ "customParametersKey", "customParameters" }
},
DefaultReturnUrl = "defaultReturnUrl",
GrantType = "grantType"
}
}
},
InlineFunction = new HarnessInlineFunctionConfigProperty {
Description = "description",
InputSchema = inputSchema
},
RemoteMcp = new HarnessRemoteMcpConfigProperty {
Url = "url",
// the properties below are optional
Headers = new Dictionary<string, string> {
{ "headersKey", "headers" }
}
}
},
Name = "name"
} },
Truncation = new HarnessTruncationConfigurationProperty {
Strategy = "strategy",
// the properties below are optional
Config = new HarnessTruncationStrategyConfigurationProperty {
SlidingWindow = new HarnessSlidingWindowConfigurationProperty {
MessagesCount = 123
},
Summarization = new HarnessSummarizationConfigurationProperty {
PreserveRecentMessages = 123,
SummarizationSystemPrompt = "summarizationSystemPrompt",
SummaryRatio = 123
}
}
}
});
// 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 additionalParams interface{}
var awsIam interface{}
var disabled interface{}
var inputSchema interface{}
var none interface{}
cfnHarness := awscdk.Aws_bedrockagentcore.NewCfnHarness(this, jsii.String("MyCfnHarness"), &CfnHarnessProps{
ExecutionRoleArn: jsii.String("executionRoleArn"),
HarnessName: jsii.String("harnessName"),
Model: &HarnessModelConfigurationProperty{
BedrockModelConfig: &HarnessBedrockModelConfigProperty{
ModelId: jsii.String("modelId"),
// the properties below are optional
AdditionalParams: additionalParams,
ApiFormat: jsii.String("apiFormat"),
MaxTokens: jsii.Number(123),
Temperature: jsii.Number(123),
TopP: jsii.Number(123),
},
GeminiModelConfig: &HarnessGeminiModelConfigProperty{
ApiKeyArn: jsii.String("apiKeyArn"),
ModelId: jsii.String("modelId"),
// the properties below are optional
AdditionalParams: additionalParams,
MaxTokens: jsii.Number(123),
Temperature: jsii.Number(123),
TopK: jsii.Number(123),
TopP: jsii.Number(123),
},
LiteLlmModelConfig: &HarnessLiteLlmModelConfigProperty{
ModelId: jsii.String("modelId"),
// the properties below are optional
AdditionalParams: additionalParams,
ApiBase: jsii.String("apiBase"),
ApiKeyArn: jsii.String("apiKeyArn"),
MaxTokens: jsii.Number(123),
Temperature: jsii.Number(123),
TopP: jsii.Number(123),
},
OpenAiModelConfig: &HarnessOpenAiModelConfigProperty{
ApiKeyArn: jsii.String("apiKeyArn"),
ModelId: jsii.String("modelId"),
// the properties below are optional
AdditionalParams: additionalParams,
ApiBase: jsii.String("apiBase"),
ApiFormat: jsii.String("apiFormat"),
MaxTokens: jsii.Number(123),
Temperature: jsii.Number(123),
TopP: jsii.Number(123),
},
},
// the properties below are optional
AllowedTools: []*string{
jsii.String("allowedTools"),
},
AuthorizerConfiguration: &AuthorizerConfigurationProperty{
CustomJwtAuthorizer: &CustomJWTAuthorizerConfigurationProperty{
DiscoveryUrl: jsii.String("discoveryUrl"),
// the properties below are optional
AdvertisedScopeMapping: map[string]*string{
"advertisedScopeMappingKey": jsii.String("advertisedScopeMapping"),
},
AllowedAudience: []*string{
jsii.String("allowedAudience"),
},
AllowedClients: []*string{
jsii.String("allowedClients"),
},
AllowedScopes: []*string{
jsii.String("allowedScopes"),
},
CustomClaims: []interface{}{
&CustomClaimValidationTypeProperty{
AuthorizingClaimMatchValue: &AuthorizingClaimMatchValueTypeProperty{
ClaimMatchOperator: jsii.String("claimMatchOperator"),
ClaimMatchValue: &ClaimMatchValueTypeProperty{
MatchValueString: jsii.String("matchValueString"),
MatchValueStringList: []*string{
jsii.String("matchValueStringList"),
},
},
},
InboundTokenClaimName: jsii.String("inboundTokenClaimName"),
InboundTokenClaimValueType: jsii.String("inboundTokenClaimValueType"),
},
},
PrivateEndpoint: &PrivateEndpointProperty{
ManagedVpcResource: &ManagedVpcResourceProperty{
EndpointIpAddressType: jsii.String("endpointIpAddressType"),
SubnetIds: []*string{
jsii.String("subnetIds"),
},
VpcIdentifier: jsii.String("vpcIdentifier"),
// the properties below are optional
RoutingDomain: jsii.String("routingDomain"),
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
Tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
},
SelfManagedLatticeResource: &SelfManagedLatticeResourceProperty{
ResourceConfigurationIdentifier: jsii.String("resourceConfigurationIdentifier"),
},
},
PrivateEndpointOverrides: []interface{}{
&PrivateEndpointOverrideProperty{
Domain: jsii.String("domain"),
PrivateEndpoint: &PrivateEndpointProperty{
ManagedVpcResource: &ManagedVpcResourceProperty{
EndpointIpAddressType: jsii.String("endpointIpAddressType"),
SubnetIds: []*string{
jsii.String("subnetIds"),
},
VpcIdentifier: jsii.String("vpcIdentifier"),
// the properties below are optional
RoutingDomain: jsii.String("routingDomain"),
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
Tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
},
SelfManagedLatticeResource: &SelfManagedLatticeResourceProperty{
ResourceConfigurationIdentifier: jsii.String("resourceConfigurationIdentifier"),
},
},
},
},
},
},
Environment: &HarnessEnvironmentProviderProperty{
AgentCoreRuntimeEnvironment: &HarnessAgentCoreRuntimeEnvironmentProperty{
AgentRuntimeArn: jsii.String("agentRuntimeArn"),
AgentRuntimeId: jsii.String("agentRuntimeId"),
AgentRuntimeName: jsii.String("agentRuntimeName"),
FilesystemConfigurations: []interface{}{
&FilesystemConfigurationProperty{
EfsAccessPoint: &EfsAccessPointConfigurationProperty{
AccessPointArn: jsii.String("accessPointArn"),
MountPath: jsii.String("mountPath"),
},
S3FilesAccessPoint: &S3FilesAccessPointConfigurationProperty{
AccessPointArn: jsii.String("accessPointArn"),
MountPath: jsii.String("mountPath"),
},
SessionStorage: &SessionStorageConfigurationProperty{
MountPath: jsii.String("mountPath"),
},
},
},
LifecycleConfiguration: &LifecycleConfigurationProperty{
IdleRuntimeSessionTimeout: jsii.Number(123),
MaxLifetime: jsii.Number(123),
},
NetworkConfiguration: &NetworkConfigurationProperty{
NetworkMode: jsii.String("networkMode"),
// the properties below are optional
NetworkModeConfig: &VpcConfigProperty{
SecurityGroups: []*string{
jsii.String("securityGroups"),
},
Subnets: []*string{
jsii.String("subnets"),
},
},
},
},
},
EnvironmentArtifact: &HarnessEnvironmentArtifactProperty{
ContainerConfiguration: &ContainerConfigurationProperty{
ContainerUri: jsii.String("containerUri"),
},
},
EnvironmentVariables: map[string]*string{
"environmentVariablesKey": jsii.String("environmentVariables"),
},
Hooks: []interface{}{
&HarnessHookProperty{
AfterInvocation: &HarnessAfterInvocationHookProperty{
Name: jsii.String("name"),
Target: &HarnessHookTargetProperty{
EventBridge: &HarnessHookEventBridgeTargetProperty{
Arn: jsii.String("arn"),
},
Lambda: &HarnessHookLambdaTargetProperty{
Arn: jsii.String("arn"),
// the properties below are optional
FailureMode: jsii.String("failureMode"),
TimeoutSeconds: jsii.Number(123),
},
Sns: &HarnessHookSnsTargetProperty{
Arn: jsii.String("arn"),
},
},
},
AfterToolCall: &HarnessAfterToolCallHookProperty{
Name: jsii.String("name"),
Target: &HarnessHookTargetProperty{
EventBridge: &HarnessHookEventBridgeTargetProperty{
Arn: jsii.String("arn"),
},
Lambda: &HarnessHookLambdaTargetProperty{
Arn: jsii.String("arn"),
// the properties below are optional
FailureMode: jsii.String("failureMode"),
TimeoutSeconds: jsii.Number(123),
},
Sns: &HarnessHookSnsTargetProperty{
Arn: jsii.String("arn"),
},
},
},
BeforeInvocation: &HarnessBeforeInvocationHookProperty{
Name: jsii.String("name"),
Target: &HarnessHookTargetProperty{
EventBridge: &HarnessHookEventBridgeTargetProperty{
Arn: jsii.String("arn"),
},
Lambda: &HarnessHookLambdaTargetProperty{
Arn: jsii.String("arn"),
// the properties below are optional
FailureMode: jsii.String("failureMode"),
TimeoutSeconds: jsii.Number(123),
},
Sns: &HarnessHookSnsTargetProperty{
Arn: jsii.String("arn"),
},
},
},
BeforeToolCall: &HarnessBeforeToolCallHookProperty{
Name: jsii.String("name"),
Target: &HarnessHookTargetProperty{
EventBridge: &HarnessHookEventBridgeTargetProperty{
Arn: jsii.String("arn"),
},
Lambda: &HarnessHookLambdaTargetProperty{
Arn: jsii.String("arn"),
// the properties below are optional
FailureMode: jsii.String("failureMode"),
TimeoutSeconds: jsii.Number(123),
},
Sns: &HarnessHookSnsTargetProperty{
Arn: jsii.String("arn"),
},
},
},
},
},
MaxIterations: jsii.Number(123),
MaxTokens: jsii.Number(123),
Memory: &HarnessMemoryConfigurationProperty{
AgentCoreMemoryConfiguration: &HarnessAgentCoreMemoryConfigurationProperty{
Arn: jsii.String("arn"),
// the properties below are optional
ActorId: jsii.String("actorId"),
MessagesCount: jsii.Number(123),
RetrievalConfig: map[string]interface{}{
"retrievalConfigKey": &HarnessAgentCoreMemoryRetrievalConfigProperty{
"relevanceScore": jsii.Number(123),
"strategyId": jsii.String("strategyId"),
"topK": jsii.Number(123),
},
},
},
Disabled: disabled,
ManagedMemoryConfiguration: &HarnessManagedMemoryConfigurationProperty{
Arn: jsii.String("arn"),
EncryptionKeyArn: jsii.String("encryptionKeyArn"),
EventExpiryDuration: jsii.Number(123),
Strategies: []*string{
jsii.String("strategies"),
},
},
},
Skills: []interface{}{
&HarnessSkillProperty{
AwsSkills: &HarnessSkillAwsSkillsSourceProperty{
Paths: []*string{
jsii.String("paths"),
},
},
Git: &HarnessSkillGitSourceProperty{
Url: jsii.String("url"),
// the properties below are optional
Auth: &HarnessSkillGitAuthProperty{
CredentialArn: jsii.String("credentialArn"),
// the properties below are optional
Username: jsii.String("username"),
},
Path: jsii.String("path"),
},
Path: jsii.String("path"),
S3: &HarnessSkillS3SourceProperty{
Uri: jsii.String("uri"),
},
},
},
SystemPrompt: []interface{}{
&HarnessSystemContentBlockProperty{
Text: jsii.String("text"),
},
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
TimeoutSeconds: jsii.Number(123),
Tools: []interface{}{
&HarnessToolProperty{
Type: jsii.String("type"),
// the properties below are optional
Config: &HarnessToolConfigurationProperty{
AgentCoreBrowser: &HarnessAgentCoreBrowserConfigProperty{
BrowserArn: jsii.String("browserArn"),
},
AgentCoreCodeInterpreter: &HarnessAgentCoreCodeInterpreterConfigProperty{
CodeInterpreterArn: jsii.String("codeInterpreterArn"),
},
AgentCoreGateway: &HarnessAgentCoreGatewayConfigProperty{
GatewayArn: jsii.String("gatewayArn"),
// the properties below are optional
OutboundAuth: &HarnessGatewayOutboundAuthProperty{
AwsIam: awsIam,
None: none,
Oauth: &OAuthCredentialProviderProperty{
ProviderArn: jsii.String("providerArn"),
Scopes: []*string{
jsii.String("scopes"),
},
// the properties below are optional
CustomParameters: map[string]*string{
"customParametersKey": jsii.String("customParameters"),
},
DefaultReturnUrl: jsii.String("defaultReturnUrl"),
GrantType: jsii.String("grantType"),
},
},
},
InlineFunction: &HarnessInlineFunctionConfigProperty{
Description: jsii.String("description"),
InputSchema: inputSchema,
},
RemoteMcp: &HarnessRemoteMcpConfigProperty{
Url: jsii.String("url"),
// the properties below are optional
Headers: map[string]*string{
"headersKey": jsii.String("headers"),
},
},
},
Name: jsii.String("name"),
},
},
Truncation: &HarnessTruncationConfigurationProperty{
Strategy: jsii.String("strategy"),
// the properties below are optional
Config: &HarnessTruncationStrategyConfigurationProperty{
SlidingWindow: &HarnessSlidingWindowConfigurationProperty{
MessagesCount: jsii.Number(123),
},
Summarization: &HarnessSummarizationConfigurationProperty{
PreserveRecentMessages: jsii.Number(123),
SummarizationSystemPrompt: jsii.String("summarizationSystemPrompt"),
SummaryRatio: jsii.Number(123),
},
},
},
})
Initializer
new CfnHarness(scope: Construct, id: string, props: CfnHarnessProps)
CfnHarness(scope: Construct, id: str, props: CfnHarnessProps)
new CfnHarness(Construct scope, String id, CfnHarnessProps props)
new CfnHarness(Construct scope, string id, CfnHarnessProps props)
NewCfnHarness(Scope Construct, Id *string, Props CfnHarnessProps)
Construct Props
allowedToolsoptionalstring[]allowed_toolsoptionaltyping.List[str]allowedToolsoptionalList<String>AllowedToolsoptionalstring[]AllowedToolsoptional*[]*string#authorizerConfigurationoptionalIResolvable | CfnHarness.AuthorizerConfigurationPropertyauthorizer_configurationoptionaltyping.Union[IResolvable, AuthorizerConfigurationProperty]authorizerConfigurationoptionalIResolvableAuthorizerConfigurationoptionalIResolvableAuthorizerConfigurationoptionalinterface{}#environmentoptionalIResolvable | CfnHarness.HarnessEnvironmentProviderPropertyenvironmentoptionaltyping.Union[IResolvable, HarnessEnvironmentProviderProperty]environmentoptionalIResolvableEnvironmentoptionalIResolvableEnvironmentoptionalinterface{}#environmentArtifactoptionalIResolvable | CfnHarness.HarnessEnvironmentArtifactPropertyenvironment_artifactoptionaltyping.Union[IResolvable, HarnessEnvironmentArtifactProperty]environmentArtifactoptionalIResolvableEnvironmentArtifactoptionalIResolvableEnvironmentArtifactoptionalinterface{}#environmentVariablesoptionalIResolvable | { [key: string]: string }environment_variablesoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]environmentVariablesoptionalIResolvableEnvironmentVariablesoptionalIResolvableEnvironmentVariablesoptionalinterface{}#executionRoleArnstringexecution_role_arnstrexecutionRoleArnStringExecutionRoleArnstringExecutionRoleArn*stringrequired#hooksoptionalIResolvable | IResolvable | CfnHarness.HarnessHookProperty[]hooksoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HarnessHookProperty]]]hooksoptionalIResolvableHooksoptionalIResolvableHooksoptionalinterface{}#maxIterationsoptionalnumbermax_iterationsoptionalint | floatmaxIterationsoptionalNumberMaxIterationsoptionaldoubleMaxIterationsoptional*float64#maxTokensoptionalnumbermax_tokensoptionalint | floatmaxTokensoptionalNumberMaxTokensoptionaldoubleMaxTokensoptional*float64#memoryoptionalIResolvable | CfnHarness.HarnessMemoryConfigurationPropertymemoryoptionaltyping.Union[IResolvable, HarnessMemoryConfigurationProperty]memoryoptionalIResolvableMemoryoptionalIResolvableMemoryoptionalinterface{}#modelIResolvable | CfnHarness.HarnessModelConfigurationPropertymodeltyping.Union[IResolvable, HarnessModelConfigurationProperty]modelIResolvableModelIResolvableModelinterface{}required#skillsoptionalIResolvable | IResolvable | CfnHarness.HarnessSkillProperty[]skillsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HarnessSkillProperty]]]skillsoptionalIResolvableSkillsoptionalIResolvableSkillsoptionalinterface{}#systemPromptoptionalIResolvable | IResolvable | CfnHarness.HarnessSystemContentBlockProperty[]system_promptoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HarnessSystemContentBlockProperty]]]systemPromptoptionalIResolvableSystemPromptoptionalIResolvableSystemPromptoptionalinterface{}#tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#timeoutSecondsoptionalnumbertimeout_secondsoptionalint | floattimeoutSecondsoptionalNumberTimeoutSecondsoptionaldoubleTimeoutSecondsoptional*float64#toolsoptionalIResolvable | IResolvable | CfnHarness.HarnessToolProperty[]toolsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HarnessToolProperty]]]toolsoptionalIResolvableToolsoptionalIResolvableToolsoptionalinterface{}#truncationoptionalIResolvable | CfnHarness.HarnessTruncationConfigurationPropertytruncationoptionaltyping.Union[IResolvable, HarnessTruncationConfigurationProperty]truncationoptionalIResolvableTruncationoptionalIResolvableTruncationoptionalinterface{}#Properties
allowedToolsmay be undefinedstring[]allowed_toolsmay be undefinedtyping.List[str]allowedToolsmay be undefinedList<String>AllowedToolsmay be undefinedstring[]AllowedToolsmay be undefined*[]*string#attrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeArnstringattr_environment_agent_core_runtime_environment_agent_runtime_arnstrattrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeArnStringAttrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeArnstringAttrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeArn*string#attrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeIdstringattr_environment_agent_core_runtime_environment_agent_runtime_idstrattrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeIdStringAttrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeIdstringAttrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeId*string#attrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeNamestringattr_environment_agent_core_runtime_environment_agent_runtime_namestrattrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeNameStringAttrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeNamestringAttrEnvironmentAgentCoreRuntimeEnvironmentAgentRuntimeName*string#attrMemoryManagedMemoryConfigurationArnstringattr_memory_managed_memory_configuration_arnstrattrMemoryManagedMemoryConfigurationArnStringAttrMemoryManagedMemoryConfigurationArnstringAttrMemoryManagedMemoryConfigurationArn*string#Read-only, populated by the service.
Incremented on every successful update.
authorizerConfigurationmay be undefinedIResolvable | CfnHarness.AuthorizerConfigurationPropertyauthorizer_configurationmay be undefinedtyping.Union[IResolvable, AuthorizerConfigurationProperty]authorizerConfigurationmay be undefinedIResolvableAuthorizerConfigurationmay be undefinedIResolvableAuthorizerConfigurationmay be undefinedinterface{}#cdkTagManagerTagManagercdk_tag_managerTagManagercdkTagManagerTagManagerCdkTagManagerTagManagerCdkTagManagerTagManager#CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#cfnOptionsICfnResourceOptionscfn_optionsICfnResourceOptionscfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptions#cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string#environmentmay be undefinedIResolvable | CfnHarness.HarnessEnvironmentProviderPropertyenvironmentmay be undefinedtyping.Union[IResolvable, HarnessEnvironmentProviderProperty]environmentmay be undefinedIResolvableEnvironmentmay be undefinedIResolvableEnvironmentmay be undefinedinterface{}#environmentArtifactmay be undefinedIResolvable | CfnHarness.HarnessEnvironmentArtifactPropertyenvironment_artifactmay be undefinedtyping.Union[IResolvable, HarnessEnvironmentArtifactProperty]environmentArtifactmay be undefinedIResolvableEnvironmentArtifactmay be undefinedIResolvableEnvironmentArtifactmay be undefinedinterface{}#environmentVariablesmay be undefinedIResolvable | { [key: string]: string }environment_variablesmay be undefinedtyping.Union[IResolvable, typing.Mapping[str, str]]environmentVariablesmay be undefinedIResolvableEnvironmentVariablesmay be undefinedIResolvableEnvironmentVariablesmay be undefinedinterface{}#executionRoleArnstringexecution_role_arnstrexecutionRoleArnStringExecutionRoleArnstringExecutionRoleArn*string#harnessRefHarnessReferenceharness_refHarnessReferenceharnessRefHarnessReferenceHarnessRefHarnessReferenceHarnessRefHarnessReference#hooksmay be undefinedIResolvable | IResolvable | CfnHarness.HarnessHookProperty[]hooksmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HarnessHookProperty]]]hooksmay be undefinedIResolvableHooksmay be undefinedIResolvableHooksmay be undefinedinterface{}#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).
maxIterationsmay be undefinednumbermax_iterationsmay be undefinedint | floatmaxIterationsmay be undefinedNumberMaxIterationsmay be undefineddoubleMaxIterationsmay be undefined*float64#maxTokensmay be undefinednumbermax_tokensmay be undefinedint | floatmaxTokensmay be undefinedNumberMaxTokensmay be undefineddoubleMaxTokensmay be undefined*float64#memorymay be undefinedIResolvable | CfnHarness.HarnessMemoryConfigurationPropertymemorymay be undefinedtyping.Union[IResolvable, HarnessMemoryConfigurationProperty]memorymay be undefinedIResolvableMemorymay be undefinedIResolvableMemorymay be undefinedinterface{}#modelIResolvable | CfnHarness.HarnessModelConfigurationPropertymodeltyping.Union[IResolvable, HarnessModelConfigurationProperty]modelIResolvableModelIResolvableModelinterface{}#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 }).
skillsmay be undefinedIResolvable | IResolvable | CfnHarness.HarnessSkillProperty[]skillsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HarnessSkillProperty]]]skillsmay be undefinedIResolvableSkillsmay be undefinedIResolvableSkillsmay be undefinedinterface{}#CfnElements must be defined within a stack scope (directly or indirectly).
systemPromptmay be undefinedIResolvable | IResolvable | CfnHarness.HarnessSystemContentBlockProperty[]system_promptmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HarnessSystemContentBlockProperty]]]systemPromptmay be undefinedIResolvableSystemPromptmay be undefinedIResolvableSystemPromptmay be undefinedinterface{}#tagsmay be undefinedCfnTag[]tagsmay be undefinedtyping.List[CfnTag]tagsmay be undefinedList<CfnTag>Tagsmay be undefinedCfnTag[]Tagsmay be undefined*[]CfnTag#timeoutSecondsmay be undefinednumbertimeout_secondsmay be undefinedint | floattimeoutSecondsmay be undefinedNumberTimeoutSecondsmay be undefineddoubleTimeoutSecondsmay be undefined*float64#toolsmay be undefinedIResolvable | IResolvable | CfnHarness.HarnessToolProperty[]toolsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HarnessToolProperty]]]toolsmay be undefinedIResolvableToolsmay be undefinedIResolvableToolsmay be undefinedinterface{}#truncationmay be undefinedIResolvable | CfnHarness.HarnessTruncationConfigurationPropertytruncationmay be undefinedtyping.Union[IResolvable, HarnessTruncationConfigurationProperty]truncationmay be undefinedIResolvableTruncationmay be undefinedIResolvableTruncationmay be undefinedinterface{}#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)#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#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#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{})#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{})#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,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"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)#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{})#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)#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)#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)#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:
arnForHarness(resource: IHarnessRef): string@staticmethod def arn_for_harness(resource: IHarnessRef) -> strpublic static String arnForHarness(IHarnessRef resource)public static string ArnForHarness(IHarnessRef resource)func ArnForHarness(Resource IHarnessRef) *stringstatic#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#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#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{}#inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#1 parameter
Parameters
inspectorinspectorinspectorinspectorInspector— tree inspector to collect and process attributes.
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{}) *boolstatic#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.
isCfnHarness(x: any): boolean@staticmethod def is_cfn_harness(x: Any) -> boolpublic static Boolean isCfnHarness(Object x)public static bool IsCfnHarness(object x)func IsCfnHarness(X interface{}) *boolstatic#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{}) *boolstatic#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{}) *boolstatic#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{}#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)#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#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)#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)#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
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#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.