All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.AwsFunctions Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.inputs.GetArnArgs;
import com.pulumi.aws.inputs.GetArnPlainArgs;
import com.pulumi.aws.inputs.GetAvailabilityZoneArgs;
import com.pulumi.aws.inputs.GetAvailabilityZonePlainArgs;
import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
import com.pulumi.aws.inputs.GetAvailabilityZonesPlainArgs;
import com.pulumi.aws.inputs.GetBillingServiceAccountArgs;
import com.pulumi.aws.inputs.GetBillingServiceAccountPlainArgs;
import com.pulumi.aws.inputs.GetCallerIdentityArgs;
import com.pulumi.aws.inputs.GetCallerIdentityPlainArgs;
import com.pulumi.aws.inputs.GetDefaultTagsArgs;
import com.pulumi.aws.inputs.GetDefaultTagsPlainArgs;
import com.pulumi.aws.inputs.GetIpRangesArgs;
import com.pulumi.aws.inputs.GetIpRangesPlainArgs;
import com.pulumi.aws.inputs.GetPartitionArgs;
import com.pulumi.aws.inputs.GetPartitionPlainArgs;
import com.pulumi.aws.inputs.GetRegionArgs;
import com.pulumi.aws.inputs.GetRegionPlainArgs;
import com.pulumi.aws.inputs.GetRegionsArgs;
import com.pulumi.aws.inputs.GetRegionsPlainArgs;
import com.pulumi.aws.inputs.GetServiceArgs;
import com.pulumi.aws.inputs.GetServicePlainArgs;
import com.pulumi.aws.outputs.GetArnResult;
import com.pulumi.aws.outputs.GetAvailabilityZoneResult;
import com.pulumi.aws.outputs.GetAvailabilityZonesResult;
import com.pulumi.aws.outputs.GetBillingServiceAccountResult;
import com.pulumi.aws.outputs.GetCallerIdentityResult;
import com.pulumi.aws.outputs.GetDefaultTagsResult;
import com.pulumi.aws.outputs.GetIpRangesResult;
import com.pulumi.aws.outputs.GetPartitionResult;
import com.pulumi.aws.outputs.GetRegionResult;
import com.pulumi.aws.outputs.GetRegionsResult;
import com.pulumi.aws.outputs.GetServiceResult;
import com.pulumi.core.Output;
import com.pulumi.core.TypeShape;
import com.pulumi.deployment.Deployment;
import com.pulumi.deployment.InvokeOptions;
import java.util.concurrent.CompletableFuture;

public final class AwsFunctions {
    /**
     * Parses an ARN into its constituent parts.
     * 
     * ## Example Usage
     * 
     * <!--Start PulumiCodeChooser -->
     * 
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetArnArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var dbInstance = AwsFunctions.getArn(GetArnArgs.builder()
     *             .arn("arn:aws:rds:eu-west-1:123456789012:db:mysql-db")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getArn(GetArnArgs args) { return getArn(args, InvokeOptions.Empty); } /** * Parses an ARN into its constituent parts. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetArnArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var dbInstance = AwsFunctions.getArn(GetArnArgs.builder()
     *             .arn("arn:aws:rds:eu-west-1:123456789012:db:mysql-db")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getArnPlain(GetArnPlainArgs args) { return getArnPlain(args, InvokeOptions.Empty); } /** * Parses an ARN into its constituent parts. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetArnArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var dbInstance = AwsFunctions.getArn(GetArnArgs.builder()
     *             .arn("arn:aws:rds:eu-west-1:123456789012:db:mysql-db")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getArn(GetArnArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getArn:getArn", TypeShape.of(GetArnResult.class), args, Utilities.withVersion(options)); } /** * Parses an ARN into its constituent parts. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetArnArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var dbInstance = AwsFunctions.getArn(GetArnArgs.builder()
     *             .arn("arn:aws:rds:eu-west-1:123456789012:db:mysql-db")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getArnPlain(GetArnPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getArn:getArn", TypeShape.of(GetArnResult.class), args, Utilities.withVersion(options)); } /** * `aws.getAvailabilityZone` provides details about a specific availability zone (AZ) * in the current region. * * This can be used both to validate an availability zone given in a variable * and to split the AZ name into its component parts of an AWS region and an * AZ identifier letter. The latter may be useful e.g., for implementing a * consistent subnet numbering scheme across several regions by mapping both * the region and the subnet letter to network numbers. * * This is different from the `aws.getAvailabilityZones` (plural) data source, * which provides a list of the available zones. * * ## Example Usage * * The following example shows how this data source might be used to derive * VPC and subnet CIDR prefixes systematically for an availability zone. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZoneArgs;
     * import com.pulumi.aws.ec2.Vpc;
     * import com.pulumi.aws.ec2.VpcArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * 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 regionNumber = config.get("regionNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         final var azNumber = config.get("azNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         // Retrieve the AZ where we want to create network resources
     *         // This must be in the region selected on the AWS provider.
     *         final var example = AwsFunctions.getAvailabilityZone(GetAvailabilityZoneArgs.builder()
     *             .name("eu-central-1a")
     *             .build());
     * 
     *         // Create a VPC for the region associated with the AZ
     *         var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
     *             .cidrBlock(StdFunctions.cidrsubnet(CidrsubnetArgs.builder()
     *                 .input("10.0.0.0/8")
     *                 .newbits(4)
     *                 .netnum(regionNumber[example.applyValue(getAvailabilityZoneResult -> getAvailabilityZoneResult.region())])
     *                 .build()).result())
     *             .build());
     * 
     *         // Create a subnet for the AZ within the regional VPC
     *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
     *             .vpcId(exampleVpc.id())
     *             .cidrBlock(exampleVpc.cidrBlock().applyValue(cidrBlock -> StdFunctions.cidrsubnet()).applyValue(invoke -> invoke.result()))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getAvailabilityZone() { return getAvailabilityZone(GetAvailabilityZoneArgs.Empty, InvokeOptions.Empty); } /** * `aws.getAvailabilityZone` provides details about a specific availability zone (AZ) * in the current region. * * This can be used both to validate an availability zone given in a variable * and to split the AZ name into its component parts of an AWS region and an * AZ identifier letter. The latter may be useful e.g., for implementing a * consistent subnet numbering scheme across several regions by mapping both * the region and the subnet letter to network numbers. * * This is different from the `aws.getAvailabilityZones` (plural) data source, * which provides a list of the available zones. * * ## Example Usage * * The following example shows how this data source might be used to derive * VPC and subnet CIDR prefixes systematically for an availability zone. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZoneArgs;
     * import com.pulumi.aws.ec2.Vpc;
     * import com.pulumi.aws.ec2.VpcArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * 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 regionNumber = config.get("regionNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         final var azNumber = config.get("azNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         // Retrieve the AZ where we want to create network resources
     *         // This must be in the region selected on the AWS provider.
     *         final var example = AwsFunctions.getAvailabilityZone(GetAvailabilityZoneArgs.builder()
     *             .name("eu-central-1a")
     *             .build());
     * 
     *         // Create a VPC for the region associated with the AZ
     *         var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
     *             .cidrBlock(StdFunctions.cidrsubnet(CidrsubnetArgs.builder()
     *                 .input("10.0.0.0/8")
     *                 .newbits(4)
     *                 .netnum(regionNumber[example.applyValue(getAvailabilityZoneResult -> getAvailabilityZoneResult.region())])
     *                 .build()).result())
     *             .build());
     * 
     *         // Create a subnet for the AZ within the regional VPC
     *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
     *             .vpcId(exampleVpc.id())
     *             .cidrBlock(exampleVpc.cidrBlock().applyValue(cidrBlock -> StdFunctions.cidrsubnet()).applyValue(invoke -> invoke.result()))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getAvailabilityZonePlain() { return getAvailabilityZonePlain(GetAvailabilityZonePlainArgs.Empty, InvokeOptions.Empty); } /** * `aws.getAvailabilityZone` provides details about a specific availability zone (AZ) * in the current region. * * This can be used both to validate an availability zone given in a variable * and to split the AZ name into its component parts of an AWS region and an * AZ identifier letter. The latter may be useful e.g., for implementing a * consistent subnet numbering scheme across several regions by mapping both * the region and the subnet letter to network numbers. * * This is different from the `aws.getAvailabilityZones` (plural) data source, * which provides a list of the available zones. * * ## Example Usage * * The following example shows how this data source might be used to derive * VPC and subnet CIDR prefixes systematically for an availability zone. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZoneArgs;
     * import com.pulumi.aws.ec2.Vpc;
     * import com.pulumi.aws.ec2.VpcArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * 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 regionNumber = config.get("regionNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         final var azNumber = config.get("azNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         // Retrieve the AZ where we want to create network resources
     *         // This must be in the region selected on the AWS provider.
     *         final var example = AwsFunctions.getAvailabilityZone(GetAvailabilityZoneArgs.builder()
     *             .name("eu-central-1a")
     *             .build());
     * 
     *         // Create a VPC for the region associated with the AZ
     *         var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
     *             .cidrBlock(StdFunctions.cidrsubnet(CidrsubnetArgs.builder()
     *                 .input("10.0.0.0/8")
     *                 .newbits(4)
     *                 .netnum(regionNumber[example.applyValue(getAvailabilityZoneResult -> getAvailabilityZoneResult.region())])
     *                 .build()).result())
     *             .build());
     * 
     *         // Create a subnet for the AZ within the regional VPC
     *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
     *             .vpcId(exampleVpc.id())
     *             .cidrBlock(exampleVpc.cidrBlock().applyValue(cidrBlock -> StdFunctions.cidrsubnet()).applyValue(invoke -> invoke.result()))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getAvailabilityZone(GetAvailabilityZoneArgs args) { return getAvailabilityZone(args, InvokeOptions.Empty); } /** * `aws.getAvailabilityZone` provides details about a specific availability zone (AZ) * in the current region. * * This can be used both to validate an availability zone given in a variable * and to split the AZ name into its component parts of an AWS region and an * AZ identifier letter. The latter may be useful e.g., for implementing a * consistent subnet numbering scheme across several regions by mapping both * the region and the subnet letter to network numbers. * * This is different from the `aws.getAvailabilityZones` (plural) data source, * which provides a list of the available zones. * * ## Example Usage * * The following example shows how this data source might be used to derive * VPC and subnet CIDR prefixes systematically for an availability zone. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZoneArgs;
     * import com.pulumi.aws.ec2.Vpc;
     * import com.pulumi.aws.ec2.VpcArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * 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 regionNumber = config.get("regionNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         final var azNumber = config.get("azNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         // Retrieve the AZ where we want to create network resources
     *         // This must be in the region selected on the AWS provider.
     *         final var example = AwsFunctions.getAvailabilityZone(GetAvailabilityZoneArgs.builder()
     *             .name("eu-central-1a")
     *             .build());
     * 
     *         // Create a VPC for the region associated with the AZ
     *         var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
     *             .cidrBlock(StdFunctions.cidrsubnet(CidrsubnetArgs.builder()
     *                 .input("10.0.0.0/8")
     *                 .newbits(4)
     *                 .netnum(regionNumber[example.applyValue(getAvailabilityZoneResult -> getAvailabilityZoneResult.region())])
     *                 .build()).result())
     *             .build());
     * 
     *         // Create a subnet for the AZ within the regional VPC
     *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
     *             .vpcId(exampleVpc.id())
     *             .cidrBlock(exampleVpc.cidrBlock().applyValue(cidrBlock -> StdFunctions.cidrsubnet()).applyValue(invoke -> invoke.result()))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getAvailabilityZonePlain(GetAvailabilityZonePlainArgs args) { return getAvailabilityZonePlain(args, InvokeOptions.Empty); } /** * `aws.getAvailabilityZone` provides details about a specific availability zone (AZ) * in the current region. * * This can be used both to validate an availability zone given in a variable * and to split the AZ name into its component parts of an AWS region and an * AZ identifier letter. The latter may be useful e.g., for implementing a * consistent subnet numbering scheme across several regions by mapping both * the region and the subnet letter to network numbers. * * This is different from the `aws.getAvailabilityZones` (plural) data source, * which provides a list of the available zones. * * ## Example Usage * * The following example shows how this data source might be used to derive * VPC and subnet CIDR prefixes systematically for an availability zone. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZoneArgs;
     * import com.pulumi.aws.ec2.Vpc;
     * import com.pulumi.aws.ec2.VpcArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * 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 regionNumber = config.get("regionNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         final var azNumber = config.get("azNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         // Retrieve the AZ where we want to create network resources
     *         // This must be in the region selected on the AWS provider.
     *         final var example = AwsFunctions.getAvailabilityZone(GetAvailabilityZoneArgs.builder()
     *             .name("eu-central-1a")
     *             .build());
     * 
     *         // Create a VPC for the region associated with the AZ
     *         var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
     *             .cidrBlock(StdFunctions.cidrsubnet(CidrsubnetArgs.builder()
     *                 .input("10.0.0.0/8")
     *                 .newbits(4)
     *                 .netnum(regionNumber[example.applyValue(getAvailabilityZoneResult -> getAvailabilityZoneResult.region())])
     *                 .build()).result())
     *             .build());
     * 
     *         // Create a subnet for the AZ within the regional VPC
     *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
     *             .vpcId(exampleVpc.id())
     *             .cidrBlock(exampleVpc.cidrBlock().applyValue(cidrBlock -> StdFunctions.cidrsubnet()).applyValue(invoke -> invoke.result()))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getAvailabilityZone(GetAvailabilityZoneArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getAvailabilityZone:getAvailabilityZone", TypeShape.of(GetAvailabilityZoneResult.class), args, Utilities.withVersion(options)); } /** * `aws.getAvailabilityZone` provides details about a specific availability zone (AZ) * in the current region. * * This can be used both to validate an availability zone given in a variable * and to split the AZ name into its component parts of an AWS region and an * AZ identifier letter. The latter may be useful e.g., for implementing a * consistent subnet numbering scheme across several regions by mapping both * the region and the subnet letter to network numbers. * * This is different from the `aws.getAvailabilityZones` (plural) data source, * which provides a list of the available zones. * * ## Example Usage * * The following example shows how this data source might be used to derive * VPC and subnet CIDR prefixes systematically for an availability zone. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZoneArgs;
     * import com.pulumi.aws.ec2.Vpc;
     * import com.pulumi.aws.ec2.VpcArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * 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 regionNumber = config.get("regionNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         final var azNumber = config.get("azNumber").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
     *         // Retrieve the AZ where we want to create network resources
     *         // This must be in the region selected on the AWS provider.
     *         final var example = AwsFunctions.getAvailabilityZone(GetAvailabilityZoneArgs.builder()
     *             .name("eu-central-1a")
     *             .build());
     * 
     *         // Create a VPC for the region associated with the AZ
     *         var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
     *             .cidrBlock(StdFunctions.cidrsubnet(CidrsubnetArgs.builder()
     *                 .input("10.0.0.0/8")
     *                 .newbits(4)
     *                 .netnum(regionNumber[example.applyValue(getAvailabilityZoneResult -> getAvailabilityZoneResult.region())])
     *                 .build()).result())
     *             .build());
     * 
     *         // Create a subnet for the AZ within the regional VPC
     *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
     *             .vpcId(exampleVpc.id())
     *             .cidrBlock(exampleVpc.cidrBlock().applyValue(cidrBlock -> StdFunctions.cidrsubnet()).applyValue(invoke -> invoke.result()))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getAvailabilityZonePlain(GetAvailabilityZonePlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getAvailabilityZone:getAvailabilityZone", TypeShape.of(GetAvailabilityZoneResult.class), args, Utilities.withVersion(options)); } /** * The Availability Zones data source allows access to the list of AWS * Availability Zones which can be accessed by an AWS account within the region * configured in the provider. * * This is different from the `aws.getAvailabilityZone` (singular) data source, * which provides some details about a specific availability zone. * * > When [Local Zones](https://aws.amazon.com/about-aws/global-infrastructure/localzones/) are enabled in a region, by default the API and this data source include both Local Zones and Availability Zones. To return only Availability Zones, see the example section below. * * ## Example Usage * * ### By State * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         // Declare the data source
     *         final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .state("available")
     *             .build());
     * 
     *         // e.g., Create subnets in the first two available availability zones
     *         var primary = new Subnet("primary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[0]))
     *             .build());
     * 
     *         var secondary = new Subnet("secondary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[1]))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### By Filter * * All Local Zones (regardless of opt-in status): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .allAvailabilityZones(true)
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values(                
     *                     "not-opted-in",
     *                     "opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * Only Availability Zones (no Local Zones): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("opt-in-not-required")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getAvailabilityZones() { return getAvailabilityZones(GetAvailabilityZonesArgs.Empty, InvokeOptions.Empty); } /** * The Availability Zones data source allows access to the list of AWS * Availability Zones which can be accessed by an AWS account within the region * configured in the provider. * * This is different from the `aws.getAvailabilityZone` (singular) data source, * which provides some details about a specific availability zone. * * > When [Local Zones](https://aws.amazon.com/about-aws/global-infrastructure/localzones/) are enabled in a region, by default the API and this data source include both Local Zones and Availability Zones. To return only Availability Zones, see the example section below. * * ## Example Usage * * ### By State * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         // Declare the data source
     *         final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .state("available")
     *             .build());
     * 
     *         // e.g., Create subnets in the first two available availability zones
     *         var primary = new Subnet("primary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[0]))
     *             .build());
     * 
     *         var secondary = new Subnet("secondary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[1]))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### By Filter * * All Local Zones (regardless of opt-in status): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .allAvailabilityZones(true)
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values(                
     *                     "not-opted-in",
     *                     "opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * Only Availability Zones (no Local Zones): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("opt-in-not-required")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getAvailabilityZonesPlain() { return getAvailabilityZonesPlain(GetAvailabilityZonesPlainArgs.Empty, InvokeOptions.Empty); } /** * The Availability Zones data source allows access to the list of AWS * Availability Zones which can be accessed by an AWS account within the region * configured in the provider. * * This is different from the `aws.getAvailabilityZone` (singular) data source, * which provides some details about a specific availability zone. * * > When [Local Zones](https://aws.amazon.com/about-aws/global-infrastructure/localzones/) are enabled in a region, by default the API and this data source include both Local Zones and Availability Zones. To return only Availability Zones, see the example section below. * * ## Example Usage * * ### By State * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         // Declare the data source
     *         final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .state("available")
     *             .build());
     * 
     *         // e.g., Create subnets in the first two available availability zones
     *         var primary = new Subnet("primary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[0]))
     *             .build());
     * 
     *         var secondary = new Subnet("secondary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[1]))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### By Filter * * All Local Zones (regardless of opt-in status): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .allAvailabilityZones(true)
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values(                
     *                     "not-opted-in",
     *                     "opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * Only Availability Zones (no Local Zones): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("opt-in-not-required")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getAvailabilityZones(GetAvailabilityZonesArgs args) { return getAvailabilityZones(args, InvokeOptions.Empty); } /** * The Availability Zones data source allows access to the list of AWS * Availability Zones which can be accessed by an AWS account within the region * configured in the provider. * * This is different from the `aws.getAvailabilityZone` (singular) data source, * which provides some details about a specific availability zone. * * > When [Local Zones](https://aws.amazon.com/about-aws/global-infrastructure/localzones/) are enabled in a region, by default the API and this data source include both Local Zones and Availability Zones. To return only Availability Zones, see the example section below. * * ## Example Usage * * ### By State * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         // Declare the data source
     *         final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .state("available")
     *             .build());
     * 
     *         // e.g., Create subnets in the first two available availability zones
     *         var primary = new Subnet("primary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[0]))
     *             .build());
     * 
     *         var secondary = new Subnet("secondary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[1]))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### By Filter * * All Local Zones (regardless of opt-in status): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .allAvailabilityZones(true)
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values(                
     *                     "not-opted-in",
     *                     "opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * Only Availability Zones (no Local Zones): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("opt-in-not-required")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getAvailabilityZonesPlain(GetAvailabilityZonesPlainArgs args) { return getAvailabilityZonesPlain(args, InvokeOptions.Empty); } /** * The Availability Zones data source allows access to the list of AWS * Availability Zones which can be accessed by an AWS account within the region * configured in the provider. * * This is different from the `aws.getAvailabilityZone` (singular) data source, * which provides some details about a specific availability zone. * * > When [Local Zones](https://aws.amazon.com/about-aws/global-infrastructure/localzones/) are enabled in a region, by default the API and this data source include both Local Zones and Availability Zones. To return only Availability Zones, see the example section below. * * ## Example Usage * * ### By State * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         // Declare the data source
     *         final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .state("available")
     *             .build());
     * 
     *         // e.g., Create subnets in the first two available availability zones
     *         var primary = new Subnet("primary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[0]))
     *             .build());
     * 
     *         var secondary = new Subnet("secondary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[1]))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### By Filter * * All Local Zones (regardless of opt-in status): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .allAvailabilityZones(true)
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values(                
     *                     "not-opted-in",
     *                     "opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * Only Availability Zones (no Local Zones): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("opt-in-not-required")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getAvailabilityZones(GetAvailabilityZonesArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getAvailabilityZones:getAvailabilityZones", TypeShape.of(GetAvailabilityZonesResult.class), args, Utilities.withVersion(options)); } /** * The Availability Zones data source allows access to the list of AWS * Availability Zones which can be accessed by an AWS account within the region * configured in the provider. * * This is different from the `aws.getAvailabilityZone` (singular) data source, * which provides some details about a specific availability zone. * * > When [Local Zones](https://aws.amazon.com/about-aws/global-infrastructure/localzones/) are enabled in a region, by default the API and this data source include both Local Zones and Availability Zones. To return only Availability Zones, see the example section below. * * ## Example Usage * * ### By State * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import com.pulumi.aws.ec2.Subnet;
     * import com.pulumi.aws.ec2.SubnetArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         // Declare the data source
     *         final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .state("available")
     *             .build());
     * 
     *         // e.g., Create subnets in the first two available availability zones
     *         var primary = new Subnet("primary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[0]))
     *             .build());
     * 
     *         var secondary = new Subnet("secondary", SubnetArgs.builder()
     *             .availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[1]))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### By Filter * * All Local Zones (regardless of opt-in status): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .allAvailabilityZones(true)
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values(                
     *                     "not-opted-in",
     *                     "opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * Only Availability Zones (no Local Zones): * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
     *             .filters(GetAvailabilityZonesFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("opt-in-not-required")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getAvailabilityZonesPlain(GetAvailabilityZonesPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getAvailabilityZones:getAvailabilityZones", TypeShape.of(GetAvailabilityZonesResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to get the Account ID of the [AWS Billing and Cost Management Service Account](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2) for the purpose of permitting in S3 bucket policy. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetBillingServiceAccountArgs;
     * import com.pulumi.aws.s3.BucketV2;
     * import com.pulumi.aws.s3.BucketV2Args;
     * import com.pulumi.aws.s3.BucketAclV2;
     * import com.pulumi.aws.s3.BucketAclV2Args;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import com.pulumi.aws.s3.BucketPolicy;
     * import com.pulumi.aws.s3.BucketPolicyArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var main = AwsFunctions.getBillingServiceAccount();
     * 
     *         var billingLogs = new BucketV2("billingLogs", BucketV2Args.builder()
     *             .bucket("my-billing-tf-test-bucket")
     *             .build());
     * 
     *         var billingLogsAcl = new BucketAclV2("billingLogsAcl", BucketAclV2Args.builder()
     *             .bucket(billingLogs.id())
     *             .acl("private")
     *             .build());
     * 
     *         final var allowBillingLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(            
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions(                    
     *                         "s3:GetBucketAcl",
     *                         "s3:GetBucketPolicy")
     *                     .resources(billingLogs.arn())
     *                     .build(),
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions("s3:PutObject")
     *                     .resources(billingLogs.arn().applyValue(arn -> String.format("%s/*", arn)))
     *                     .build())
     *             .build());
     * 
     *         var allowBillingLoggingBucketPolicy = new BucketPolicy("allowBillingLoggingBucketPolicy", BucketPolicyArgs.builder()
     *             .bucket(billingLogs.id())
     *             .policy(allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(allowBillingLogging -> allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getBillingServiceAccount() { return getBillingServiceAccount(GetBillingServiceAccountArgs.Empty, InvokeOptions.Empty); } /** * Use this data source to get the Account ID of the [AWS Billing and Cost Management Service Account](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2) for the purpose of permitting in S3 bucket policy. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetBillingServiceAccountArgs;
     * import com.pulumi.aws.s3.BucketV2;
     * import com.pulumi.aws.s3.BucketV2Args;
     * import com.pulumi.aws.s3.BucketAclV2;
     * import com.pulumi.aws.s3.BucketAclV2Args;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import com.pulumi.aws.s3.BucketPolicy;
     * import com.pulumi.aws.s3.BucketPolicyArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var main = AwsFunctions.getBillingServiceAccount();
     * 
     *         var billingLogs = new BucketV2("billingLogs", BucketV2Args.builder()
     *             .bucket("my-billing-tf-test-bucket")
     *             .build());
     * 
     *         var billingLogsAcl = new BucketAclV2("billingLogsAcl", BucketAclV2Args.builder()
     *             .bucket(billingLogs.id())
     *             .acl("private")
     *             .build());
     * 
     *         final var allowBillingLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(            
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions(                    
     *                         "s3:GetBucketAcl",
     *                         "s3:GetBucketPolicy")
     *                     .resources(billingLogs.arn())
     *                     .build(),
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions("s3:PutObject")
     *                     .resources(billingLogs.arn().applyValue(arn -> String.format("%s/*", arn)))
     *                     .build())
     *             .build());
     * 
     *         var allowBillingLoggingBucketPolicy = new BucketPolicy("allowBillingLoggingBucketPolicy", BucketPolicyArgs.builder()
     *             .bucket(billingLogs.id())
     *             .policy(allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(allowBillingLogging -> allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getBillingServiceAccountPlain() { return getBillingServiceAccountPlain(GetBillingServiceAccountPlainArgs.Empty, InvokeOptions.Empty); } /** * Use this data source to get the Account ID of the [AWS Billing and Cost Management Service Account](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2) for the purpose of permitting in S3 bucket policy. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetBillingServiceAccountArgs;
     * import com.pulumi.aws.s3.BucketV2;
     * import com.pulumi.aws.s3.BucketV2Args;
     * import com.pulumi.aws.s3.BucketAclV2;
     * import com.pulumi.aws.s3.BucketAclV2Args;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import com.pulumi.aws.s3.BucketPolicy;
     * import com.pulumi.aws.s3.BucketPolicyArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var main = AwsFunctions.getBillingServiceAccount();
     * 
     *         var billingLogs = new BucketV2("billingLogs", BucketV2Args.builder()
     *             .bucket("my-billing-tf-test-bucket")
     *             .build());
     * 
     *         var billingLogsAcl = new BucketAclV2("billingLogsAcl", BucketAclV2Args.builder()
     *             .bucket(billingLogs.id())
     *             .acl("private")
     *             .build());
     * 
     *         final var allowBillingLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(            
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions(                    
     *                         "s3:GetBucketAcl",
     *                         "s3:GetBucketPolicy")
     *                     .resources(billingLogs.arn())
     *                     .build(),
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions("s3:PutObject")
     *                     .resources(billingLogs.arn().applyValue(arn -> String.format("%s/*", arn)))
     *                     .build())
     *             .build());
     * 
     *         var allowBillingLoggingBucketPolicy = new BucketPolicy("allowBillingLoggingBucketPolicy", BucketPolicyArgs.builder()
     *             .bucket(billingLogs.id())
     *             .policy(allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(allowBillingLogging -> allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getBillingServiceAccount(GetBillingServiceAccountArgs args) { return getBillingServiceAccount(args, InvokeOptions.Empty); } /** * Use this data source to get the Account ID of the [AWS Billing and Cost Management Service Account](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2) for the purpose of permitting in S3 bucket policy. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetBillingServiceAccountArgs;
     * import com.pulumi.aws.s3.BucketV2;
     * import com.pulumi.aws.s3.BucketV2Args;
     * import com.pulumi.aws.s3.BucketAclV2;
     * import com.pulumi.aws.s3.BucketAclV2Args;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import com.pulumi.aws.s3.BucketPolicy;
     * import com.pulumi.aws.s3.BucketPolicyArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var main = AwsFunctions.getBillingServiceAccount();
     * 
     *         var billingLogs = new BucketV2("billingLogs", BucketV2Args.builder()
     *             .bucket("my-billing-tf-test-bucket")
     *             .build());
     * 
     *         var billingLogsAcl = new BucketAclV2("billingLogsAcl", BucketAclV2Args.builder()
     *             .bucket(billingLogs.id())
     *             .acl("private")
     *             .build());
     * 
     *         final var allowBillingLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(            
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions(                    
     *                         "s3:GetBucketAcl",
     *                         "s3:GetBucketPolicy")
     *                     .resources(billingLogs.arn())
     *                     .build(),
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions("s3:PutObject")
     *                     .resources(billingLogs.arn().applyValue(arn -> String.format("%s/*", arn)))
     *                     .build())
     *             .build());
     * 
     *         var allowBillingLoggingBucketPolicy = new BucketPolicy("allowBillingLoggingBucketPolicy", BucketPolicyArgs.builder()
     *             .bucket(billingLogs.id())
     *             .policy(allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(allowBillingLogging -> allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getBillingServiceAccountPlain(GetBillingServiceAccountPlainArgs args) { return getBillingServiceAccountPlain(args, InvokeOptions.Empty); } /** * Use this data source to get the Account ID of the [AWS Billing and Cost Management Service Account](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2) for the purpose of permitting in S3 bucket policy. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetBillingServiceAccountArgs;
     * import com.pulumi.aws.s3.BucketV2;
     * import com.pulumi.aws.s3.BucketV2Args;
     * import com.pulumi.aws.s3.BucketAclV2;
     * import com.pulumi.aws.s3.BucketAclV2Args;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import com.pulumi.aws.s3.BucketPolicy;
     * import com.pulumi.aws.s3.BucketPolicyArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var main = AwsFunctions.getBillingServiceAccount();
     * 
     *         var billingLogs = new BucketV2("billingLogs", BucketV2Args.builder()
     *             .bucket("my-billing-tf-test-bucket")
     *             .build());
     * 
     *         var billingLogsAcl = new BucketAclV2("billingLogsAcl", BucketAclV2Args.builder()
     *             .bucket(billingLogs.id())
     *             .acl("private")
     *             .build());
     * 
     *         final var allowBillingLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(            
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions(                    
     *                         "s3:GetBucketAcl",
     *                         "s3:GetBucketPolicy")
     *                     .resources(billingLogs.arn())
     *                     .build(),
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions("s3:PutObject")
     *                     .resources(billingLogs.arn().applyValue(arn -> String.format("%s/*", arn)))
     *                     .build())
     *             .build());
     * 
     *         var allowBillingLoggingBucketPolicy = new BucketPolicy("allowBillingLoggingBucketPolicy", BucketPolicyArgs.builder()
     *             .bucket(billingLogs.id())
     *             .policy(allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(allowBillingLogging -> allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getBillingServiceAccount(GetBillingServiceAccountArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getBillingServiceAccount:getBillingServiceAccount", TypeShape.of(GetBillingServiceAccountResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to get the Account ID of the [AWS Billing and Cost Management Service Account](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2) for the purpose of permitting in S3 bucket policy. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetBillingServiceAccountArgs;
     * import com.pulumi.aws.s3.BucketV2;
     * import com.pulumi.aws.s3.BucketV2Args;
     * import com.pulumi.aws.s3.BucketAclV2;
     * import com.pulumi.aws.s3.BucketAclV2Args;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import com.pulumi.aws.s3.BucketPolicy;
     * import com.pulumi.aws.s3.BucketPolicyArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var main = AwsFunctions.getBillingServiceAccount();
     * 
     *         var billingLogs = new BucketV2("billingLogs", BucketV2Args.builder()
     *             .bucket("my-billing-tf-test-bucket")
     *             .build());
     * 
     *         var billingLogsAcl = new BucketAclV2("billingLogsAcl", BucketAclV2Args.builder()
     *             .bucket(billingLogs.id())
     *             .acl("private")
     *             .build());
     * 
     *         final var allowBillingLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(            
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions(                    
     *                         "s3:GetBucketAcl",
     *                         "s3:GetBucketPolicy")
     *                     .resources(billingLogs.arn())
     *                     .build(),
     *                 GetPolicyDocumentStatementArgs.builder()
     *                     .effect("Allow")
     *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
     *                         .type("AWS")
     *                         .identifiers(main.applyValue(getBillingServiceAccountResult -> getBillingServiceAccountResult.arn()))
     *                         .build())
     *                     .actions("s3:PutObject")
     *                     .resources(billingLogs.arn().applyValue(arn -> String.format("%s/*", arn)))
     *                     .build())
     *             .build());
     * 
     *         var allowBillingLoggingBucketPolicy = new BucketPolicy("allowBillingLoggingBucketPolicy", BucketPolicyArgs.builder()
     *             .bucket(billingLogs.id())
     *             .policy(allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(allowBillingLogging -> allowBillingLogging.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getBillingServiceAccountPlain(GetBillingServiceAccountPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getBillingServiceAccount:getBillingServiceAccount", TypeShape.of(GetBillingServiceAccountResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to get the access to the effective Account ID, User ID, and ARN in * which this provider is authorized. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetCallerIdentityArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getCallerIdentity();
     * 
     *         ctx.export("accountId", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()));
     *         ctx.export("callerArn", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.arn()));
     *         ctx.export("callerUser", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.userId()));
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getCallerIdentity() { return getCallerIdentity(GetCallerIdentityArgs.Empty, InvokeOptions.Empty); } /** * Use this data source to get the access to the effective Account ID, User ID, and ARN in * which this provider is authorized. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetCallerIdentityArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getCallerIdentity();
     * 
     *         ctx.export("accountId", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()));
     *         ctx.export("callerArn", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.arn()));
     *         ctx.export("callerUser", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.userId()));
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getCallerIdentityPlain() { return getCallerIdentityPlain(GetCallerIdentityPlainArgs.Empty, InvokeOptions.Empty); } /** * Use this data source to get the access to the effective Account ID, User ID, and ARN in * which this provider is authorized. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetCallerIdentityArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getCallerIdentity();
     * 
     *         ctx.export("accountId", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()));
     *         ctx.export("callerArn", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.arn()));
     *         ctx.export("callerUser", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.userId()));
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getCallerIdentity(GetCallerIdentityArgs args) { return getCallerIdentity(args, InvokeOptions.Empty); } /** * Use this data source to get the access to the effective Account ID, User ID, and ARN in * which this provider is authorized. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetCallerIdentityArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getCallerIdentity();
     * 
     *         ctx.export("accountId", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()));
     *         ctx.export("callerArn", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.arn()));
     *         ctx.export("callerUser", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.userId()));
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getCallerIdentityPlain(GetCallerIdentityPlainArgs args) { return getCallerIdentityPlain(args, InvokeOptions.Empty); } /** * Use this data source to get the access to the effective Account ID, User ID, and ARN in * which this provider is authorized. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetCallerIdentityArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getCallerIdentity();
     * 
     *         ctx.export("accountId", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()));
     *         ctx.export("callerArn", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.arn()));
     *         ctx.export("callerUser", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.userId()));
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getCallerIdentity(GetCallerIdentityArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getCallerIdentity:getCallerIdentity", TypeShape.of(GetCallerIdentityResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to get the access to the effective Account ID, User ID, and ARN in * which this provider is authorized. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetCallerIdentityArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getCallerIdentity();
     * 
     *         ctx.export("accountId", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()));
     *         ctx.export("callerArn", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.arn()));
     *         ctx.export("callerUser", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.userId()));
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getCallerIdentityPlain(GetCallerIdentityPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getCallerIdentity:getCallerIdentity", TypeShape.of(GetCallerIdentityResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to get the default tags configured on the provider. * * With this data source, you can apply default tags to resources not _directly_ managed by a resource, such as the instances underneath an Auto Scaling group or the volumes created for an EC2 instance. * * ## Example Usage * * ### Basic Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetDefaultTagsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getDefaultTags();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Dynamically Apply Default Tags to Auto Scaling Group * * <!--Start PulumiCodeChooser --> * <!--End PulumiCodeChooser --> * */ public static Output getDefaultTags() { return getDefaultTags(GetDefaultTagsArgs.Empty, InvokeOptions.Empty); } /** * Use this data source to get the default tags configured on the provider. * * With this data source, you can apply default tags to resources not _directly_ managed by a resource, such as the instances underneath an Auto Scaling group or the volumes created for an EC2 instance. * * ## Example Usage * * ### Basic Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetDefaultTagsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getDefaultTags();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Dynamically Apply Default Tags to Auto Scaling Group * * <!--Start PulumiCodeChooser --> * <!--End PulumiCodeChooser --> * */ public static CompletableFuture getDefaultTagsPlain() { return getDefaultTagsPlain(GetDefaultTagsPlainArgs.Empty, InvokeOptions.Empty); } /** * Use this data source to get the default tags configured on the provider. * * With this data source, you can apply default tags to resources not _directly_ managed by a resource, such as the instances underneath an Auto Scaling group or the volumes created for an EC2 instance. * * ## Example Usage * * ### Basic Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetDefaultTagsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getDefaultTags();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Dynamically Apply Default Tags to Auto Scaling Group * * <!--Start PulumiCodeChooser --> * <!--End PulumiCodeChooser --> * */ public static Output getDefaultTags(GetDefaultTagsArgs args) { return getDefaultTags(args, InvokeOptions.Empty); } /** * Use this data source to get the default tags configured on the provider. * * With this data source, you can apply default tags to resources not _directly_ managed by a resource, such as the instances underneath an Auto Scaling group or the volumes created for an EC2 instance. * * ## Example Usage * * ### Basic Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetDefaultTagsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getDefaultTags();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Dynamically Apply Default Tags to Auto Scaling Group * * <!--Start PulumiCodeChooser --> * <!--End PulumiCodeChooser --> * */ public static CompletableFuture getDefaultTagsPlain(GetDefaultTagsPlainArgs args) { return getDefaultTagsPlain(args, InvokeOptions.Empty); } /** * Use this data source to get the default tags configured on the provider. * * With this data source, you can apply default tags to resources not _directly_ managed by a resource, such as the instances underneath an Auto Scaling group or the volumes created for an EC2 instance. * * ## Example Usage * * ### Basic Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetDefaultTagsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getDefaultTags();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Dynamically Apply Default Tags to Auto Scaling Group * * <!--Start PulumiCodeChooser --> * <!--End PulumiCodeChooser --> * */ public static Output getDefaultTags(GetDefaultTagsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getDefaultTags:getDefaultTags", TypeShape.of(GetDefaultTagsResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to get the default tags configured on the provider. * * With this data source, you can apply default tags to resources not _directly_ managed by a resource, such as the instances underneath an Auto Scaling group or the volumes created for an EC2 instance. * * ## Example Usage * * ### Basic Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetDefaultTagsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = AwsFunctions.getDefaultTags();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Dynamically Apply Default Tags to Auto Scaling Group * * <!--Start PulumiCodeChooser --> * <!--End PulumiCodeChooser --> * */ public static CompletableFuture getDefaultTagsPlain(GetDefaultTagsPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getDefaultTags:getDefaultTags", TypeShape.of(GetDefaultTagsResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to get the IP ranges of various AWS products and services. For more information about the contents of this data source and required JSON syntax if referencing a custom URL, see the [AWS IP Address Ranges documentation](https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html). * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetIpRangesArgs;
     * import com.pulumi.aws.ec2.SecurityGroup;
     * import com.pulumi.aws.ec2.SecurityGroupArgs;
     * import com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var europeanEc2 = AwsFunctions.getIpRanges(GetIpRangesArgs.builder()
     *             .regions(            
     *                 "eu-west-1",
     *                 "eu-central-1")
     *             .services("ec2")
     *             .build());
     * 
     *         var fromEurope = new SecurityGroup("fromEurope", SecurityGroupArgs.builder()
     *             .name("from_europe")
     *             .ingress(SecurityGroupIngressArgs.builder()
     *                 .fromPort("443")
     *                 .toPort("443")
     *                 .protocol("tcp")
     *                 .cidrBlocks(europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.cidrBlocks()))
     *                 .ipv6CidrBlocks(europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.ipv6CidrBlocks()))
     *                 .build())
     *             .tags(Map.ofEntries(
     *                 Map.entry("CreateDate", europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.createDate())),
     *                 Map.entry("SyncToken", europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.syncToken()))
     *             ))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getIpRanges(GetIpRangesArgs args) { return getIpRanges(args, InvokeOptions.Empty); } /** * Use this data source to get the IP ranges of various AWS products and services. For more information about the contents of this data source and required JSON syntax if referencing a custom URL, see the [AWS IP Address Ranges documentation](https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html). * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetIpRangesArgs;
     * import com.pulumi.aws.ec2.SecurityGroup;
     * import com.pulumi.aws.ec2.SecurityGroupArgs;
     * import com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var europeanEc2 = AwsFunctions.getIpRanges(GetIpRangesArgs.builder()
     *             .regions(            
     *                 "eu-west-1",
     *                 "eu-central-1")
     *             .services("ec2")
     *             .build());
     * 
     *         var fromEurope = new SecurityGroup("fromEurope", SecurityGroupArgs.builder()
     *             .name("from_europe")
     *             .ingress(SecurityGroupIngressArgs.builder()
     *                 .fromPort("443")
     *                 .toPort("443")
     *                 .protocol("tcp")
     *                 .cidrBlocks(europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.cidrBlocks()))
     *                 .ipv6CidrBlocks(europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.ipv6CidrBlocks()))
     *                 .build())
     *             .tags(Map.ofEntries(
     *                 Map.entry("CreateDate", europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.createDate())),
     *                 Map.entry("SyncToken", europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.syncToken()))
     *             ))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getIpRangesPlain(GetIpRangesPlainArgs args) { return getIpRangesPlain(args, InvokeOptions.Empty); } /** * Use this data source to get the IP ranges of various AWS products and services. For more information about the contents of this data source and required JSON syntax if referencing a custom URL, see the [AWS IP Address Ranges documentation](https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html). * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetIpRangesArgs;
     * import com.pulumi.aws.ec2.SecurityGroup;
     * import com.pulumi.aws.ec2.SecurityGroupArgs;
     * import com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var europeanEc2 = AwsFunctions.getIpRanges(GetIpRangesArgs.builder()
     *             .regions(            
     *                 "eu-west-1",
     *                 "eu-central-1")
     *             .services("ec2")
     *             .build());
     * 
     *         var fromEurope = new SecurityGroup("fromEurope", SecurityGroupArgs.builder()
     *             .name("from_europe")
     *             .ingress(SecurityGroupIngressArgs.builder()
     *                 .fromPort("443")
     *                 .toPort("443")
     *                 .protocol("tcp")
     *                 .cidrBlocks(europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.cidrBlocks()))
     *                 .ipv6CidrBlocks(europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.ipv6CidrBlocks()))
     *                 .build())
     *             .tags(Map.ofEntries(
     *                 Map.entry("CreateDate", europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.createDate())),
     *                 Map.entry("SyncToken", europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.syncToken()))
     *             ))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getIpRanges(GetIpRangesArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getIpRanges:getIpRanges", TypeShape.of(GetIpRangesResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to get the IP ranges of various AWS products and services. For more information about the contents of this data source and required JSON syntax if referencing a custom URL, see the [AWS IP Address Ranges documentation](https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html). * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetIpRangesArgs;
     * import com.pulumi.aws.ec2.SecurityGroup;
     * import com.pulumi.aws.ec2.SecurityGroupArgs;
     * import com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var europeanEc2 = AwsFunctions.getIpRanges(GetIpRangesArgs.builder()
     *             .regions(            
     *                 "eu-west-1",
     *                 "eu-central-1")
     *             .services("ec2")
     *             .build());
     * 
     *         var fromEurope = new SecurityGroup("fromEurope", SecurityGroupArgs.builder()
     *             .name("from_europe")
     *             .ingress(SecurityGroupIngressArgs.builder()
     *                 .fromPort("443")
     *                 .toPort("443")
     *                 .protocol("tcp")
     *                 .cidrBlocks(europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.cidrBlocks()))
     *                 .ipv6CidrBlocks(europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.ipv6CidrBlocks()))
     *                 .build())
     *             .tags(Map.ofEntries(
     *                 Map.entry("CreateDate", europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.createDate())),
     *                 Map.entry("SyncToken", europeanEc2.applyValue(getIpRangesResult -> getIpRangesResult.syncToken()))
     *             ))
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getIpRangesPlain(GetIpRangesPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getIpRanges:getIpRanges", TypeShape.of(GetIpRangesResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to lookup information about the current AWS partition in * which the provider is working. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetPartitionArgs;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getPartition();
     * 
     *         final var s3Policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(GetPolicyDocumentStatementArgs.builder()
     *                 .sid("1")
     *                 .actions("s3:ListBucket")
     *                 .resources(String.format("arn:%s:s3:::my-bucket", current.applyValue(getPartitionResult -> getPartitionResult.partition())))
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getPartition() { return getPartition(GetPartitionArgs.Empty, InvokeOptions.Empty); } /** * Use this data source to lookup information about the current AWS partition in * which the provider is working. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetPartitionArgs;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getPartition();
     * 
     *         final var s3Policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(GetPolicyDocumentStatementArgs.builder()
     *                 .sid("1")
     *                 .actions("s3:ListBucket")
     *                 .resources(String.format("arn:%s:s3:::my-bucket", current.applyValue(getPartitionResult -> getPartitionResult.partition())))
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getPartitionPlain() { return getPartitionPlain(GetPartitionPlainArgs.Empty, InvokeOptions.Empty); } /** * Use this data source to lookup information about the current AWS partition in * which the provider is working. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetPartitionArgs;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getPartition();
     * 
     *         final var s3Policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(GetPolicyDocumentStatementArgs.builder()
     *                 .sid("1")
     *                 .actions("s3:ListBucket")
     *                 .resources(String.format("arn:%s:s3:::my-bucket", current.applyValue(getPartitionResult -> getPartitionResult.partition())))
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getPartition(GetPartitionArgs args) { return getPartition(args, InvokeOptions.Empty); } /** * Use this data source to lookup information about the current AWS partition in * which the provider is working. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetPartitionArgs;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getPartition();
     * 
     *         final var s3Policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(GetPolicyDocumentStatementArgs.builder()
     *                 .sid("1")
     *                 .actions("s3:ListBucket")
     *                 .resources(String.format("arn:%s:s3:::my-bucket", current.applyValue(getPartitionResult -> getPartitionResult.partition())))
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getPartitionPlain(GetPartitionPlainArgs args) { return getPartitionPlain(args, InvokeOptions.Empty); } /** * Use this data source to lookup information about the current AWS partition in * which the provider is working. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetPartitionArgs;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getPartition();
     * 
     *         final var s3Policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(GetPolicyDocumentStatementArgs.builder()
     *                 .sid("1")
     *                 .actions("s3:ListBucket")
     *                 .resources(String.format("arn:%s:s3:::my-bucket", current.applyValue(getPartitionResult -> getPartitionResult.partition())))
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getPartition(GetPartitionArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getPartition:getPartition", TypeShape.of(GetPartitionResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to lookup information about the current AWS partition in * which the provider is working. * * ## Example Usage * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetPartitionArgs;
     * import com.pulumi.aws.iam.IamFunctions;
     * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getPartition();
     * 
     *         final var s3Policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
     *             .statements(GetPolicyDocumentStatementArgs.builder()
     *                 .sid("1")
     *                 .actions("s3:ListBucket")
     *                 .resources(String.format("arn:%s:s3:::my-bucket", current.applyValue(getPartitionResult -> getPartitionResult.partition())))
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getPartitionPlain(GetPartitionPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getPartition:getPartition", TypeShape.of(GetPartitionResult.class), args, Utilities.withVersion(options)); } /** * `aws.getRegion` provides details about a specific AWS region. * * As well as validating a given region name this resource can be used to * discover the name of the region configured within the provider. The latter * can be useful in a child module which is inheriting an AWS provider * configuration from its parent module. * * ## Example Usage * * The following example shows how the resource might be used to obtain * the name of the AWS region configured on the provider. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getRegion() { return getRegion(GetRegionArgs.Empty, InvokeOptions.Empty); } /** * `aws.getRegion` provides details about a specific AWS region. * * As well as validating a given region name this resource can be used to * discover the name of the region configured within the provider. The latter * can be useful in a child module which is inheriting an AWS provider * configuration from its parent module. * * ## Example Usage * * The following example shows how the resource might be used to obtain * the name of the AWS region configured on the provider. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getRegionPlain() { return getRegionPlain(GetRegionPlainArgs.Empty, InvokeOptions.Empty); } /** * `aws.getRegion` provides details about a specific AWS region. * * As well as validating a given region name this resource can be used to * discover the name of the region configured within the provider. The latter * can be useful in a child module which is inheriting an AWS provider * configuration from its parent module. * * ## Example Usage * * The following example shows how the resource might be used to obtain * the name of the AWS region configured on the provider. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getRegion(GetRegionArgs args) { return getRegion(args, InvokeOptions.Empty); } /** * `aws.getRegion` provides details about a specific AWS region. * * As well as validating a given region name this resource can be used to * discover the name of the region configured within the provider. The latter * can be useful in a child module which is inheriting an AWS provider * configuration from its parent module. * * ## Example Usage * * The following example shows how the resource might be used to obtain * the name of the AWS region configured on the provider. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getRegionPlain(GetRegionPlainArgs args) { return getRegionPlain(args, InvokeOptions.Empty); } /** * `aws.getRegion` provides details about a specific AWS region. * * As well as validating a given region name this resource can be used to * discover the name of the region configured within the provider. The latter * can be useful in a child module which is inheriting an AWS provider * configuration from its parent module. * * ## Example Usage * * The following example shows how the resource might be used to obtain * the name of the AWS region configured on the provider. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getRegion(GetRegionArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getRegion:getRegion", TypeShape.of(GetRegionResult.class), args, Utilities.withVersion(options)); } /** * `aws.getRegion` provides details about a specific AWS region. * * As well as validating a given region name this resource can be used to * discover the name of the region configured within the provider. The latter * can be useful in a child module which is inheriting an AWS provider * configuration from its parent module. * * ## Example Usage * * The following example shows how the resource might be used to obtain * the name of the AWS region configured on the provider. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getRegionPlain(GetRegionPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getRegion:getRegion", TypeShape.of(GetRegionResult.class), args, Utilities.withVersion(options)); } /** * Provides information about AWS Regions. Can be used to filter regions i.e., by Opt-In status or only regions enabled for current account. To get details like endpoint and description of each region the data source can be combined with the `aws.getRegion` data source. * * ## Example Usage * * Enabled AWS Regions: * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * All the regions regardless of the availability * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * To see regions that are filtered by `"not-opted-in"`, the `all_regions` argument needs to be set to `true` or no results will be returned. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .filters(GetRegionsFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("not-opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getRegions() { return getRegions(GetRegionsArgs.Empty, InvokeOptions.Empty); } /** * Provides information about AWS Regions. Can be used to filter regions i.e., by Opt-In status or only regions enabled for current account. To get details like endpoint and description of each region the data source can be combined with the `aws.getRegion` data source. * * ## Example Usage * * Enabled AWS Regions: * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * All the regions regardless of the availability * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * To see regions that are filtered by `"not-opted-in"`, the `all_regions` argument needs to be set to `true` or no results will be returned. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .filters(GetRegionsFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("not-opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getRegionsPlain() { return getRegionsPlain(GetRegionsPlainArgs.Empty, InvokeOptions.Empty); } /** * Provides information about AWS Regions. Can be used to filter regions i.e., by Opt-In status or only regions enabled for current account. To get details like endpoint and description of each region the data source can be combined with the `aws.getRegion` data source. * * ## Example Usage * * Enabled AWS Regions: * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * All the regions regardless of the availability * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * To see regions that are filtered by `"not-opted-in"`, the `all_regions` argument needs to be set to `true` or no results will be returned. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .filters(GetRegionsFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("not-opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getRegions(GetRegionsArgs args) { return getRegions(args, InvokeOptions.Empty); } /** * Provides information about AWS Regions. Can be used to filter regions i.e., by Opt-In status or only regions enabled for current account. To get details like endpoint and description of each region the data source can be combined with the `aws.getRegion` data source. * * ## Example Usage * * Enabled AWS Regions: * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * All the regions regardless of the availability * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * To see regions that are filtered by `"not-opted-in"`, the `all_regions` argument needs to be set to `true` or no results will be returned. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .filters(GetRegionsFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("not-opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getRegionsPlain(GetRegionsPlainArgs args) { return getRegionsPlain(args, InvokeOptions.Empty); } /** * Provides information about AWS Regions. Can be used to filter regions i.e., by Opt-In status or only regions enabled for current account. To get details like endpoint and description of each region the data source can be combined with the `aws.getRegion` data source. * * ## Example Usage * * Enabled AWS Regions: * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * All the regions regardless of the availability * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * To see regions that are filtered by `"not-opted-in"`, the `all_regions` argument needs to be set to `true` or no results will be returned. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .filters(GetRegionsFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("not-opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getRegions(GetRegionsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getRegions:getRegions", TypeShape.of(GetRegionsResult.class), args, Utilities.withVersion(options)); } /** * Provides information about AWS Regions. Can be used to filter regions i.e., by Opt-In status or only regions enabled for current account. To get details like endpoint and description of each region the data source can be combined with the `aws.getRegion` data source. * * ## Example Usage * * Enabled AWS Regions: * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions();
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * All the regions regardless of the availability * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * To see regions that are filtered by `"not-opted-in"`, the `all_regions` argument needs to be set to `true` or no results will be returned. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionsArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()
     *             .allRegions(true)
     *             .filters(GetRegionsFilterArgs.builder()
     *                 .name("opt-in-status")
     *                 .values("not-opted-in")
     *                 .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getRegionsPlain(GetRegionsPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getRegions:getRegions", TypeShape.of(GetRegionsResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to compose and decompose AWS service DNS names. * * ## Example Usage * * ### Get Service DNS Name * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *         final var test = AwsFunctions.getService(GetServiceArgs.builder()
     *             .region(current.applyValue(getRegionResult -> getRegionResult.name()))
     *             .serviceId("ec2")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Use Service Reverse DNS Name to Get Components * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("cn.com.amazonaws.cn-north-1.s3")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Determine Regional Support for a Service * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("com.amazonaws.us-gov-west-1.waf")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getService() { return getService(GetServiceArgs.Empty, InvokeOptions.Empty); } /** * Use this data source to compose and decompose AWS service DNS names. * * ## Example Usage * * ### Get Service DNS Name * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *         final var test = AwsFunctions.getService(GetServiceArgs.builder()
     *             .region(current.applyValue(getRegionResult -> getRegionResult.name()))
     *             .serviceId("ec2")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Use Service Reverse DNS Name to Get Components * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("cn.com.amazonaws.cn-north-1.s3")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Determine Regional Support for a Service * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("com.amazonaws.us-gov-west-1.waf")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getServicePlain() { return getServicePlain(GetServicePlainArgs.Empty, InvokeOptions.Empty); } /** * Use this data source to compose and decompose AWS service DNS names. * * ## Example Usage * * ### Get Service DNS Name * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *         final var test = AwsFunctions.getService(GetServiceArgs.builder()
     *             .region(current.applyValue(getRegionResult -> getRegionResult.name()))
     *             .serviceId("ec2")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Use Service Reverse DNS Name to Get Components * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("cn.com.amazonaws.cn-north-1.s3")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Determine Regional Support for a Service * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("com.amazonaws.us-gov-west-1.waf")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getService(GetServiceArgs args) { return getService(args, InvokeOptions.Empty); } /** * Use this data source to compose and decompose AWS service DNS names. * * ## Example Usage * * ### Get Service DNS Name * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *         final var test = AwsFunctions.getService(GetServiceArgs.builder()
     *             .region(current.applyValue(getRegionResult -> getRegionResult.name()))
     *             .serviceId("ec2")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Use Service Reverse DNS Name to Get Components * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("cn.com.amazonaws.cn-north-1.s3")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Determine Regional Support for a Service * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("com.amazonaws.us-gov-west-1.waf")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getServicePlain(GetServicePlainArgs args) { return getServicePlain(args, InvokeOptions.Empty); } /** * Use this data source to compose and decompose AWS service DNS names. * * ## Example Usage * * ### Get Service DNS Name * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *         final var test = AwsFunctions.getService(GetServiceArgs.builder()
     *             .region(current.applyValue(getRegionResult -> getRegionResult.name()))
     *             .serviceId("ec2")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Use Service Reverse DNS Name to Get Components * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("cn.com.amazonaws.cn-north-1.s3")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Determine Regional Support for a Service * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("com.amazonaws.us-gov-west-1.waf")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getService(GetServiceArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:index/getService:getService", TypeShape.of(GetServiceResult.class), args, Utilities.withVersion(options)); } /** * Use this data source to compose and decompose AWS service DNS names. * * ## Example Usage * * ### Get Service DNS Name * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetRegionArgs;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var current = AwsFunctions.getRegion();
     * 
     *         final var test = AwsFunctions.getService(GetServiceArgs.builder()
     *             .region(current.applyValue(getRegionResult -> getRegionResult.name()))
     *             .serviceId("ec2")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Use Service Reverse DNS Name to Get Components * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("cn.com.amazonaws.cn-north-1.s3")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * ### Determine Regional Support for a Service * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.AwsFunctions;
     * import com.pulumi.aws.inputs.GetServiceArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var s3 = AwsFunctions.getService(GetServiceArgs.builder()
     *             .reverseDnsName("com.amazonaws.us-gov-west-1.waf")
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getServicePlain(GetServicePlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:index/getService:getService", TypeShape.of(GetServiceResult.class), args, Utilities.withVersion(options)); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy