cdk-iam-floyd
Version:
AWS IAM policy statement generator with fluent interface for AWS CDK
173 lines (172 loc) • 8.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 [vpc-lattice-svcs](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonvpclatticeservices.html).
*
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
*/
export declare class VpcLatticeSvcs extends PolicyStatement {
servicePrefix: string;
/**
* Grants permission to connect to a VPC Lattice service
*
* Access Level: Write
*
* Possible conditions:
* - .ifPort()
* - .ifServiceNetworkArn()
* - .ifServiceArn()
* - .ifSourceVpc()
* - .ifSourceVpcOwnerAccount()
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/sigv4-authenticated-requests.html
*/
toConnect(): this;
/**
* Grants permission to invoke a VPC Lattice service
*
* Access Level: Write
*
* Possible conditions:
* - .ifPort()
* - .ifServiceNetworkArn()
* - .ifServiceArn()
* - .ifSourceVpc()
* - .ifSourceVpcOwnerAccount()
* - .ifRequestHeader()
* - .ifRequestQueryString()
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/sigv4-authenticated-requests.html
*/
toInvoke(): this;
protected accessLevelList: AccessLevelList;
/**
* Adds a resource of type Service to the statement
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/services.html
*
* @param serviceId - Identifier for the serviceId.
* @param requestPath - Identifier for the requestPath.
* @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.
*/
onService(serviceId: string, requestPath: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type TCP Service to the statement
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/services.html
*
* @param serviceId - Identifier for the serviceId.
* @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.
*/
onTCPService(serviceId: string, account?: string, region?: string, partition?: string): this;
/**
* Filters access by the destination port the request is made to
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html#auth-policies-condition-keys
*
* Applies to actions:
* - .toConnect()
* - .toInvoke()
*
* @param value The value(s) to check
* @param operator Works with [numeric operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_Numeric). **Default:** `NumericEquals`
*/
ifPort(value: number | number[], operator?: Operator | string): this;
/**
* Filters access by a header name-value pair in the request headers
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html#auth-policies-condition-keys
*
* Applies to actions:
* - .toInvoke()
*
* @param headerName 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`
*/
ifRequestHeader(headerName: string, value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the method of the request
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html#auth-policies-condition-keys
*
* @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`
*/
ifRequestMethod(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the query string key-value pairs in the request URL
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html#auth-policies-condition-keys
*
* Applies to actions:
* - .toInvoke()
*
* @param queryStringKey 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`
*/
ifRequestQueryString(queryStringKey: string, value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the ARN of the service receiving the request
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html#auth-policies-condition-keys
*
* Applies to actions:
* - .toConnect()
* - .toInvoke()
*
* @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`
*/
ifServiceArn(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the ARN of the service network receiving the request
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html#auth-policies-condition-keys
*
* Applies to actions:
* - .toConnect()
* - .toInvoke()
*
* @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`
*/
ifServiceNetworkArn(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the VPC the request is made from
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html#auth-policies-condition-keys
*
* Applies to actions:
* - .toConnect()
* - .toInvoke()
*
* @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`
*/
ifSourceVpc(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the owning account of the VPC the request is made from
*
* https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html#auth-policies-condition-keys
*
* Applies to actions:
* - .toConnect()
* - .toInvoke()
*
* @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`
*/
ifSourceVpcOwnerAccount(value: string | string[], operator?: Operator | string): this;
/**
* Statement provider for service [vpc-lattice-svcs](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonvpclatticeservices.html).
*
*/
constructor(props?: iam.PolicyStatementProps);
}