Skip to content
v2.278.0

Experimental

@aws-cdk/aws-bedrock-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

PromptGenAiResource Class ​

Abstract base class for prompt GenAI resource configurations.

This provides a high-level abstraction over the underlying CloudFormation GenAI resource properties, offering a more developer-friendly interface while maintaining full compatibility with the underlying AWS Bedrock service.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_alpha from '@aws-cdk/aws-bedrock-alpha';

declare const agentAlias: bedrock_alpha.AgentAlias;
const promptGenAiResource = bedrock_alpha.PromptGenAiResource.agent({
  agentAlias: agentAlias,
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_alpha as bedrock_alpha

# agent_alias: bedrock_alpha.AgentAlias

prompt_gen_ai_resource = bedrock_alpha.PromptGenAiResource.agent(
    agent_alias=agent_alias
)
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.alpha.*;

AgentAlias agentAlias;

PromptGenAiResource promptGenAiResource = PromptGenAiResource.agent(AgentGenAiResourceProps.builder()
        .agentAlias(agentAlias)
        .build());
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Alpha;

AgentAlias agentAlias;

var promptGenAiResource = PromptGenAiResource.Agent(new AgentGenAiResourceProps {
    AgentAlias = agentAlias
});
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_alpha "github.com/aws/aws-cdk-go/awsbedrockalpha"

var agentAlias AgentAlias

promptGenAiResource := bedrock_alpha.PromptGenAiResource_Agent(&AgentGenAiResourceProps{
	AgentAlias: agentAlias,
})

Initializer ​

ts
new PromptGenAiResource()
python
PromptGenAiResource()
java
new PromptGenAiResource()
csharp
new PromptGenAiResource()
go
NewPromptGenAiResource()

Methods ​

agent(props: AgentGenAiResourceProps): PromptGenAiResource // chainable@staticmethod def agent(props: AgentGenAiResourceProps) -> PromptGenAiResourcepublic static PromptGenAiResource agent(AgentGenAiResourceProps props)public static PromptGenAiResource Agent(AgentGenAiResourceProps props)func Agent(Props AgentGenAiResourceProps) PromptGenAiResource static #
Creates an agent GenAI resource configuration.