class InferenceProfileBase
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Bedrock.Alpha.InferenceProfileBase |
![]() | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#InferenceProfileBase |
![]() | software.amazon.awscdk.services.bedrock.alpha.InferenceProfileBase |
![]() | aws_cdk.aws_bedrock_alpha.InferenceProfileBase |
![]() | @aws-cdk/aws-bedrock-alpha ยป InferenceProfileBase |
Implements
IConstruct
, IDependable
, IResource
, IInference
Extends
Resource
Implemented by
Application
Abstract base class for an Inference Profile.
Contains methods and attributes valid for Inference Profiles either created with CDK or imported.
Initializer
new InferenceProfileBase(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. |
inference | string | The ARN of the inference profile. |
inference | string | The unique identifier of the inference profile. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
type | Inference | The type of inference profile (SYSTEM_DEFINED or APPLICATION). |
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.
inferenceProfileArn
Type:
string
The ARN of the inference profile.
inferenceProfileId
Type:
string
The unique identifier of the inference profile.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
type
Type:
Inference
The type of inference profile (SYSTEM_DEFINED or APPLICATION).
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
grant | Grants appropriate permissions to use the inference profile. |
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
).
grantProfileUsage(grantee)
public grantProfileUsage(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
โ - The IAM principal to grant permissions to.
Returns
Grants appropriate permissions to use the inference profile.
Each profile type requires different permissions based on its usage pattern:
- Application profiles need bedrock:InvokeModel for direct invocation
- Cross-region profiles need bedrock:InvokeModel* for routing capabilities
Note: This does not grant permissions to use the underlying model in the profile. For comprehensive model invocation permissions, use the grantInvoke method instead.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.