1. Packages
  2. AWS
  3. API Docs
  4. elasticbeanstalk
  5. getHostedZone
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.elasticbeanstalk.getHostedZone

Explore with Pulumi AI

AWS v6.76.0 published on Tuesday, Apr 8, 2025 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({});
Copy
import pulumi
import pulumi_aws as aws

current = aws.elasticbeanstalk.get_hosted_zone()
Copy
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, &elasticbeanstalk.GetHostedZoneArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var current = Aws.ElasticBeanstalk.GetHostedZone.Invoke();

});
Copy
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();

    }
}
Copy
variables:
  current:
    fn::invoke:
      function: aws:elasticbeanstalk:getHostedZone
      arguments: {}
Copy

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>
Copy
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]
Copy
func GetHostedZone(ctx *Context, args *GetHostedZoneArgs, opts ...InvokeOption) (*GetHostedZoneResult, error)
func GetHostedZoneOutput(ctx *Context, args *GetHostedZoneOutputArgs, opts ...InvokeOption) GetHostedZoneResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetHostedZoneResult> getHostedZone(GetHostedZoneArgs args, InvokeOptions options)
public static Output<GetHostedZoneResult> getHostedZone(GetHostedZoneArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:elasticbeanstalk/getHostedZone:getHostedZone
  arguments:
    # arguments dictionary
Copy

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 v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi