cdk-iam-floyd
Version:
AWS IAM policy statement generator with fluent interface for AWS CDK
564 lines (563 loc) • 21.1 kB
TypeScript
import { AccessLevelList } from '../../shared/access-level';
import { PolicyStatement, Operator } from '../../shared';
import { aws_iam as iam } from "aws-cdk-lib";
/**
* Statement provider for service [bedrock-mantle](https://docs.aws.amazon.com/service-authorization/latest/reference/list_bedrock-mantle.html).
*
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
*/
export declare class BedrockMantle extends PolicyStatement {
servicePrefix: string;
/**
* Grants permission to archive a specific project
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toArchiveProject(): this;
/**
* Grants permission to associate a customized model with a project
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toAssociateCustomizedModel(): this;
/**
* Grants permission to cancel an in-progress fine tuning job
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toCancelFineTuningJob(): this;
/**
* Grants permission to cancel an in-progress inference request
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toCancelInference(): this;
/**
* Grants permission to import a customized model with custom weights
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toCreateCustomizedModel(): this;
/**
* Grants permission to create a file in a project
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toCreateFile(): this;
/**
* Grants permission to create a fine tuning job
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toCreateFineTuningJob(): this;
/**
* Grants permission to create a chat completion inference request
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toCreateInference(): this;
/**
* Grants permission to create a project
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toCreateProject(): this;
/**
* Grants permission to create a capacity reservation for a model
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toCreateReservation(): this;
/**
* Grants permission to delete a customized model
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toDeleteCustomizedModel(): this;
/**
* Grants permission to delete a specific file
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toDeleteFile(): this;
/**
* Grants permission to delete a specific inference request
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toDeleteInference(): this;
/**
* Grants permission to delete a capacity reservation
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toDeleteReservation(): this;
/**
* Grants permission to disassociate a customized model from a project
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toDisassociateCustomizedModel(): this;
/**
* Grants permission to retrieve the account-wide data retention setting
*
* Access Level: Read
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toGetAccountDataRetention(): this;
/**
* Grants permission to get customized model
*
* Access Level: Read
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toGetCustomizedModel(): this;
/**
* Grants permission to retrieve information about a specific file
*
* Access Level: Read
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toGetFile(): this;
/**
* Grants permission to retrieve details of a specific fine tuning job
*
* Access Level: Read
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toGetFineTuningJob(): this;
/**
* Grants permission to retrieve details of a specific inference request
*
* Access Level: Read
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toGetInference(): this;
/**
* Grants permission to retrieve information about a specific model
*
* Access Level: Read
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toGetModel(): this;
/**
* Grants permission to retrieve details of a specific project
*
* Access Level: Read
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toGetProject(): this;
/**
* Grants permission to get reservation
*
* Access Level: Read
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toGetReservation(): this;
/**
* Grants permission to list project associations for a customized model
*
* Access Level: List
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toListCustomizedModelAssociations(): this;
/**
* Grants permission to list customized models
*
* Access Level: List
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toListCustomizedModels(): this;
/**
* Grants permission to list all available files in a project
*
* Access Level: List
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toListFiles(): this;
/**
* Grants permission to list all available fine tuning jobs in a project
*
* Access Level: List
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toListFineTuningJobs(): this;
/**
* Grants permission to list all available models in a project
*
* Access Level: List
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toListModels(): this;
/**
* Grants permission to list projects
*
* Access Level: List
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toListProjects(): this;
/**
* Grants permission to list reservations
*
* Access Level: List
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toListReservations(): this;
/**
* Grants permission to list tags for a resource
*
* Access Level: Read
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toListTagsForResource(): this;
/**
* Grants permission to set the account-wide data retention setting
*
* Access Level: Write
*
* Possible conditions:
* - .ifDataRetentionMode()
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toPutAccountDataRetention(): this;
/**
* Grants permission to tag a resource
*
* Access Level: Tagging, Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toTagResource(): this;
/**
* Grants permission to untag a resource
*
* Access Level: Tagging, Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toUntagResource(): this;
/**
* Grants permission to update a specific project
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toUpdateProject(): this;
/**
* Grants permission to update reservation
*
* Access Level: Write
*
* https://docs.aws.amazon.com/bedrock/latest/APIReference/#welcome
*/
toUpdateReservation(): this;
/**
* Grants permission to make API calls using bearer token authentication
*
* Access Level: List
*
* Possible conditions:
* - .ifBearerTokenType()
*/
toCallWithBearerToken(): this;
protected accessLevelList: AccessLevelList;
/**
* Adds a resource of type customized-model to the statement
*
* https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html#CustomizedModel
*
* @param resourceId - Identifier for the resourceId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onCustomizedModel(resourceId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type project to the statement
*
* https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html#Project
*
* @param resourceId - Identifier for the resourceId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onProject(resourceId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type reservation to the statement
*
* https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html#Reservation
*
* @param resourceId - Identifier for the resourceId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onReservation(resourceId: string, account?: string, region?: string, partition?: string): this;
/**
* Filters access by the tags that are passed in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag
*
* Applies to actions:
* - .toCreateCustomizedModel()
* - .toCreateProject()
* - .toCreateReservation()
* - .toTagResource()
*
* @param tagKey The tag key to check
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifAwsRequestTag(tagKey: string, value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the tags associated with the resource
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag
*
* Applies to actions:
* - .toArchiveProject()
* - .toAssociateCustomizedModel()
* - .toCancelFineTuningJob()
* - .toCancelInference()
* - .toCreateCustomizedModel()
* - .toCreateFile()
* - .toCreateFineTuningJob()
* - .toCreateInference()
* - .toCreateProject()
* - .toCreateReservation()
* - .toDeleteCustomizedModel()
* - .toDeleteFile()
* - .toDeleteInference()
* - .toDeleteReservation()
* - .toDisassociateCustomizedModel()
* - .toGetCustomizedModel()
* - .toGetFile()
* - .toGetFineTuningJob()
* - .toGetInference()
* - .toGetModel()
* - .toGetProject()
* - .toGetReservation()
* - .toListCustomizedModelAssociations()
* - .toListCustomizedModels()
* - .toListFiles()
* - .toListFineTuningJobs()
* - .toListModels()
* - .toListProjects()
* - .toListReservations()
* - .toListTagsForResource()
* - .toTagResource()
* - .toUntagResource()
* - .toUpdateProject()
* - .toUpdateReservation()
*
* Applies to resource types:
* - customized-model
* - project
* - reservation
*
* @param tagKey The tag key to check
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifAwsResourceTag(tagKey: string, value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the tag keys that are passed in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys
*
* Applies to actions:
* - .toCreateCustomizedModel()
* - .toCreateProject()
* - .toCreateReservation()
* - .toTagResource()
* - .toUntagResource()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifAwsTagKeys(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the Short-term or Long-term bearer tokens
*
* https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrockmantle.html#amazonbedrockmantle-policy-keys
*
* Applies to actions:
* - .toCallWithBearerToken()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifBearerTokenType(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the ARN of the customized model being associated or referenced in cross-resource operations
*
* https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrockmantle.html#amazonbedrockmantle-policy-keys
*
* Applies to actions:
* - .toAssociateCustomizedModel()
* - .toDisassociateCustomizedModel()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifCustomizedModelArn(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the data retention mode being set on a project or account
*
* https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrockmantle.html#amazonbedrockmantle-policy-keys
*
* Applies to actions:
* - .toCreateProject()
* - .toPutAccountDataRetention()
* - .toUpdateProject()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifDataRetentionMode(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the specified file identifiers
*
* https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrockmantle.html#amazonbedrockmantle-policy-keys
*
* Applies to actions:
* - .toCreateFineTuningJob()
* - .toDeleteFile()
* - .toGetFile()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifFiles(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the specified fine-tuning job identifier
*
* https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrockmantle.html#amazonbedrockmantle-policy-keys
*
* Applies to actions:
* - .toCancelFineTuningJob()
* - .toGetFineTuningJob()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifFineTuningJob(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the specified Model
*
* https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrockmantle.html#amazonbedrockmantle-policy-keys
*
* Applies to actions:
* - .toCreateFineTuningJob()
* - .toCreateInference()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifModel(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the ARN of the project being associated or referenced in cross-resource operations
*
* https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrockmantle.html#amazonbedrockmantle-policy-keys
*
* Applies to actions:
* - .toAssociateCustomizedModel()
* - .toCreateReservation()
* - .toDeleteReservation()
* - .toDisassociateCustomizedModel()
* - .toUpdateReservation()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifProjectArn(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the ARN of the reservation being referenced in cross-resource operations
*
* https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrockmantle.html#amazonbedrockmantle-policy-keys
*
* Applies to actions:
* - .toCreateReservation()
* - .toDeleteReservation()
* - .toUpdateReservation()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifReservationArn(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the specified ServiceTier
*
* https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrockmantle.html#amazonbedrockmantle-policy-keys
*
* Applies to actions:
* - .toCreateInference()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifServiceTier(value: string | string[], operator?: Operator | string): this;
/**
* Statement provider for service [bedrock-mantle](https://docs.aws.amazon.com/service-authorization/latest/reference/list_bedrock-mantle.html).
*
*/
constructor(props?: iam.PolicyStatementProps);
}