Class ElbFunctions


  • public final class ElbFunctions
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ElbFunctions()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.pulumi.core.Output<GetHostedZoneIdResult> getHostedZoneId()
      Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias.
      static com.pulumi.core.Output<GetHostedZoneIdResult> getHostedZoneId​(GetHostedZoneIdArgs args)
      Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias.
      static com.pulumi.core.Output<GetHostedZoneIdResult> getHostedZoneId​(GetHostedZoneIdArgs args, com.pulumi.deployment.InvokeOptions options)
      Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias.
      static java.util.concurrent.CompletableFuture<GetHostedZoneIdResult> getHostedZoneIdPlain()
      Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias.
      static java.util.concurrent.CompletableFuture<GetHostedZoneIdResult> getHostedZoneIdPlain​(GetHostedZoneIdPlainArgs args)
      Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias.
      static java.util.concurrent.CompletableFuture<GetHostedZoneIdResult> getHostedZoneIdPlain​(GetHostedZoneIdPlainArgs args, com.pulumi.deployment.InvokeOptions options)
      Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias.
      static com.pulumi.core.Output<GetLoadBalancerResult> getLoadBalancer​(GetLoadBalancerArgs args)
      Provides information about a "classic" Elastic Load Balancer (ELB).
      static com.pulumi.core.Output<GetLoadBalancerResult> getLoadBalancer​(GetLoadBalancerArgs args, com.pulumi.deployment.InvokeOptions options)
      Provides information about a "classic" Elastic Load Balancer (ELB).
      static java.util.concurrent.CompletableFuture<GetLoadBalancerResult> getLoadBalancerPlain​(GetLoadBalancerPlainArgs args)
      Provides information about a "classic" Elastic Load Balancer (ELB).
      static java.util.concurrent.CompletableFuture<GetLoadBalancerResult> getLoadBalancerPlain​(GetLoadBalancerPlainArgs args, com.pulumi.deployment.InvokeOptions options)
      Provides information about a "classic" Elastic Load Balancer (ELB).
      static com.pulumi.core.Output<GetServiceAccountResult> getServiceAccount()
      Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy.
      static com.pulumi.core.Output<GetServiceAccountResult> getServiceAccount​(GetServiceAccountArgs args)
      Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy.
      static com.pulumi.core.Output<GetServiceAccountResult> getServiceAccount​(GetServiceAccountArgs args, com.pulumi.deployment.InvokeOptions options)
      Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy.
      static java.util.concurrent.CompletableFuture<GetServiceAccountResult> getServiceAccountPlain()
      Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy.
      static java.util.concurrent.CompletableFuture<GetServiceAccountResult> getServiceAccountPlain​(GetServiceAccountPlainArgs args)
      Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy.
      static java.util.concurrent.CompletableFuture<GetServiceAccountResult> getServiceAccountPlain​(GetServiceAccountPlainArgs args, com.pulumi.deployment.InvokeOptions options)
      Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ElbFunctions

        public ElbFunctions()
    • Method Detail

      • getHostedZoneId

        public static com.pulumi.core.Output<GetHostedZoneIdResult> getHostedZoneId()
        Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getHostedZoneId()); var www = new Record("www", RecordArgs.builder() .zoneId(aws_route53_zone.primary().zone_id()) .name("example.com") .type("A") .aliases(RecordAliasArgs.builder() .name(aws_elb.main().dns_name()) .zoneId(main.apply(getHostedZoneIdResult -> getHostedZoneIdResult.id())) .evaluateTargetHealth(true) .build()) .build()); } } ```
      • getHostedZoneIdPlain

        public static java.util.concurrent.CompletableFuture<GetHostedZoneIdResult> getHostedZoneIdPlain()
        Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getHostedZoneId()); var www = new Record("www", RecordArgs.builder() .zoneId(aws_route53_zone.primary().zone_id()) .name("example.com") .type("A") .aliases(RecordAliasArgs.builder() .name(aws_elb.main().dns_name()) .zoneId(main.apply(getHostedZoneIdResult -> getHostedZoneIdResult.id())) .evaluateTargetHealth(true) .build()) .build()); } } ```
      • getHostedZoneId

        public static com.pulumi.core.Output<GetHostedZoneIdResult> getHostedZoneId​(GetHostedZoneIdArgs args)
        Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getHostedZoneId()); var www = new Record("www", RecordArgs.builder() .zoneId(aws_route53_zone.primary().zone_id()) .name("example.com") .type("A") .aliases(RecordAliasArgs.builder() .name(aws_elb.main().dns_name()) .zoneId(main.apply(getHostedZoneIdResult -> getHostedZoneIdResult.id())) .evaluateTargetHealth(true) .build()) .build()); } } ```
      • getHostedZoneIdPlain

        public static java.util.concurrent.CompletableFuture<GetHostedZoneIdResult> getHostedZoneIdPlain​(GetHostedZoneIdPlainArgs args)
        Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getHostedZoneId()); var www = new Record("www", RecordArgs.builder() .zoneId(aws_route53_zone.primary().zone_id()) .name("example.com") .type("A") .aliases(RecordAliasArgs.builder() .name(aws_elb.main().dns_name()) .zoneId(main.apply(getHostedZoneIdResult -> getHostedZoneIdResult.id())) .evaluateTargetHealth(true) .build()) .build()); } } ```
      • getHostedZoneId

        public static com.pulumi.core.Output<GetHostedZoneIdResult> getHostedZoneId​(GetHostedZoneIdArgs args,
                                                                                    com.pulumi.deployment.InvokeOptions options)
        Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getHostedZoneId()); var www = new Record("www", RecordArgs.builder() .zoneId(aws_route53_zone.primary().zone_id()) .name("example.com") .type("A") .aliases(RecordAliasArgs.builder() .name(aws_elb.main().dns_name()) .zoneId(main.apply(getHostedZoneIdResult -> getHostedZoneIdResult.id())) .evaluateTargetHealth(true) .build()) .build()); } } ```
      • getHostedZoneIdPlain

        public static java.util.concurrent.CompletableFuture<GetHostedZoneIdResult> getHostedZoneIdPlain​(GetHostedZoneIdPlainArgs args,
                                                                                                         com.pulumi.deployment.InvokeOptions options)
        Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getHostedZoneId()); var www = new Record("www", RecordArgs.builder() .zoneId(aws_route53_zone.primary().zone_id()) .name("example.com") .type("A") .aliases(RecordAliasArgs.builder() .name(aws_elb.main().dns_name()) .zoneId(main.apply(getHostedZoneIdResult -> getHostedZoneIdResult.id())) .evaluateTargetHealth(true) .build()) .build()); } } ```
      • getLoadBalancer

        public static com.pulumi.core.Output<GetLoadBalancerResult> getLoadBalancer​(GetLoadBalancerArgs args)
        Provides information about a "classic" Elastic Load Balancer (ELB). See `LB` Data Source if you are looking for "v2" Application Load Balancer (ALB) or Network Load Balancer (NLB). This data source can prove useful when a module accepts an LB as an input variable and needs to, for example, determine the security groups associated with it, etc. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var config = ctx.config(); final var lbName = config.get("lbName").orElse(""); final var test = Output.of(ElbFunctions.getLoadBalancer(GetLoadBalancerArgs.builder() .name(lbName) .build())); } } ```
      • getLoadBalancerPlain

        public static java.util.concurrent.CompletableFuture<GetLoadBalancerResult> getLoadBalancerPlain​(GetLoadBalancerPlainArgs args)
        Provides information about a "classic" Elastic Load Balancer (ELB). See `LB` Data Source if you are looking for "v2" Application Load Balancer (ALB) or Network Load Balancer (NLB). This data source can prove useful when a module accepts an LB as an input variable and needs to, for example, determine the security groups associated with it, etc. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var config = ctx.config(); final var lbName = config.get("lbName").orElse(""); final var test = Output.of(ElbFunctions.getLoadBalancer(GetLoadBalancerArgs.builder() .name(lbName) .build())); } } ```
      • getLoadBalancer

        public static com.pulumi.core.Output<GetLoadBalancerResult> getLoadBalancer​(GetLoadBalancerArgs args,
                                                                                    com.pulumi.deployment.InvokeOptions options)
        Provides information about a "classic" Elastic Load Balancer (ELB). See `LB` Data Source if you are looking for "v2" Application Load Balancer (ALB) or Network Load Balancer (NLB). This data source can prove useful when a module accepts an LB as an input variable and needs to, for example, determine the security groups associated with it, etc. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var config = ctx.config(); final var lbName = config.get("lbName").orElse(""); final var test = Output.of(ElbFunctions.getLoadBalancer(GetLoadBalancerArgs.builder() .name(lbName) .build())); } } ```
      • getLoadBalancerPlain

        public static java.util.concurrent.CompletableFuture<GetLoadBalancerResult> getLoadBalancerPlain​(GetLoadBalancerPlainArgs args,
                                                                                                         com.pulumi.deployment.InvokeOptions options)
        Provides information about a "classic" Elastic Load Balancer (ELB). See `LB` Data Source if you are looking for "v2" Application Load Balancer (ALB) or Network Load Balancer (NLB). This data source can prove useful when a module accepts an LB as an input variable and needs to, for example, determine the security groups associated with it, etc. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var config = ctx.config(); final var lbName = config.get("lbName").orElse(""); final var test = Output.of(ElbFunctions.getLoadBalancer(GetLoadBalancerArgs.builder() .name(lbName) .build())); } } ```
      • getServiceAccount

        public static com.pulumi.core.Output<GetServiceAccountResult> getServiceAccount()
        Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getServiceAccount()); var elbLogs = new BucketV2("elbLogs"); var elbLogsAcl = new BucketAclV2("elbLogsAcl", BucketAclV2Args.builder() .bucket(elbLogs.id()) .acl("private") .build()); var allowElbLogging = new BucketPolicy("allowElbLogging", BucketPolicyArgs.builder() .bucket(elbLogs.id()) .policy(""" { "Id": "Policy", "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:PutObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::my-elb-tf-test-bucket/AWSLogs/*", "Principal": { "AWS": [ "%s" ] } } ] } ", main.apply(getServiceAccountResult -> getServiceAccountResult.arn()))) .build()); var bar = new LoadBalancer("bar", LoadBalancerArgs.builder() .availabilityZones("us-west-2a") .accessLogs(LoadBalancerAccessLogsArgs.builder() .bucket(elbLogs.bucket()) .interval(5) .build()) .listeners(LoadBalancerListenerArgs.builder() .instancePort(8000) .instanceProtocol("http") .lbPort(80) .lbProtocol("http") .build()) .build()); } } ```
      • getServiceAccountPlain

        public static java.util.concurrent.CompletableFuture<GetServiceAccountResult> getServiceAccountPlain()
        Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getServiceAccount()); var elbLogs = new BucketV2("elbLogs"); var elbLogsAcl = new BucketAclV2("elbLogsAcl", BucketAclV2Args.builder() .bucket(elbLogs.id()) .acl("private") .build()); var allowElbLogging = new BucketPolicy("allowElbLogging", BucketPolicyArgs.builder() .bucket(elbLogs.id()) .policy(""" { "Id": "Policy", "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:PutObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::my-elb-tf-test-bucket/AWSLogs/*", "Principal": { "AWS": [ "%s" ] } } ] } ", main.apply(getServiceAccountResult -> getServiceAccountResult.arn()))) .build()); var bar = new LoadBalancer("bar", LoadBalancerArgs.builder() .availabilityZones("us-west-2a") .accessLogs(LoadBalancerAccessLogsArgs.builder() .bucket(elbLogs.bucket()) .interval(5) .build()) .listeners(LoadBalancerListenerArgs.builder() .instancePort(8000) .instanceProtocol("http") .lbPort(80) .lbProtocol("http") .build()) .build()); } } ```
      • getServiceAccount

        public static com.pulumi.core.Output<GetServiceAccountResult> getServiceAccount​(GetServiceAccountArgs args)
        Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getServiceAccount()); var elbLogs = new BucketV2("elbLogs"); var elbLogsAcl = new BucketAclV2("elbLogsAcl", BucketAclV2Args.builder() .bucket(elbLogs.id()) .acl("private") .build()); var allowElbLogging = new BucketPolicy("allowElbLogging", BucketPolicyArgs.builder() .bucket(elbLogs.id()) .policy(""" { "Id": "Policy", "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:PutObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::my-elb-tf-test-bucket/AWSLogs/*", "Principal": { "AWS": [ "%s" ] } } ] } ", main.apply(getServiceAccountResult -> getServiceAccountResult.arn()))) .build()); var bar = new LoadBalancer("bar", LoadBalancerArgs.builder() .availabilityZones("us-west-2a") .accessLogs(LoadBalancerAccessLogsArgs.builder() .bucket(elbLogs.bucket()) .interval(5) .build()) .listeners(LoadBalancerListenerArgs.builder() .instancePort(8000) .instanceProtocol("http") .lbPort(80) .lbProtocol("http") .build()) .build()); } } ```
      • getServiceAccountPlain

        public static java.util.concurrent.CompletableFuture<GetServiceAccountResult> getServiceAccountPlain​(GetServiceAccountPlainArgs args)
        Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getServiceAccount()); var elbLogs = new BucketV2("elbLogs"); var elbLogsAcl = new BucketAclV2("elbLogsAcl", BucketAclV2Args.builder() .bucket(elbLogs.id()) .acl("private") .build()); var allowElbLogging = new BucketPolicy("allowElbLogging", BucketPolicyArgs.builder() .bucket(elbLogs.id()) .policy(""" { "Id": "Policy", "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:PutObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::my-elb-tf-test-bucket/AWSLogs/*", "Principal": { "AWS": [ "%s" ] } } ] } ", main.apply(getServiceAccountResult -> getServiceAccountResult.arn()))) .build()); var bar = new LoadBalancer("bar", LoadBalancerArgs.builder() .availabilityZones("us-west-2a") .accessLogs(LoadBalancerAccessLogsArgs.builder() .bucket(elbLogs.bucket()) .interval(5) .build()) .listeners(LoadBalancerListenerArgs.builder() .instancePort(8000) .instanceProtocol("http") .lbPort(80) .lbProtocol("http") .build()) .build()); } } ```
      • getServiceAccount

        public static com.pulumi.core.Output<GetServiceAccountResult> getServiceAccount​(GetServiceAccountArgs args,
                                                                                        com.pulumi.deployment.InvokeOptions options)
        Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getServiceAccount()); var elbLogs = new BucketV2("elbLogs"); var elbLogsAcl = new BucketAclV2("elbLogsAcl", BucketAclV2Args.builder() .bucket(elbLogs.id()) .acl("private") .build()); var allowElbLogging = new BucketPolicy("allowElbLogging", BucketPolicyArgs.builder() .bucket(elbLogs.id()) .policy(""" { "Id": "Policy", "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:PutObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::my-elb-tf-test-bucket/AWSLogs/*", "Principal": { "AWS": [ "%s" ] } } ] } ", main.apply(getServiceAccountResult -> getServiceAccountResult.arn()))) .build()); var bar = new LoadBalancer("bar", LoadBalancerArgs.builder() .availabilityZones("us-west-2a") .accessLogs(LoadBalancerAccessLogsArgs.builder() .bucket(elbLogs.bucket()) .interval(5) .build()) .listeners(LoadBalancerListenerArgs.builder() .instancePort(8000) .instanceProtocol("http") .lbPort(80) .lbProtocol("http") .build()) .build()); } } ```
      • getServiceAccountPlain

        public static java.util.concurrent.CompletableFuture<GetServiceAccountResult> getServiceAccountPlain​(GetServiceAccountPlainArgs args,
                                                                                                             com.pulumi.deployment.InvokeOptions options)
        Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) in a given region for the purpose of permitting in S3 bucket policy. ## Example Usage ```java package generated_program; import java.util.*; import java.io.*; import java.nio.*; import com.pulumi.*; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var main = Output.of(ElbFunctions.getServiceAccount()); var elbLogs = new BucketV2("elbLogs"); var elbLogsAcl = new BucketAclV2("elbLogsAcl", BucketAclV2Args.builder() .bucket(elbLogs.id()) .acl("private") .build()); var allowElbLogging = new BucketPolicy("allowElbLogging", BucketPolicyArgs.builder() .bucket(elbLogs.id()) .policy(""" { "Id": "Policy", "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:PutObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::my-elb-tf-test-bucket/AWSLogs/*", "Principal": { "AWS": [ "%s" ] } } ] } ", main.apply(getServiceAccountResult -> getServiceAccountResult.arn()))) .build()); var bar = new LoadBalancer("bar", LoadBalancerArgs.builder() .availabilityZones("us-west-2a") .accessLogs(LoadBalancerAccessLogsArgs.builder() .bucket(elbLogs.bucket()) .interval(5) .build()) .listeners(LoadBalancerListenerArgs.builder() .instancePort(8000) .instanceProtocol("http") .lbPort(80) .lbProtocol("http") .build()) .build()); } } ```