UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

266 lines (265 loc) 10.6 kB
import { AccessLevelList } from '../../shared/access-level'; import { PolicyStatement, Operator } from '../../shared'; import { aws_iam as iam } from "aws-cdk-lib"; /** * Statement provider for service [agent-registry](https://docs.aws.amazon.com/service-authorization/latest/reference/list_agent-registry.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class AgentRegistry extends PolicyStatement { servicePrefix: string; /** * Grants permission to create a new registry * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_CreateRegistry.html */ toCreateRegistry(): this; /** * Grants permission to create a new registry record * * Access Level: Write * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_CreateRegistryRecord.html */ toCreateRegistryRecord(): this; /** * Grants permission to delete an existing registry * * Access Level: Write * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_DeleteRegistry.html */ toDeleteRegistry(): this; /** * Grants permission to delete an existing registry record * * Access Level: Write * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_DeleteRegistryRecord.html */ toDeleteRegistryRecord(): this; /** * Grants permission to retrieve an individual approved registry record. This is a permission-only action used for fine-grained access control with BatchGetApprovedRegistryRecord * * Access Level: Read * * https://docs.aws.amazon.com/agent-registry/latest/APIReference/API_BatchGetDiscoverableRegistryRecord.html */ toGetDiscoverableRegistryRecord(): this; /** * Grants permission to retrieve an existing registry * * Access Level: Read * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_GetRegistry.html */ toGetRegistry(): this; /** * Grants permission to retrieve an existing registry record * * Access Level: Read * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_GetRegistryRecord.html */ toGetRegistryRecord(): this; /** * Grants permission to invoke an MCP operation against an existing registry * * Access Level: Read * * https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/registry-mcp-endpoint.html */ toInvokeRegistryMcp(): this; /** * Grants permission to list approved registry records in a registry * * Access Level: List * * https://docs.aws.amazon.com/agent-registry/latest/APIReference/API_ListDiscoverableRegistryRecords.html */ toListDiscoverableRegistryRecords(): this; /** * Grants permission to list existing registries * * Access Level: List * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_ListRegistries.html */ toListRegistries(): this; /** * Grants permission to list existing registry records in a registry * * Access Level: List * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_ListRegistryRecords.html */ toListRegistryRecords(): this; /** * Grants permission to list tags for an Agent Registry resource * * Access Level: List * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to search for registry records * * Access Level: Read * * https://docs.aws.amazon.com/agent-registry/latest/APIReference/API_SearchDiscoverableRegistryRecords.html */ toSearchDiscoverableRegistryRecords(): this; /** * Grants permission to submit a registry record for approval * * Access Level: Write * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_SubmitRegistryRecordForApproval.html */ toSubmitRegistryRecordForApproval(): this; /** * Grants permission to tag an Agent Registry resource * * Access Level: Tagging, Write * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_TagResource.html */ toTagResource(): this; /** * Grants permission to untag an Agent Registry resource * * Access Level: Tagging, Write * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_UntagResource.html */ toUntagResource(): this; /** * Grants permission to update an existing registry * * Access Level: Write * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_UpdateRegistry.html */ toUpdateRegistry(): this; /** * Grants permission to update an existing registry record * * Access Level: Write * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_UpdateRegistryRecord.html */ toUpdateRegistryRecord(): this; /** * Grants permission to update the status of a registry record * * Access Level: Write * * https://docs.aws.amazon.com/agent-registry-control/latest/APIReference/API_UpdateRegistryRecordStatus.html */ toUpdateRegistryRecordStatus(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type registry to the statement * * https://docs.aws.amazon.com/agent-registry/latest/APIReference/registry.html * * @param registryId - Identifier for the registryId. * @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() */ onRegistry(registryId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type registry-record to the statement * * https://docs.aws.amazon.com/agent-registry/latest/APIReference/registryRecord.html * * @param registryId - Identifier for the registryId. * @param recordId - Identifier for the recordId. * @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() */ onRegistryRecord(registryId: string, recordId: string, account?: string, region?: string, partition?: string): this; /** * Filters access by creating requests based on the allowed set of values for each of the mandatory tags * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-globally-available * * Applies to actions: * - .toCreateRegistry() * - .toCreateRegistryRecord() * - .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 having actions based on the tag value associated with the resource * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-globally-available * * Applies to actions: * - .toCreateRegistryRecord() * - .toDeleteRegistry() * - .toDeleteRegistryRecord() * - .toGetDiscoverableRegistryRecord() * - .toGetRegistry() * - .toGetRegistryRecord() * - .toInvokeRegistryMcp() * - .toListDiscoverableRegistryRecords() * - .toListRegistryRecords() * - .toListTagsForResource() * - .toSearchDiscoverableRegistryRecords() * - .toSubmitRegistryRecordForApproval() * - .toTagResource() * - .toUntagResource() * - .toUpdateRegistry() * - .toUpdateRegistryRecord() * - .toUpdateRegistryRecordStatus() * * Applies to resource types: * - registry * - registry-record * * @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 creating requests based on the presence of mandatory tags in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-globally-available * * Applies to actions: * - .toCreateRegistry() * - .toCreateRegistryRecord() * - .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; /** * Statement provider for service [agent-registry](https://docs.aws.amazon.com/service-authorization/latest/reference/list_agent-registry.html). * */ constructor(props?: iam.PolicyStatementProps); }