Class ApplicationInferenceProfile

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.bedrock.alpha.InferenceProfileBase
software.amazon.awscdk.services.bedrock.alpha.ApplicationInferenceProfile
All Implemented Interfaces:
IResource, IBedrockInvokable, IInferenceProfile, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-09-02T11:25:42.770Z") @Stability(Experimental) public class ApplicationInferenceProfile extends InferenceProfileBase implements IBedrockInvokable
(experimental) Class to create an Application Inference Profile with CDK.

These are inference profiles created by users (user defined). This helps to track costs and model usage.

Application inference profiles are user-defined profiles that help you track costs and model usage. They can be created for a single region or for multiple regions using a cross-region inference profile.

Example:

 // Create a cross-region inference profile
 CrossRegionInferenceProfile crossRegionProfile = CrossRegionInferenceProfile.fromConfig(CrossRegionInferenceProfileProps.builder()
         .geoRegion(CrossRegionInferenceProfileRegion.US)
         .model(BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V2_0)
         .build());
 // Create an application inference profile across regions
 ApplicationInferenceProfile appProfile = ApplicationInferenceProfile.Builder.create(this, "MyMultiRegionProfile")
         .applicationInferenceProfileName("claude-35-sonnet-v2-multi-region")
         .modelSource(crossRegionProfile)
         .description("Multi-region application profile for cost tracking")
         .build();
 

See Also:
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Experimental) public static final String PROPERTY_INJECTION_ID
      (experimental) Uniquely identifies this class.
  • Constructor Details

    • ApplicationInferenceProfile

      protected ApplicationInferenceProfile(software.amazon.jsii.JsiiObjectRef objRef)
    • ApplicationInferenceProfile

      protected ApplicationInferenceProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ApplicationInferenceProfile

      @Stability(Experimental) public ApplicationInferenceProfile(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ApplicationInferenceProfileProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromApplicationInferenceProfileAttributes

      @Stability(Experimental) @NotNull public static IInferenceProfile fromApplicationInferenceProfileAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ApplicationInferenceProfileAttributes attrs)
      (experimental) Import an Application Inference Profile given its attributes.

      Parameters:
      scope -
      • The construct scope.
      This parameter is required.
      id -
      • Identifier of the construct.
      This parameter is required.
      attrs -
      • Attributes of the existing application inference profile.
      This parameter is required.
      Returns:
      An IInferenceProfile reference to the existing application inference profile
    • fromCfnApplicationInferenceProfile

      @Stability(Experimental) @NotNull public static IInferenceProfile fromCfnApplicationInferenceProfile(@NotNull CfnApplicationInferenceProfile cfnApplicationInferenceProfile)
      (experimental) Import a low-level L1 Cfn Application Inference Profile.

      Parameters:
      cfnApplicationInferenceProfile -
      • The L1 CfnApplicationInferenceProfile to import.
      This parameter is required.
      Returns:
      An IInferenceProfile reference to the imported application inference profile
    • grantInvoke

      @Stability(Experimental) @NotNull public Grant grantInvoke(@NotNull IGrantable grantee)
      (experimental) Gives the appropriate policies to invoke and use the application inference profile.

      This method ensures the appropriate permissions are given to use either the inference profile or the underlying foundation model/cross-region profile.

      Specified by:
      grantInvoke in interface IBedrockInvokable
      Parameters:
      grantee -
      • The IAM principal to grant permissions to.
      This parameter is required.
      Returns:
      An IAM Grant object representing the granted permissions
    • grantProfileUsage

      @Stability(Experimental) @NotNull public Grant grantProfileUsage(@NotNull IGrantable grantee)
      (experimental) Grants appropriate permissions to use the application inference profile (AIP).

      This method adds the necessary IAM permissions to allow the grantee to:

      • Get inference profile details (bedrock:GetInferenceProfile)
      • Invoke the model through the inference profile (bedrock:InvokeModel)

      Note: This does not grant permissions to use the underlying model/cross-region profile in the AIP. For comprehensive permissions, use grantInvoke() instead.

      Specified by:
      grantProfileUsage in interface IInferenceProfile
      Specified by:
      grantProfileUsage in class InferenceProfileBase
      Parameters:
      grantee -
      • The IAM principal to grant permissions to.
      This parameter is required.
      Returns:
      An IAM Grant object representing the granted permissions
    • getCreatedAt

      @Stability(Experimental) @NotNull public String getCreatedAt()
      (experimental) Time Stamp for Application Inference Profile creation.
    • getInferenceProfileArn

      @Stability(Experimental) @NotNull public String getInferenceProfileArn()
      (experimental) The ARN of the application inference profile.
      Specified by:
      getInferenceProfileArn in interface IInferenceProfile
      Specified by:
      getInferenceProfileArn in class InferenceProfileBase
    • getInferenceProfileId

      @Stability(Experimental) @NotNull public String getInferenceProfileId()
      (experimental) The unique identifier of the application inference profile.
      Specified by:
      getInferenceProfileId in interface IInferenceProfile
      Specified by:
      getInferenceProfileId in class InferenceProfileBase
    • getInferenceProfileModel

      @Stability(Experimental) @NotNull public IBedrockInvokable getInferenceProfileModel()
      (experimental) The underlying model/cross-region model used by the application inference profile.
    • getInferenceProfileName

      @Stability(Experimental) @NotNull public String getInferenceProfileName()
      (experimental) The name of the application inference profile.
    • getInvokableArn

      @Stability(Experimental) @NotNull public String getInvokableArn()
      (experimental) The ARN used for invoking this inference profile.

      This equals to the inferenceProfileArn property, useful for implementing IBedrockInvokable interface.

      Specified by:
      getInvokableArn in interface IBedrockInvokable
    • getStatus

      @Stability(Experimental) @NotNull public String getStatus()
      (experimental) The status of the application inference profile.

      ACTIVE means that the inference profile is ready to be used.

    • getType

      @Stability(Experimental) @NotNull public InferenceProfileType getType()
      (experimental) The type of the inference profile.

      Always APPLICATION for application inference profiles.

      Specified by:
      getType in interface IInferenceProfile
      Specified by:
      getType in class InferenceProfileBase
    • getUpdatedAt

      @Stability(Experimental) @NotNull public String getUpdatedAt()
      (experimental) Time Stamp for Application Inference Profile update.