Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi
gcp.dns.getManagedZones
Explore with Pulumi AI
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(project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetManagedZonesResult
def get_managed_zones_output(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:
- Project string
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
- Project string
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
- project String
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
- project string
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
- project str
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
- 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
- Managed
Zones List<GetManaged Zones Managed Zone> - A list of managed zones.
- Project string
- Id string
- Managed
Zones []GetManaged Zones Managed Zone - A list of managed zones.
- Project string
- id String
- managed
Zones List<GetManaged Zones Managed Zone> - A list of managed zones.
- project String
- id string
- managed
Zones GetManaged Zones Managed Zone[] - A list of managed zones.
- project string
- id str
- managed_
zones Sequence[GetManaged Zones Managed Zone] - A list of managed zones.
- project str
- id String
- managed
Zones List<Property Map> - A list of managed zones.
- project String
Supporting Types
GetManagedZonesManagedZone
- Description string
- Dns
Name string - Id string
- Managed
Zone stringId - Name
Servers List<string> - Visibility string
- Name string
- Project string
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
- Description string
- Dns
Name string - Id string
- Managed
Zone stringId - Name
Servers []string - Visibility string
- Name string
- Project string
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
- description String
- dns
Name String - id String
- managed
Zone StringId - name
Servers List<String> - visibility String
- name String
- project String
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
- description string
- dns
Name string - id string
- managed
Zone stringId - name
Servers string[] - visibility string
- name string
- project string
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
- description str
- dns_
name str - id str
- managed_
zone_ strid - name_
servers Sequence[str] - visibility str
- name str
- project str
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
- description String
- dns
Name String - id String
- managed
Zone StringId - name
Servers List<String> - visibility String
- name String
- project String
- The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
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.