cdk-iam-floyd
Version:
AWS IAM policy statement generator with fluent interface for AWS CDK
552 lines (551 loc) • 22.6 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 [elasticloadbalancing](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselasticloadbalancing.html).
*
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
*/
export declare class Elasticloadbalancing extends PolicyStatement {
servicePrefix: string;
/**
* Grants permission to add the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags
*
* Access Level: Tagging
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
* - .ifAwsResourceTag()
* - .ifResourceTag()
* - .ifCreateAction()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_AddTags.html
*/
toAddTags(): this;
/**
* Grants permission to associate one or more security groups with your load balancer in a virtual private cloud (VPC)
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
* - .ifSecurityGroup()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_ApplySecurityGroupsToLoadBalancer.html
*/
toApplySecurityGroupsToLoadBalancer(): this;
/**
* Grants permission to add one or more subnets to the set of configured subnets for the specified load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
* - .ifSubnet()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_AttachLoadBalancerToSubnets.html
*/
toAttachLoadBalancerToSubnets(): this;
/**
* Grants permission to specify the health check settings to use when evaluating the health state of your back-end instances
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_ConfigureHealthCheck.html
*/
toConfigureHealthCheck(): this;
/**
* Grants permission to generate a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_CreateAppCookieStickinessPolicy.html
*/
toCreateAppCookieStickinessPolicy(): this;
/**
* Grants permission to generate a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_CreateLBCookieStickinessPolicy.html
*/
toCreateLBCookieStickinessPolicy(): this;
/**
* Grants permission to create a load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
* - .ifAwsResourceTag()
* - .ifResourceTag()
* - .ifSecurityGroup()
* - .ifSubnet()
* - .ifScheme()
* - .ifListenerProtocol()
*
* Dependent actions:
* - elasticloadbalancing:AddTags
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_CreateLoadBalancer.html
*/
toCreateLoadBalancer(): this;
/**
* Grants permission to create one or more listeners for the specified load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
* - .ifListenerProtocol()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_CreateLoadBalancerListeners.html
*/
toCreateLoadBalancerListeners(): this;
/**
* Grants permission to create a policy with the specified attributes for the specified load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
* - .ifSecurityPolicy()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_CreateLoadBalancerPolicy.html
*/
toCreateLoadBalancerPolicy(): this;
/**
* Grants permission to delete the specified load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DeleteLoadBalancer.html
*/
toDeleteLoadBalancer(): this;
/**
* Grants permission to delete the specified listeners from the specified load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DeleteLoadBalancerListeners.html
*/
toDeleteLoadBalancerListeners(): this;
/**
* Grants permission to delete the specified policy from the specified load balancer. This policy must not be enabled for any listeners
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DeleteLoadBalancerPolicy.html
*/
toDeleteLoadBalancerPolicy(): this;
/**
* Grants permission to deregister the specified instances from the specified load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DeregisterInstancesFromLoadBalancer.html
*/
toDeregisterInstancesFromLoadBalancer(): this;
/**
* Grants permission to describe the state of the specified instances with respect to the specified load balancer
*
* Access Level: Read
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeInstanceHealth.html
*/
toDescribeInstanceHealth(): this;
/**
* Grants permission to describe the attributes for the specified load balancer
*
* Access Level: Read
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancerAttributes.html
*/
toDescribeLoadBalancerAttributes(): this;
/**
* Grants permission to describe the specified policies
*
* Access Level: Read
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancerPolicies.html
*/
toDescribeLoadBalancerPolicies(): this;
/**
* Grants permission to describe the specified load balancer policy types
*
* Access Level: Read
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancerPolicyTypes.html
*/
toDescribeLoadBalancerPolicyTypes(): this;
/**
* Grants permission to describe the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers
*
* Access Level: List
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html
*/
toDescribeLoadBalancers(): this;
/**
* Grants permission to describe the tags associated with the specified load balancers
*
* Access Level: Read
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeTags.html
*/
toDescribeTags(): this;
/**
* Grants permission to remove the specified subnets from the set of configured subnets for the load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DetachLoadBalancerFromSubnets.html
*/
toDetachLoadBalancerFromSubnets(): this;
/**
* Grants permission to remove the specified Availability Zones from the set of Availability Zones for the specified load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DisableAvailabilityZonesForLoadBalancer.html
*/
toDisableAvailabilityZonesForLoadBalancer(): this;
/**
* Grants permission to add the specified Availability Zones to the set of Availability Zones for the specified load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_EnableAvailabilityZonesForLoadBalancer.html
*/
toEnableAvailabilityZonesForLoadBalancer(): this;
/**
* Grants permission to modify the attributes of the specified load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_ModifyLoadBalancerAttributes.html
*/
toModifyLoadBalancerAttributes(): this;
/**
* Grants permission to add the specified instances to the specified load balancer
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_RegisterInstancesWithLoadBalancer.html
*/
toRegisterInstancesWithLoadBalancer(): this;
/**
* Grants permission to remove one or more tags from the specified load balancer
*
* Access Level: Tagging
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_RemoveTags.html
*/
toRemoveTags(): this;
/**
* Grants permission to set the certificate that terminates the specified listener's SSL connections
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_SetLoadBalancerListenerSSLCertificate.html
*/
toSetLoadBalancerListenerSSLCertificate(): this;
/**
* Grants permission to replace the set of policies associated with the specified port on which the back-end server is listening with a new set of policies
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_SetLoadBalancerPoliciesForBackendServer.html
*/
toSetLoadBalancerPoliciesForBackendServer(): this;
/**
* Grants permission to replace the current set of policies for the specified load balancer port with the specified set of policies
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifResourceTag()
* - .ifSecurityPolicy()
*
* https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_SetLoadBalancerPoliciesOfListener.html
*/
toSetLoadBalancerPoliciesOfListener(): this;
protected accessLevelList: AccessLevelList;
/**
* Adds a resource of type loadbalancer to the statement
*
* https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/what-is-load-balancing.html
*
* @param loadBalancerName - Identifier for the loadBalancerName.
* @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()
* - .ifResourceTag()
*/
onLoadbalancer(loadBalancerName: string, account?: string, region?: string, partition?: string): this;
/**
* Filters access by a tag key and value pair that is allowed in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag
*
* Applies to actions:
* - .toAddTags()
* - .toCreateLoadBalancer()
* - .toRemoveTags()
*
* @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 and value pair of a resource
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag
*
* Applies to actions:
* - .toAddTags()
* - .toApplySecurityGroupsToLoadBalancer()
* - .toAttachLoadBalancerToSubnets()
* - .toConfigureHealthCheck()
* - .toCreateAppCookieStickinessPolicy()
* - .toCreateLBCookieStickinessPolicy()
* - .toCreateLoadBalancer()
* - .toCreateLoadBalancerListeners()
* - .toCreateLoadBalancerPolicy()
* - .toDeleteLoadBalancer()
* - .toDeleteLoadBalancerListeners()
* - .toDeleteLoadBalancerPolicy()
* - .toDeregisterInstancesFromLoadBalancer()
* - .toDetachLoadBalancerFromSubnets()
* - .toDisableAvailabilityZonesForLoadBalancer()
* - .toEnableAvailabilityZonesForLoadBalancer()
* - .toModifyLoadBalancerAttributes()
* - .toRegisterInstancesWithLoadBalancer()
* - .toRemoveTags()
* - .toSetLoadBalancerListenerSSLCertificate()
* - .toSetLoadBalancerPoliciesForBackendServer()
* - .toSetLoadBalancerPoliciesOfListener()
*
* Applies to resource types:
* - loadbalancer
*
* @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 a list of tag keys that are allowed in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys
*
* Applies to actions:
* - .toAddTags()
* - .toCreateLoadBalancer()
* - .toRemoveTags()
*
* @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 the name of a resource-creating API action
*
* https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/tagging-resources-during-creation.html
*
* Applies to actions:
* - .toAddTags()
*
* @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`
*/
ifCreateAction(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the listener protocols that are allowed in the request
*
* https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/security_iam_service-with-iam.html#listenerprotocol-condition
*
* Applies to actions:
* - .toCreateLoadBalancer()
* - .toCreateLoadBalancerListeners()
*
* @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`
*/
ifListenerProtocol(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the preface string for a tag key and value pair that are attached to a resource
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag
*
* @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`
*/
ifResourceTagExists(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the preface string for a tag key and value pair that are attached to a resource
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag
*
* Applies to actions:
* - .toAddTags()
* - .toApplySecurityGroupsToLoadBalancer()
* - .toAttachLoadBalancerToSubnets()
* - .toConfigureHealthCheck()
* - .toCreateAppCookieStickinessPolicy()
* - .toCreateLBCookieStickinessPolicy()
* - .toCreateLoadBalancer()
* - .toCreateLoadBalancerListeners()
* - .toCreateLoadBalancerPolicy()
* - .toDeleteLoadBalancer()
* - .toDeleteLoadBalancerListeners()
* - .toDeleteLoadBalancerPolicy()
* - .toDeregisterInstancesFromLoadBalancer()
* - .toDetachLoadBalancerFromSubnets()
* - .toDisableAvailabilityZonesForLoadBalancer()
* - .toEnableAvailabilityZonesForLoadBalancer()
* - .toModifyLoadBalancerAttributes()
* - .toRegisterInstancesWithLoadBalancer()
* - .toRemoveTags()
* - .toSetLoadBalancerListenerSSLCertificate()
* - .toSetLoadBalancerPoliciesForBackendServer()
* - .toSetLoadBalancerPoliciesOfListener()
*
* Applies to resource types:
* - loadbalancer
*
* @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`
*/
ifResourceTagTagKey(tagKey: string, value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the load balancer scheme that are allowed in the request
*
* https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/security_iam_service-with-iam.html#scheme-condition
*
* Applies to actions:
* - .toCreateLoadBalancer()
*
* @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`
*/
ifScheme(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the security-group IDs that are allowed in the request
*
* https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/security_iam_service-with-iam.html#securitygroup-condition
*
* Applies to actions:
* - .toApplySecurityGroupsToLoadBalancer()
* - .toCreateLoadBalancer()
*
* @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`
*/
ifSecurityGroup(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the SSL Security Policies that are allowed in the request
*
* https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/security_iam_service-with-iam.html#securitypolicy-condition
*
* Applies to actions:
* - .toCreateLoadBalancerPolicy()
* - .toSetLoadBalancerPoliciesOfListener()
*
* @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`
*/
ifSecurityPolicy(value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the subnet IDs that are allowed in the request
*
* https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/security_iam_service-with-iam.html#subnet-condition
*
* Applies to actions:
* - .toAttachLoadBalancerToSubnets()
* - .toCreateLoadBalancer()
*
* @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`
*/
ifSubnet(value: string | string[], operator?: Operator | string): this;
/**
* Statement provider for service [elasticloadbalancing](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselasticloadbalancing.html).
*
*/
constructor(props?: iam.PolicyStatementProps);
}