UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

568 lines (567 loc) 21.8 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 [cases](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnectcases.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Cases extends PolicyStatement { servicePrefix: string; /** * Grants permission to retrieve information about the case rules in the case domain * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_BatchGetCaseRule.html */ toBatchGetCaseRule(): this; /** * Grants permission to retrieve information about the fields in the case domain * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_BatchGetField.html */ toBatchGetField(): this; /** * Grants permission to update the field options in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_BatchPutFieldOptions.html */ toBatchPutFieldOptions(): this; /** * Grants permission to create a case in the case domain * * Access Level: Write * * Possible conditions: * - .ifConnectUserArn() * * https://docs.aws.amazon.com/cases/latest/APIReference/API_CreateCase.html */ toCreateCase(): this; /** * Grants permission to create a case rule in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_CreateCaseRule.html */ toCreateCaseRule(): this; /** * Grants permission to create a new case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_CreateDomain.html */ toCreateDomain(): this; /** * Grants permission to create a field in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_CreateField.html */ toCreateField(): this; /** * Grants permission to create a layout in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_CreateLayout.html */ toCreateLayout(): this; /** * Grants permission to create a related item associated to a case in the case domain * * Access Level: Write * * Possible conditions: * - .ifConnectUserArn() * * https://docs.aws.amazon.com/cases/latest/APIReference/API_CreateRelatedItem.html */ toCreateRelatedItem(): this; /** * Grants permission to create a template in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_CreateTemplate.html */ toCreateTemplate(): this; /** * Grants permission to delete the case in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_DeleteCase.html */ toDeleteCase(): this; /** * Grants permission to delete the case rule in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_DeleteCaseRule.html */ toDeleteCaseRule(): this; /** * Grants permission to delete the domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_DeleteDomain.html */ toDeleteDomain(): this; /** * Grants permission to delete the field in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_DeleteField.html */ toDeleteField(): this; /** * Grants permission to delete the layout in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_DeleteLayout.html */ toDeleteLayout(): this; /** * Grants permission to delete the related item associated to the case in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_DeleteRelatedItem.html */ toDeleteRelatedItem(): this; /** * Grants permission to delete the template in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_DeleteTemplate.html */ toDeleteTemplate(): this; /** * Grants permission to retrieve information about a case in the case domain * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_GetCase.html */ toGetCase(): this; /** * Grants permission to view audit history of a case * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_GetCaseAuditEvents.html */ toGetCaseAuditEvents(): this; /** * Grants permission to retrieve information about the case event configuraton in the case domain * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_GetCaseEventConfiguration.html */ toGetCaseEventConfiguration(): this; /** * Grants permission to retrieve information about the case domain * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_GetDomain.html */ toGetDomain(): this; /** * Grants permission to retrieve information about the layout in the case domain * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_GetLayout.html */ toGetLayout(): this; /** * Grants permission to retrieve information about the template in the case domain * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_GetTemplate.html */ toGetTemplate(): this; /** * Grants permission to list case rules in the case domain * * Access Level: List * * https://docs.aws.amazon.com/cases/latest/APIReference/API_ListCaseRules.html */ toListCaseRules(): this; /** * Grants permission to list cases for a specific contact in the case domain * * Access Level: List * * https://docs.aws.amazon.com/cases/latest/APIReference/API_ListCasesForContact.html */ toListCasesForContact(): this; /** * Grants permission to list all domains in the aws account * * Access Level: List * * https://docs.aws.amazon.com/cases/latest/APIReference/API_ListDomains.html */ toListDomains(): this; /** * Grants permission to list field options for a single select field in the case domain * * Access Level: List * * https://docs.aws.amazon.com/cases/latest/APIReference/API_ListFieldOptions.html */ toListFieldOptions(): this; /** * Grants permission to list fields in the case domain * * Access Level: List * * https://docs.aws.amazon.com/cases/latest/APIReference/API_ListFields.html */ toListFields(): this; /** * Grants permission to list layouts in the case domain * * Access Level: List * * https://docs.aws.amazon.com/cases/latest/APIReference/API_ListLayouts.html */ toListLayouts(): this; /** * Grants permission to list the tags for the specified resource * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to list templates in the case domain * * Access Level: List * * https://docs.aws.amazon.com/cases/latest/APIReference/API_ListTemplates.html */ toListTemplates(): this; /** * Grants permission to insert or update the case event configuration in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_PutCaseEventConfiguration.html */ toPutCaseEventConfiguration(): this; /** * Grants permission to search for related items in the case domain * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_SearchAllRelatedItems.html */ toSearchAllRelatedItems(): this; /** * Grants permission to search for cases in the case domain * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_SearchCases.html */ toSearchCases(): this; /** * Grants permission to search for related items associated to the case in the case domain * * Access Level: Read * * https://docs.aws.amazon.com/cases/latest/APIReference/API_SearchRelatedItems.html */ toSearchRelatedItems(): this; /** * Grants permission to add the specified tags to the specified resource * * Access Level: Tagging * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cases/latest/APIReference/API_TagResource.html */ toTagResource(): this; /** * Grants permission to remove the specified tags from the specified resource * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cases/latest/APIReference/API_UntagResource.html */ toUntagResource(): this; /** * Grants permission to update the field values on the case in the case domain * * Access Level: Write * * Possible conditions: * - .ifConnectUserArn() * * https://docs.aws.amazon.com/cases/latest/APIReference/API_UpdateCase.html */ toUpdateCase(): this; /** * Grants permission to update the case rule in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_UpdateCaseRule.html */ toUpdateCaseRule(): this; /** * Grants permission to update the field in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_UpdateField.html */ toUpdateField(): this; /** * Grants permission to update the layout in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_UpdateLayout.html */ toUpdateLayout(): this; /** * Grants permission to update a related item associated to a case in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_UpdateRelatedItem.html */ toUpdateRelatedItem(): this; /** * Grants permission to update the template in the case domain * * Access Level: Write * * https://docs.aws.amazon.com/cases/latest/APIReference/API_UpdateTemplate.html */ toUpdateTemplate(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type Case to the statement * * https://docs.aws.amazon.com/connect/latest/adminguide/cases.html * * @param domainId - Identifier for the domainId. * @param caseId - Identifier for the caseId. * @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() */ onCase(domainId: string, caseId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type Domain to the statement * * https://docs.aws.amazon.com/connect/latest/adminguide/cases.html * * @param domainId - Identifier for the domainId. * @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() */ onDomain(domainId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type Field to the statement * * https://docs.aws.amazon.com/connect/latest/adminguide/case-fields.html * * @param domainId - Identifier for the domainId. * @param fieldId - Identifier for the fieldId. * @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() */ onField(domainId: string, fieldId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type Layout to the statement * * https://docs.aws.amazon.com/connect/latest/adminguide/case-layouts.html * * @param domainId - Identifier for the domainId. * @param layoutId - Identifier for the layoutId. * @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() */ onLayout(domainId: string, layoutId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type RelatedItem to the statement * * https://docs.aws.amazon.com/connect/latest/adminguide/associatecontactandcase.html * * @param domainId - Identifier for the domainId. * @param caseId - Identifier for the caseId. * @param relatedItemId - Identifier for the relatedItemId. * @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() * - .ifCreatedBy() * - .ifRelatedItemType() */ onRelatedItem(domainId: string, caseId: string, relatedItemId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type Template to the statement * * https://docs.aws.amazon.com/connect/latest/adminguide/case-templates.html * * @param domainId - Identifier for the domainId. * @param templateId - Identifier for the templateId. * @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() */ onTemplate(domainId: string, templateId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type CaseRule to the statement * * https://docs.aws.amazon.com/connect/latest/adminguide/case-rules.html * * @param domainId - Identifier for the domainId. * @param caseRuleId - Identifier for the caseRuleId. * @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() */ onCaseRule(domainId: string, caseRuleId: string, account?: string, region?: string, partition?: string): this; /** * Filters access by 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: * - .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 tags associated with the resource * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag * * Applies to resource types: * - Case * - Domain * - Field * - Layout * - RelatedItem * - Template * - CaseRule * * @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 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: * - .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 who created the the resource (user ARN or custom entity) * * https://docs.aws.amazon.com/connect/latest/adminguide/security_iam_service-with-iam.html * * Applies to resource types: * - RelatedItem * * @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` */ ifCreatedBy(value: string | string[], operator?: Operator | string): this; /** * Filters access by the type of related item. Possible values: Contact, Comment, File, Sla, ConnectCase, Custom * * https://docs.aws.amazon.com/connect/latest/adminguide/security_iam_service-with-iam.html * * Applies to resource types: * - RelatedItem * * @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` */ ifRelatedItemType(value: string | string[], operator?: Operator | string): this; /** * Filters access by connect's UserArn * * https://docs.aws.amazon.com/connect/latest/APIReference/API_User.html * * Applies to actions: * - .toCreateCase() * - .toCreateRelatedItem() * - .toUpdateCase() * * @param value The value(s) to check * @param operator Works with [arn operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_ARN). **Default:** `ArnLike` */ ifConnectUserArn(value: string | string[], operator?: Operator | string): this; /** * Statement provider for service [cases](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnectcases.html). * */ constructor(props?: iam.PolicyStatementProps); }