@aws-cdk/aws-bedrock-agentcore-alpha
Version:
The CDK Construct Library for Amazon Bedrock
71 lines (70 loc) • 2.66 kB
TypeScript
import { IResolvable } from 'aws-cdk-lib';
import { CfnGatewayTarget } from 'aws-cdk-lib/aws-bedrockagentcore';
import { ApiKeyCredentialProviderProps } from './api-key';
import { OAuthConfiguration } from './oauth';
import { Grant, IRole } from 'aws-cdk-lib/aws-iam';
/******************************************************************************
* Enums
*****************************************************************************/
/**
* Credential provider types supported by gateway target
*/
export declare enum CredentialProviderType {
/**
* API Key authentication
*/
API_KEY = "API_KEY",
/**
* OAuth authentication
*/
OAUTH = "OAUTH",
/**
* IAM role authentication
*/
GATEWAY_IAM_ROLE = "GATEWAY_IAM_ROLE"
}
/******************************************************************************
* Credential Provider
*****************************************************************************/
/**
* Abstract interface for gateway credential provider configuration
*/
export interface ICredentialProviderConfig {
/**
* The credential provider type
*/
readonly credentialProviderType: CredentialProviderType;
/**
* Renders as CFN Property
* @internal
*/
_render(): CfnGatewayTarget.CredentialProviderConfigurationProperty | IResolvable;
/**
* Grant the role the permissions
*/
grantNeededPermissionsToRole(role: IRole): Grant | undefined;
}
/**
* Factory class for creating different Gateway Credential Providers
*/
export declare abstract class GatewayCredentialProvider {
/**
* Create an API key credential provider from Identity ARN
* Use this method when you have the Identity ARN as a string
* @param props - The configuration properties for the API key credential provider
* @returns ICredentialProviderConfig configured for API key authentication
*/
static fromApiKeyIdentityArn(props: ApiKeyCredentialProviderProps): ICredentialProviderConfig;
/**
* Create an OAuth credential provider from Identity ARN
* Use this method when you have the Identity ARN as a string
* @param props - The configuration properties for the OAuth credential provider
* @returns ICredentialProviderConfig configured for OAuth authentication
*/
static fromOauthIdentityArn(props: OAuthConfiguration): ICredentialProviderConfig;
/**
* Create an IAM role credential provider
* @returns IIamRoleCredentialProvider configured for IAM role authentication
*/
static fromIamRole(): ICredentialProviderConfig;
}