class PromptBase
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Bedrock.Alpha.PromptBase |
![]() | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#PromptBase |
![]() | software.amazon.awscdk.services.bedrock.alpha.PromptBase |
![]() | aws_cdk.aws_bedrock_alpha.PromptBase |
![]() | @aws-cdk/aws-bedrock-alpha ยป PromptBase |
Implements
IConstruct
, IDependable
, IResource
, IPrompt
Extends
Resource
Implemented by
Prompt
Abstract base class for a Prompt.
Contains methods and attributes valid for Prompts either created with CDK or imported.
Initializer
new PromptBase(scope: Construct, id: string, props?: ResourceProps)
Parameters
- scope
Construct
- id
string
- props
Resource
Props
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
prompt | string | The ARN of the prompt. |
prompt | string | The ID of the prompt. |
prompt | string | The version of the prompt. |
stack | Stack | The stack in which this resource is defined. |
kms | IKey | Optional KMS encryption key associated with this prompt. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Node
The tree node.
promptArn
Type:
string
The ARN of the prompt.
promptId
Type:
string
The ID of the prompt.
promptVersion
Type:
string
The version of the prompt.
stack
Type:
Stack
The stack in which this resource is defined.
kmsKey?
Type:
IKey
(optional)
Optional KMS encryption key associated with this prompt.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
grant | Grant the given identity permissions to get the prompt. |
to | Returns a string representation of this construct. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
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
).
grantGet(grantee)
public grantGet(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
โ - The IAM principal to grant permissions to.
Returns
Grant the given identity permissions to get the prompt.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.