1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. dns
  5. getManagedZones
Google Cloud Classic v7.19.0 published on Thursday, Apr 18, 2024 by Pulumi

gcp.dns.getManagedZones

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.19.0 published on Thursday, Apr 18, 2024 by Pulumi

    Provides access to a list of zones within Google Cloud DNS. For more information see the official documentation and API.

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const zones = gcp.dns.getManagedZones({
        project: "my-project-id",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    zones = gcp.dns.get_managed_zones(project="my-project-id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dns.GetManagedZones(ctx, &dns.GetManagedZonesArgs{
    			Project: pulumi.StringRef("my-project-id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var zones = Gcp.Dns.GetManagedZones.Invoke(new()
        {
            Project = "my-project-id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.dns.DnsFunctions;
    import com.pulumi.gcp.dns.inputs.GetManagedZonesArgs;
    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 zones = DnsFunctions.getManagedZones(GetManagedZonesArgs.builder()
                .project("my-project-id")
                .build());
    
        }
    }
    
    variables:
      zones:
        fn::invoke:
          Function: gcp:dns:getManagedZones
          Arguments:
            project: my-project-id
    

    Using getManagedZones

    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 getManagedZones(args: GetManagedZonesArgs, opts?: InvokeOptions): Promise<GetManagedZonesResult>
    function getManagedZonesOutput(args: GetManagedZonesOutputArgs, opts?: InvokeOptions): Output<GetManagedZonesResult>
    def get_managed_zones(managed_zones: Optional[Sequence[GetManagedZonesManagedZone]] = None,
                          project: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetManagedZonesResult
    def get_managed_zones_output(managed_zones: Optional[pulumi.Input[Sequence[pulumi.Input[GetManagedZonesManagedZoneArgs]]]] = None,
                          project: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetManagedZonesResult]
    func GetManagedZones(ctx *Context, args *GetManagedZonesArgs, opts ...InvokeOption) (*GetManagedZonesResult, error)
    func GetManagedZonesOutput(ctx *Context, args *GetManagedZonesOutputArgs, opts ...InvokeOption) GetManagedZonesResultOutput

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

    public static class GetManagedZones 
    {
        public static Task<GetManagedZonesResult> InvokeAsync(GetManagedZonesArgs args, InvokeOptions? opts = null)
        public static Output<GetManagedZonesResult> Invoke(GetManagedZonesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetManagedZonesResult> getManagedZones(GetManagedZonesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:dns/getManagedZones:getManagedZones
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ManagedZones List<GetManagedZonesManagedZone>
    A list of managed zones.
    Project string
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    ManagedZones []GetManagedZonesManagedZone
    A list of managed zones.
    Project string
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    managedZones List<GetManagedZonesManagedZone>
    A list of managed zones.
    project String
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    managedZones GetManagedZonesManagedZone[]
    A list of managed zones.
    project string
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    managed_zones Sequence[GetManagedZonesManagedZone]
    A list of managed zones.
    project str
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    managedZones List<Property Map>
    A list of managed zones.
    project String
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.

    getManagedZones Result

    The following output properties are available:

    Id string
    ManagedZones List<GetManagedZonesManagedZone>
    A list of managed zones.
    Project string
    Id string
    ManagedZones []GetManagedZonesManagedZone
    A list of managed zones.
    Project string
    id String
    managedZones List<GetManagedZonesManagedZone>
    A list of managed zones.
    project String
    id string
    managedZones GetManagedZonesManagedZone[]
    A list of managed zones.
    project string
    id String
    managedZones List<Property Map>
    A list of managed zones.
    project String

    Supporting Types

    GetManagedZonesManagedZone

    Description string
    A textual description field.
    DnsName string
    The fully qualified DNS name of this zone.
    Id string
    DNS managed zone identifier
    ManagedZoneId int
    Unique identifier for the resource; defined by the server.
    Name string
    A unique name for the resource.
    NameServers List<string>
    The list of nameservers that will be authoritative for this domain. Use NS records to redirect from your DNS provider to these names, thus making Google Cloud DNS authoritative for this zone.
    Project string
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    Visibility string
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
    Description string
    A textual description field.
    DnsName string
    The fully qualified DNS name of this zone.
    Id string
    DNS managed zone identifier
    ManagedZoneId int
    Unique identifier for the resource; defined by the server.
    Name string
    A unique name for the resource.
    NameServers []string
    The list of nameservers that will be authoritative for this domain. Use NS records to redirect from your DNS provider to these names, thus making Google Cloud DNS authoritative for this zone.
    Project string
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    Visibility string
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
    description String
    A textual description field.
    dnsName String
    The fully qualified DNS name of this zone.
    id String
    DNS managed zone identifier
    managedZoneId Integer
    Unique identifier for the resource; defined by the server.
    name String
    A unique name for the resource.
    nameServers List<String>
    The list of nameservers that will be authoritative for this domain. Use NS records to redirect from your DNS provider to these names, thus making Google Cloud DNS authoritative for this zone.
    project String
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    visibility String
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
    description string
    A textual description field.
    dnsName string
    The fully qualified DNS name of this zone.
    id string
    DNS managed zone identifier
    managedZoneId number
    Unique identifier for the resource; defined by the server.
    name string
    A unique name for the resource.
    nameServers string[]
    The list of nameservers that will be authoritative for this domain. Use NS records to redirect from your DNS provider to these names, thus making Google Cloud DNS authoritative for this zone.
    project string
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    visibility string
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
    description str
    A textual description field.
    dns_name str
    The fully qualified DNS name of this zone.
    id str
    DNS managed zone identifier
    managed_zone_id int
    Unique identifier for the resource; defined by the server.
    name str
    A unique name for the resource.
    name_servers Sequence[str]
    The list of nameservers that will be authoritative for this domain. Use NS records to redirect from your DNS provider to these names, thus making Google Cloud DNS authoritative for this zone.
    project str
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    visibility str
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
    description String
    A textual description field.
    dnsName String
    The fully qualified DNS name of this zone.
    id String
    DNS managed zone identifier
    managedZoneId Number
    Unique identifier for the resource; defined by the server.
    name String
    A unique name for the resource.
    nameServers List<String>
    The list of nameservers that will be authoritative for this domain. Use NS records to redirect from your DNS provider to these names, thus making Google Cloud DNS authoritative for this zone.
    project String
    The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
    visibility String
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.19.0 published on Thursday, Apr 18, 2024 by Pulumi