1. Packages
  2. AWS Classic
  3. API Docs
  4. elasticbeanstalk
  5. getHostedZone

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.elasticbeanstalk.getHostedZone

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Use this data source to get the ID of an elastic beanstalk hosted zone.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const current = aws.elasticbeanstalk.getHostedZone({});
    
    import pulumi
    import pulumi_aws as aws
    
    current = aws.elasticbeanstalk.get_hosted_zone()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticbeanstalk"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := elasticbeanstalk.GetHostedZone(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Aws.ElasticBeanstalk.GetHostedZone.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.elasticbeanstalk.ElasticbeanstalkFunctions;
    import com.pulumi.aws.elasticbeanstalk.inputs.GetHostedZoneArgs;
    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 = ElasticbeanstalkFunctions.getHostedZone();
    
        }
    }
    
    variables:
      current:
        fn::invoke:
          Function: aws:elasticbeanstalk:getHostedZone
          Arguments: {}
    

    Using getHostedZone

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getHostedZone(args: GetHostedZoneArgs, opts?: InvokeOptions): Promise<GetHostedZoneResult>
    function getHostedZoneOutput(args: GetHostedZoneOutputArgs, opts?: InvokeOptions): Output<GetHostedZoneResult>
    def get_hosted_zone(region: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetHostedZoneResult
    def get_hosted_zone_output(region: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetHostedZoneResult]
    func GetHostedZone(ctx *Context, args *GetHostedZoneArgs, opts ...InvokeOption) (*GetHostedZoneResult, error)
    func GetHostedZoneOutput(ctx *Context, args *GetHostedZoneOutputArgs, opts ...InvokeOption) GetHostedZoneResultOutput

    > Note: This function is named GetHostedZone in the Go SDK.

    public static class GetHostedZone 
    {
        public static Task<GetHostedZoneResult> InvokeAsync(GetHostedZoneArgs args, InvokeOptions? opts = null)
        public static Output<GetHostedZoneResult> Invoke(GetHostedZoneInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetHostedZoneResult> getHostedZone(GetHostedZoneArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:elasticbeanstalk/getHostedZone:getHostedZone
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Region string
    Region you'd like the zone for. By default, fetches the current region.
    Region string
    Region you'd like the zone for. By default, fetches the current region.
    region String
    Region you'd like the zone for. By default, fetches the current region.
    region string
    Region you'd like the zone for. By default, fetches the current region.
    region str
    Region you'd like the zone for. By default, fetches the current region.
    region String
    Region you'd like the zone for. By default, fetches the current region.

    getHostedZone Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    Region of the hosted zone.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    Region of the hosted zone.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    Region of the hosted zone.
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    Region of the hosted zone.
    id str
    The provider-assigned unique ID for this managed resource.
    region str
    Region of the hosted zone.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    Region of the hosted zone.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi