Class GetHostedZoneId
Inheritance
System.Object
GetHostedZoneId
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.ElasticLoadBalancing
Assembly: Pulumi.Aws.dll
Syntax
[Obsolete("aws.elasticloadbalancing.getHostedZoneId has been deprecated in favor of aws.elb.getHostedZoneId")]
public static class GetHostedZoneId
Methods
View SourceInvokeAsync(GetHostedZoneIdArgs, InvokeOptions)
Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var main = Output.Create(Aws.Elb.GetHostedZoneId.InvokeAsync());
var www = new Aws.Route53.Record("www", new Aws.Route53.RecordArgs
{
Aliases =
{
new Aws.Route53.Inputs.RecordAliasArgs
{
EvaluateTargetHealth = true,
Name = aws_elb.Main.Dns_name,
ZoneId = main.Apply(main => main.Id),
},
},
Name = "example.com",
Type = "A",
ZoneId = aws_route53_zone.Primary.Zone_id,
});
}
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetHostedZoneIdResult> InvokeAsync(GetHostedZoneIdArgs args = null, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetHostedZoneIdArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetHostedZoneIdResult> |