UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

83 lines (82 loc) 2.89 kB
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance * with the License. A copy of the License is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions * and limitations under the License. */ import type { Construct } from 'constructs'; import type { IEvaluatorRef, EvaluatorReference as L1EvaluatorReference } from '../../../aws-bedrockagentcore'; import * as iam from '../../../aws-iam'; import { Resource, type IResource, type ResourceProps } from '../../../core'; /** * Interface for Evaluator resources. */ export interface IEvaluator extends IResource, IEvaluatorRef { /** * The ARN of the evaluator. * @attribute */ readonly evaluatorArn: string; /** * The unique identifier of the evaluator. * @attribute */ readonly evaluatorId: string; /** * The name of the evaluator. * @attribute */ readonly evaluatorName: string; /** * The lifecycle status of the evaluator (CREATING, ACTIVE, FAILED, DELETING). * @attribute */ readonly status?: string; /** * The timestamp when the evaluator was created. * @attribute */ readonly createdAt?: string; /** * The timestamp when the evaluator was last updated. * @attribute */ readonly updatedAt?: string; /** * Grant the given principal identity permissions to perform actions on this evaluator. */ grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant; } /** * Abstract base class for Evaluator. * Contains methods and attributes valid for evaluators either created with CDK or imported. */ export declare abstract class EvaluatorBase extends Resource implements IEvaluator { abstract readonly evaluatorArn: string; abstract readonly evaluatorId: string; abstract readonly evaluatorName: string; abstract readonly status?: string; abstract readonly createdAt?: string; abstract readonly updatedAt?: string; constructor(scope: Construct, id: string, props?: ResourceProps); /** * A reference to this Evaluator resource. */ get evaluatorRef(): L1EvaluatorReference; /** * Grants IAM actions to the IAM Principal. * * [disable-awslint:no-grants] * * @param grantee - The IAM principal to grant permissions to * @param actions - The actions to grant * @returns An IAM Grant object representing the granted permissions */ grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant; }