aws logo
AWS Classic v5.41.0, May 15 23

aws.elasticbeanstalk.getHostedZone

Explore with Pulumi AI

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

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

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

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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
	})
}
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();

    }
}
import pulumi
import pulumi_aws as aws

current = aws.elasticbeanstalk.get_hosted_zone()
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const current = aws.elasticbeanstalk.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.