cdk-iam-floyd
Version:
AWS IAM policy statement generator with fluent interface for AWS CDK
83 lines (82 loc) • 4.16 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 [execute-api](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonapigateway.html).
*
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
*/
export declare class ExecuteApi extends PolicyStatement {
servicePrefix: string;
/**
* Grants permission to invalidate API cache upon a client request
*
* Access Level: Write
*
* https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
*/
toInvalidateCache(): this;
/**
* Grants permission to invoke an API upon a client request
*
* Access Level: Write
*
* https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-call-api.html
*/
toInvoke(): this;
/**
* Grants permission to access the Websocket @connections Route
*
* Access Level: Write
*
* https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-control-access-iam.html
*/
toManageConnections(): this;
protected accessLevelList: AccessLevelList;
/**
* Adds a resource of type execute-api-general to the statement
*
* https://docs.aws.amazon.com/apigateway/latest/developerguide/security_iam_service-with-iam.html
*
* @param apiId - Identifier for the apiId.
* @param stage - Identifier for the stage.
* @param method - Identifier for the method.
* @param apiSpecificResourcePath - Identifier for the apiSpecificResourcePath.
* @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:
* - .ifViaDomainArn()
*/
onExecuteApiGeneral(apiId: string, stage: string, method: string, apiSpecificResourcePath: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type execute-api-domain to the statement
*
* https://docs.aws.amazon.com/apigateway/latest/developerguide/security_iam_service-with-iam.html
*
* @param domainName - Identifier for the domainName.
* @param domainIdentifier - Identifier for the domainIdentifier.
* @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.
*/
onExecuteApiDomain(domainName: string, domainIdentifier: string, account?: string, region?: string, partition?: string): this;
/**
* Filters access by the DomainName ARN the API is called from
*
* https://docs.aws.amazon.com/apigateway/latest/developerguide/security_iam_service-with-iam.html
*
* Applies to resource types:
* - execute-api-general
*
* @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`
*/
ifViaDomainArn(value: string | string[], operator?: Operator | string): this;
/**
* Statement provider for service [execute-api](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonapigateway.html).
*
*/
constructor(props?: iam.PolicyStatementProps);
}