UNPKG

iam-floyd

Version:

AWS IAM policy statement generator with fluent interface

1,213 lines 122 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ElasticloadbalancingV2 = void 0; const shared_1 = require("../../shared"); /** * Statement provider for service [elasticloadbalancing-v2](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselasticloadbalancingv2.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ class ElasticloadbalancingV2 extends shared_1.PolicyStatement { /** * Statement provider for service [elasticloadbalancing-v2](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselasticloadbalancingv2.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ constructor(sid) { super(sid); this.servicePrefix = 'elasticloadbalancing'; this.accessLevelList = { Write: [ 'AddListenerCertificates', 'AddTrustStoreRevocations', 'CreateListener', 'CreateLoadBalancer', 'CreateRule', 'CreateTargetGroup', 'CreateTrustStore', 'DeleteListener', 'DeleteLoadBalancer', 'DeleteRule', 'DeleteSharedTrustStoreAssociation', 'DeleteTargetGroup', 'DeleteTrustStore', 'DeregisterTargets', 'ModifyCapacityReservation', 'ModifyIpPools', 'ModifyListener', 'ModifyListenerAttributes', 'ModifyLoadBalancerAttributes', 'ModifyRule', 'ModifyTargetGroup', 'ModifyTargetGroupAttributes', 'ModifyTrustStore', 'RegisterTargets', 'RemoveListenerCertificates', 'RemoveTrustStoreRevocations', 'SetIpAddressType', 'SetRulePriorities', 'SetSecurityGroups', 'SetSubnets', 'SetWebAcl' ], Tagging: [ 'AddTags', 'RemoveTags' ], Read: [ 'DescribeAccountLimits', 'DescribeCapacityReservation', 'DescribeListenerAttributes', 'DescribeListenerCertificates', 'DescribeListeners', 'DescribeLoadBalancerAttributes', 'DescribeLoadBalancers', 'DescribeRules', 'DescribeSSLPolicies', 'DescribeTags', 'DescribeTargetGroupAttributes', 'DescribeTargetGroups', 'DescribeTargetHealth', 'DescribeTrustStoreAssociations', 'DescribeTrustStoreRevocations', 'DescribeTrustStores', 'GetResourcePolicy', 'GetTrustStoreCaCertificatesBundle', 'GetTrustStoreRevocationContent' ] }; } /** * Grants permission to add the specified certificates to the specified secure listener * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_AddListenerCertificates.html */ toAddListenerCertificates() { return this.to('AddListenerCertificates'); } /** * 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/latest/APIReference/API_AddTags.html */ toAddTags() { return this.to('AddTags'); } /** * Grants permission to add revocations to a trust store * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_AddTrustStoreRevocations.html */ toAddTrustStoreRevocations() { return this.to('AddTrustStoreRevocations'); } /** * Grants permission to create a listener for the specified Application Load Balancer * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifAwsResourceTag() * - .ifResourceTag() * - .ifSecurityPolicy() * - .ifListenerProtocol() * * Dependent actions: * - elasticloadbalancing:AddTags * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateListener.html */ toCreateListener() { return this.to('CreateListener'); } /** * Grants permission to create a load balancer * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifAwsResourceTag() * - .ifResourceTag() * - .ifSecurityGroup() * - .ifSubnet() * - .ifScheme() * * Dependent actions: * - elasticloadbalancing:AddTags * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateLoadBalancer.html */ toCreateLoadBalancer() { return this.to('CreateLoadBalancer'); } /** * Grants permission to create a rule for the specified listener * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifAwsResourceTag() * - .ifResourceTag() * * Dependent actions: * - elasticloadbalancing:AddTags * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateRule.html */ toCreateRule() { return this.to('CreateRule'); } /** * Grants permission to create a target group * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifAwsResourceTag() * - .ifResourceTag() * * Dependent actions: * - elasticloadbalancing:AddTags * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html */ toCreateTargetGroup() { return this.to('CreateTargetGroup'); } /** * Grants permission to create a trust store * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifAwsResourceTag() * - .ifResourceTag() * * Dependent actions: * - elasticloadbalancing:AddTags * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTrustStore.html */ toCreateTrustStore() { return this.to('CreateTrustStore'); } /** * Grants permission to delete the specified listener * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DeleteListener.html */ toDeleteListener() { return this.to('DeleteListener'); } /** * Grants permission to delete the specified load balancer * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DeleteLoadBalancer.html */ toDeleteLoadBalancer() { return this.to('DeleteLoadBalancer'); } /** * Grants permission to delete the specified rule * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DeleteRule.html */ toDeleteRule() { return this.to('DeleteRule'); } /** * Grants permission to delete the specified shared trust store association * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DeleteSharedTrustStoreAssociation.html */ toDeleteSharedTrustStoreAssociation() { return this.to('DeleteSharedTrustStoreAssociation'); } /** * Grants permission to delete the specified target group * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DeleteTargetGroup.html */ toDeleteTargetGroup() { return this.to('DeleteTargetGroup'); } /** * Grants permission to delete the specified trust store * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DeleteTrustStore.html */ toDeleteTrustStore() { return this.to('DeleteTrustStore'); } /** * Grants permission to deregister the specified targets from the specified target group * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DeregisterTargets.html */ toDeregisterTargets() { return this.to('DeregisterTargets'); } /** * Grants permission to describe the Elastic Load Balancing resource limits for the AWS account * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeAccountLimits.html */ toDescribeAccountLimits() { return this.to('DescribeAccountLimits'); } /** * Grants permission to describe the capacity reservation for a load balancer * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeCapacityReservation.html */ toDescribeCapacityReservation() { return this.to('DescribeCapacityReservation'); } /** * Grants permission to describe the attributes for the specified listener * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeListenerAttributes.html */ toDescribeListenerAttributes() { return this.to('DescribeListenerAttributes'); } /** * Grants permission to describe the certificates for the specified secure listener * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeListenerCertificates.html */ toDescribeListenerCertificates() { return this.to('DescribeListenerCertificates'); } /** * Grants permission to describe the specified listeners or the listeners for the specified Application Load Balancer * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeListeners.html */ toDescribeListeners() { return this.to('DescribeListeners'); } /** * Grants permission to describe the attributes for the specified load balancer * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancerAttributes.html */ toDescribeLoadBalancerAttributes() { return this.to('DescribeLoadBalancerAttributes'); } /** * 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: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html */ toDescribeLoadBalancers() { return this.to('DescribeLoadBalancers'); } /** * Grants permission to describe the specified rules or the rules for the specified listener * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeRules.html */ toDescribeRules() { return this.to('DescribeRules'); } /** * Grants permission to describe the specified policies or all policies used for SSL negotiation * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeSSLPolicies.html */ toDescribeSSLPolicies() { return this.to('DescribeSSLPolicies'); } /** * Grants permission to describe the tags associated with the specified resource * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTags.html */ toDescribeTags() { return this.to('DescribeTags'); } /** * Grants permission to describe the attributes for the specified target group * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroupAttributes.html */ toDescribeTargetGroupAttributes() { return this.to('DescribeTargetGroupAttributes'); } /** * Grants permission to describe the specified target groups or all of your target groups * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html */ toDescribeTargetGroups() { return this.to('DescribeTargetGroups'); } /** * Grants permission to describe the health of the specified targets or all of your targets * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetHealth.html */ toDescribeTargetHealth() { return this.to('DescribeTargetHealth'); } /** * Grants permission to describe the associations with a trust store * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTrustStoreAssociations.html */ toDescribeTrustStoreAssociations() { return this.to('DescribeTrustStoreAssociations'); } /** * Grants permission to describe the specified trust stores revocations or all of your revocations related to a trust store * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTrustStoreRevocations.html */ toDescribeTrustStoreRevocations() { return this.to('DescribeTrustStoreRevocations'); } /** * Grants permission to describe the specified trust stores or all of your trust stores * * Access Level: Read * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTrustStores.html */ toDescribeTrustStores() { return this.to('DescribeTrustStores'); } /** * Grants permission to retrieve the resource policy associated with the resource * * Access Level: Read * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_GetResourcePolicy.html */ toGetResourcePolicy() { return this.to('GetResourcePolicy'); } /** * Grants permission to retrieve a trust store CA certificates bundle * * Access Level: Read * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_GetTrustStoreCaCertificatesBundle.html */ toGetTrustStoreCaCertificatesBundle() { return this.to('GetTrustStoreCaCertificatesBundle'); } /** * Grants permission to retrieve a trust store revocation content * * Access Level: Read * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_GetTrustStoreRevocationContent.html */ toGetTrustStoreRevocationContent() { return this.to('GetTrustStoreRevocationContent'); } /** * Grants permission to modify the capacity reservation for a load balancer * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_ModifyCapacityReservation.html */ toModifyCapacityReservation() { return this.to('ModifyCapacityReservation'); } /** * Grants permission to modify the ip pools for a load balancer * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_ModifyIpPools.html */ toModifyIpPools() { return this.to('ModifyIpPools'); } /** * Grants permission to modify the specified properties of the specified listener * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * - .ifSecurityPolicy() * - .ifListenerProtocol() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_ModifyListener.html */ toModifyListener() { return this.to('ModifyListener'); } /** * Grants permission to modify the attributes of the specified listener * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_ModifyListenerAttributes.html */ toModifyListenerAttributes() { return this.to('ModifyListenerAttributes'); } /** * Grants permission to modify the attributes of the specified load balancer * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_ModifyLoadBalancerAttributes.html */ toModifyLoadBalancerAttributes() { return this.to('ModifyLoadBalancerAttributes'); } /** * Grants permission to modify the specified rule * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_ModifyRule.html */ toModifyRule() { return this.to('ModifyRule'); } /** * Grants permission to modify the health checks used when evaluating the health state of the targets in the specified target group * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_ModifyTargetGroup.html */ toModifyTargetGroup() { return this.to('ModifyTargetGroup'); } /** * Grants permission to modify the specified attributes of the specified target group * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_ModifyTargetGroupAttributes.html */ toModifyTargetGroupAttributes() { return this.to('ModifyTargetGroupAttributes'); } /** * Grants permission to modify the specified trust store * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_ModifyTrustStore.html */ toModifyTrustStore() { return this.to('ModifyTrustStore'); } /** * Grants permission to register the specified targets with the specified target group * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_RegisterTargets.html */ toRegisterTargets() { return this.to('RegisterTargets'); } /** * Grants permission to remove the specified certificates of the specified secure listener * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_RemoveListenerCertificates.html */ toRemoveListenerCertificates() { return this.to('RemoveListenerCertificates'); } /** * 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/latest/APIReference/API_RemoveTags.html */ toRemoveTags() { return this.to('RemoveTags'); } /** * Grants permission to remove revocations from a trust store * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_RemoveTrustStoreRevocations.html */ toRemoveTrustStoreRevocations() { return this.to('RemoveTrustStoreRevocations'); } /** * Grants permission to set the type of IP addresses used by the subnets of the specified load balancer * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_SetIpAddressType.html */ toSetIpAddressType() { return this.to('SetIpAddressType'); } /** * Grants permission to set the priorities of the specified rules * * Access Level: Write * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_SetRulePriorities.html */ toSetRulePriorities() { return this.to('SetRulePriorities'); } /** * Grants permission to associate the specified security groups with the specified load balancer * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * - .ifSecurityGroup() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_SetSecurityGroups.html */ toSetSecurityGroups() { return this.to('SetSecurityGroups'); } /** * Grants permission to enable the Availability Zone for the specified subnets for the specified load balancer * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifResourceTag() * - .ifSubnet() * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_SetSubnets.html */ toSetSubnets() { return this.to('SetSubnets'); } /** * Grants permission to give WebAcl permission to WAF * * Access Level: Write * * https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_SetWebAcl.html */ toSetWebAcl() { return this.to('SetWebAcl'); } /** * Adds a resource of type listener/gwy to the statement * * https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/gateway-listeners.html * * @param loadBalancerName - Identifier for the loadBalancerName. * @param loadBalancerId - Identifier for the loadBalancerId. * @param listenerId - Identifier for the listenerId. * @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() */ onListenerGwy(loadBalancerName, loadBalancerId, listenerId, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:elasticloadbalancing:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:listener/gwy/${loadBalancerName}/${loadBalancerId}/${listenerId}`); } /** * Adds a resource of type listener/app to the statement * * https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html * * @param loadBalancerName - Identifier for the loadBalancerName. * @param loadBalancerId - Identifier for the loadBalancerId. * @param listenerId - Identifier for the listenerId. * @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() */ onListenerApp(loadBalancerName, loadBalancerId, listenerId, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:elasticloadbalancing:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:listener/app/${loadBalancerName}/${loadBalancerId}/${listenerId}`); } /** * Adds a resource of type listener-rule/app to the statement * * https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-update-rules.html * * @param loadBalancerName - Identifier for the loadBalancerName. * @param loadBalancerId - Identifier for the loadBalancerId. * @param listenerId - Identifier for the listenerId. * @param listenerRuleId - Identifier for the listenerRuleId. * @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() */ onListenerRuleApp(loadBalancerName, loadBalancerId, listenerId, listenerRuleId, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:elasticloadbalancing:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:listener-rule/app/${loadBalancerName}/${loadBalancerId}/${listenerId}/${listenerRuleId}`); } /** * Adds a resource of type listener/net to the statement * * https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html * * @param loadBalancerName - Identifier for the loadBalancerName. * @param loadBalancerId - Identifier for the loadBalancerId. * @param listenerId - Identifier for the listenerId. * @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() */ onListenerNet(loadBalancerName, loadBalancerId, listenerId, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:elasticloadbalancing:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:listener/net/${loadBalancerName}/${loadBalancerId}/${listenerId}`); } /** * Adds a resource of type listener-rule/net to the statement * * https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-update-rules.html * * @param loadBalancerName - Identifier for the loadBalancerName. * @param loadBalancerId - Identifier for the loadBalancerId. * @param listenerId - Identifier for the listenerId. * @param listenerRuleId - Identifier for the listenerRuleId. * @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() */ onListenerRuleNet(loadBalancerName, loadBalancerId, listenerId, listenerRuleId, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:elasticloadbalancing:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:listener-rule/net/${loadBalancerName}/${loadBalancerId}/${listenerId}/${listenerRuleId}`); } /** * Adds a resource of type loadbalancer/gwy/ to the statement * * https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/gateway-load-balancers.html * * @param loadBalancerName - Identifier for the loadBalancerName. * @param loadBalancerId - Identifier for the loadBalancerId. * @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() */ onLoadbalancerGwy(loadBalancerName, loadBalancerId, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:elasticloadbalancing:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:loadbalancer/gwy/${loadBalancerName}/${loadBalancerId}`); } /** * Adds a resource of type loadbalancer/app/ to the statement * * https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html#application-load-balancer-overview * * @param loadBalancerName - Identifier for the loadBalancerName. * @param loadBalancerId - Identifier for the loadBalancerId. * @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() */ onLoadbalancerApp(loadBalancerName, loadBalancerId, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:elasticloadbalancing:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:loadbalancer/app/${loadBalancerName}/${loadBalancerId}`); } /** * Adds a resource of type loadbalancer/net/ to the statement * * https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html#network-load-balancer-overview * * @param loadBalancerName - Identifier for the loadBalancerName. * @param loadBalancerId - Identifier for the loadBalancerId. * @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() */ onLoadbalancerNet(loadBalancerName, loadBalancerId, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:elasticloadbalancing:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:loadbalancer/net/${loadBalancerName}/${loadBalancerId}`); } /** * Adds a resource of type targetgroup to the statement * * https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html * * @param targetGroupName - Identifier for the targetGroupName. * @param targetGroupId - Identifier for the targetGroupId. * @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() */ onTargetgroup(targetGroupName, targetGroupId, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:elasticloadbalancing:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:targetgroup/${targetGroupName}/${targetGroupId}`); } /** * Adds a resource of type truststore to the statement * * https://docs.aws.amazon.com/elasticloadbalancing/latest/application/trust-store.html * * @param trustStoreName - Identifier for the trustStoreName. * @param trustStoreId - Identifier for the trustStoreId. * @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() */ onTruststore(trustStoreName, trustStoreId, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:elasticloadbalancing:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:truststore/${trustStoreName}/${trustStoreId}`); } /** * 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() * - .toCreateListener() * - .toCreateLoadBalancer() * - .toCreateRule() * - .toCreateTargetGroup() * - .toCreateTrustStore() * - .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, value, operator) { return this.if(`aws:RequestTag/${tagKey}`, value, operator ?? 'StringLike'); } /** * 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: * - .toAddListenerCertificates() * - .toAddTags() * - .toAddTrustStoreRevocations() * - .toCreateListener() * - .toCreateLoadBalancer() * - .toCreateRule() * - .toCreateTargetGroup() * - .toCreateTrustStore() * - .toDeleteListener() * - .toDeleteLoadBalancer() * - .toDeleteRule() * - .toDeleteSharedTrustStoreAssociation() * - .toDeleteTargetGroup() * - .toDeleteTrustStore() * - .toDeregisterTargets() * - .toGetResourcePolicy() * - .toGetTrustStoreCaCertificatesBundle() * - .toGetTrustStoreRevocationContent() * - .toModifyCapacityReservation() * - .toModifyIpPools() * - .toModifyListener() * - .toModifyListenerAttributes() * - .toModifyLoadBalancerAttributes() * - .toModifyRule() * - .toModifyTargetGroup() * - .toModifyTargetGroupAttributes() * - .toModifyTrustStore() * - .toRegisterTargets() * - .toRemoveListenerCertificates() * - .toRemoveTags() * - .toRemoveTrustStoreRevocations() * - .toSetIpAddressType() * - .toSetSecurityGroups() * - .toSetSubnets() * * Applies to resource types: * - listener/gwy * - listener/app * - listener-rule/app * - listener/net * - listener-rule/net * - loadbalancer/gwy/ * - loadbalancer/app/ * - loadbalancer/net/ * - targetgroup * - truststore * * @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, value, operator) { return this.if(`aws:ResourceTag/${tagKey}`, value, operator ?? 'StringLike'); } /** * 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() * - .toCreateListener() * - .toCreateLoadBalancer() * - .toCreateRule() * - .toCreateTargetGroup() * - .toCreateTrustStore() * - .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, operator) { return this.if(`aws:TagKeys`, value, operator ?? 'StringLike'); } /** * 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, operator) { return this.if(`CreateAction`, value, operator ?? 'StringLike'); } /** * Filters access by the listener protocol that is allowed in the request * * https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/security_iam_service-with-iam.html#listenerprotocol-condition * * Applies to actions: * - .toCreateListener() * - .toModifyListener() * * @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, operator) { return this.if(`ListenerProtocol`, value, operator ?? 'StringLike'); } /** * 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: * - .toAddListenerCertificates() * - .toAddTags() * - .toAddTrustStoreRevocations() * - .toCreateListener() * - .toCreateLoadBalancer() * - .toCreateRule() * - .toCreateTargetGroup() * - .toCreateTrustStore() * - .toDeleteListener() * - .toDeleteLoadBalancer() * - .toDeleteRule() * - .toDeleteSharedTrustStoreAssociation() * - .toDeleteTargetGroup() * - .toDeleteTrustStore() * - .toDeregisterTargets() * - .toGetResourcePolicy() * - .toGetTrustStoreCaCertificatesBundle() * - .toGetTrustStoreRevocationContent() * - .toModifyCapacityReservation() * - .toModifyIpPools() * - .toModifyListener() * - .toModifyListenerAttributes() * - .toModifyLoadBalancerAttributes() * - .toModifyRule() * - .toModifyTargetGroup() * - .toModifyTargetGroupAttributes() * - .toModifyTrustStore() * - .toRegisterTargets() * - .toRemoveListenerCertificates() * - .toRemoveTags() * - .toRemoveTrustStoreRevocations() * - .toSetIpAddressType() * - .toSetSecurityGroups() * - .toSetSubnets() * * Applies to resource types: * - listener/gwy * - listener/app * - listener-rule/app * - listener/net * - listener-rule/net * - loadbalancer/gwy/ * - loadbalancer/app/ * - loadbalancer/net/ * - targetgroup * - truststore * * @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` */ ifResourceTag(tagKey, value, operator) { return this.if(`ResourceTag/${tagKey}`, value, operator ?? 'StringLike'); } /** * Filters access by the load balancer scheme that is 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, operator) { return this.if(`Scheme`, value, operator ?? 'StringLike'); } /** * 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: * - .toCreateLoadBalancer() * - .toSetSecurityGroups() * * @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, operator) { return this.if(`SecurityGroup`, value, operator ?? 'StringLike'); } /** * 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: * - .toCreateListener() * - .toModifyListener() * * @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, operator) { return this.if(`SecurityPolicy`, value, operator ?? 'StringLike'); } /** * 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: * - .toCreateLoadBalancer() * - .toSetSubnets() * * @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, operator) { return this.if(`Subnet`, value, operator ?? 'StringLike'); } } exports.ElasticloadbalancingV2 = ElasticloadbalancingV2; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImVsYXN0aWNsb2FkYmFsYW5jaW5ndjIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EseUNBQXlEO0FBRXpEOzs7O0dBSUc7QUFDSCxNQUFhLHNCQUF1QixTQUFRLHdCQUFlO0lBR3pEOzs7O09BSUc7SUFDSCxZQUFZLEdBQVk7UUFDdEIsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBUk4sa0JBQWEsR0FBRyxzQkFBc0IsQ0FBQztRQXN2QnBDLG9CQUFlLEdBQW9CO1lBQzNDLEtBQUssRUFBRTtnQkFDTCx5QkFBeUI7Z0JBQ3pCLDBCQUEwQjtnQkFDMUIsZ0JBQWdCO2dCQUNoQixvQkFBb0I7Z0JBQ3BCLFlBQVk7Z0JBQ1osbUJBQW1CO2dCQUNuQixrQkFBa0I7Z0JBQ2xCLGdCQUFnQjtnQkFDaEIsb0JBQW9CO2dCQUNwQixZQUFZO2dCQUNaLG1DQUFtQztnQkFDbkMsb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