UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

191 lines (190 loc) 7.67 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 [supportauthz](https://docs.aws.amazon.com/service-authorization/latest/reference/list_supportauthz.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Supportauthz extends PolicyStatement { servicePrefix: string; /** * Grants permission to create a support permit * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_CreateSupportPermit.html */ toCreateSupportPermit(): this; /** * Grants permission to delete a support permit * * Access Level: Write * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_DeleteSupportPermit.html */ toDeleteSupportPermit(): this; /** * Grants permission to retrieve details about a support action * * Access Level: Read * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_GetAction.html */ toGetAction(): this; /** * Grants permission to retrieve a support permit * * Access Level: Read * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_GetSupportPermit.html */ toGetSupportPermit(): this; /** * Grants permission to list available support actions * * Access Level: List * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_ListActions.html */ toListActions(): this; /** * Grants permission to list support permit requests * * Access Level: List * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_ListSupportPermitRequests.html */ toListSupportPermitRequests(): this; /** * Grants permission to list support permits * * Access Level: List * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_ListSupportPermits.html */ toListSupportPermits(): this; /** * Grants permission to list tags for a resource * * Access Level: Read * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to reject a support permit request * * Access Level: Write * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_RejectSupportPermitRequest.html */ toRejectSupportPermitRequest(): this; /** * Grants permission to add tags to a resource * * Access Level: Tagging, Write * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_TagResource.html */ toTagResource(): this; /** * Grants permission to remove tags from a resource * * Access Level: Tagging, Write * * https://docs.aws.amazon.com/supportauthz/latest/APIReference/API_UntagResource.html */ toUntagResource(): this; /** * Grants permission to register a KMS key to use for a support permit * * Access Level: Write * * https://docs.aws.amazon.com/awssupport/latest/user/support-authorization-getting-started.html */ toRegisterKey(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type supportpermit to the statement * * https://docs.aws.amazon.com/awssupport/latest/user/support-authorization-permits.html * * @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() */ onSupportpermit(resourceId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type supportpermitrequest to the statement * * https://docs.aws.amazon.com/awssupport/latest/user/support-authorization-permit-requests.html * * @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. */ onSupportpermitrequest(resourceId: string, account?: string, region?: string, partition?: string): this; /** * Filters access by a tag key-value pair in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag * * Applies to actions: * - .toCreateSupportPermit() * - .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 a tag key-value pair assigned to the resource * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag * * Applies to actions: * - .toDeleteSupportPermit() * - .toGetSupportPermit() * - .toListTagsForResource() * - .toTagResource() * - .toUntagResource() * * Applies to resource types: * - supportpermit * * @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 in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys * * Applies to actions: * - .toCreateSupportPermit() * - .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 [supportauthz](https://docs.aws.amazon.com/service-authorization/latest/reference/list_supportauthz.html). * */ constructor(props?: iam.PolicyStatementProps); }