com.pulumi.gcp.dns.kotlin.DnsFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.dns.kotlin
import com.pulumi.gcp.dns.DnsFunctions.getKeysPlain
import com.pulumi.gcp.dns.DnsFunctions.getManagedZoneIamPolicyPlain
import com.pulumi.gcp.dns.DnsFunctions.getManagedZonePlain
import com.pulumi.gcp.dns.DnsFunctions.getManagedZonesPlain
import com.pulumi.gcp.dns.DnsFunctions.getRecordSetPlain
import com.pulumi.gcp.dns.kotlin.inputs.GetKeysPlainArgs
import com.pulumi.gcp.dns.kotlin.inputs.GetKeysPlainArgsBuilder
import com.pulumi.gcp.dns.kotlin.inputs.GetManagedZoneIamPolicyPlainArgs
import com.pulumi.gcp.dns.kotlin.inputs.GetManagedZoneIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dns.kotlin.inputs.GetManagedZonePlainArgs
import com.pulumi.gcp.dns.kotlin.inputs.GetManagedZonePlainArgsBuilder
import com.pulumi.gcp.dns.kotlin.inputs.GetManagedZonesPlainArgs
import com.pulumi.gcp.dns.kotlin.inputs.GetManagedZonesPlainArgsBuilder
import com.pulumi.gcp.dns.kotlin.inputs.GetRecordSetPlainArgs
import com.pulumi.gcp.dns.kotlin.inputs.GetRecordSetPlainArgsBuilder
import com.pulumi.gcp.dns.kotlin.outputs.GetKeysResult
import com.pulumi.gcp.dns.kotlin.outputs.GetManagedZoneIamPolicyResult
import com.pulumi.gcp.dns.kotlin.outputs.GetManagedZoneResult
import com.pulumi.gcp.dns.kotlin.outputs.GetManagedZonesResult
import com.pulumi.gcp.dns.kotlin.outputs.GetRecordSetResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.gcp.dns.kotlin.outputs.GetKeysResult.Companion.toKotlin as getKeysResultToKotlin
import com.pulumi.gcp.dns.kotlin.outputs.GetManagedZoneIamPolicyResult.Companion.toKotlin as getManagedZoneIamPolicyResultToKotlin
import com.pulumi.gcp.dns.kotlin.outputs.GetManagedZoneResult.Companion.toKotlin as getManagedZoneResultToKotlin
import com.pulumi.gcp.dns.kotlin.outputs.GetManagedZonesResult.Companion.toKotlin as getManagedZonesResultToKotlin
import com.pulumi.gcp.dns.kotlin.outputs.GetRecordSetResult.Companion.toKotlin as getRecordSetResultToKotlin
public object DnsFunctions {
/**
* Get the DNSKEY and DS records of DNSSEC-signed managed zones.
* For more information see the
* [official documentation](https://cloud.google.com/dns/docs/dnskeys/)
* and [API](https://cloud.google.com/dns/docs/reference/v1/dnsKeys).
* > A gcp.dns.ManagedZone resource must have DNSSEC enabled in order
* to contain any DNSKEYs. Queries to managed zones without this setting
* enabled will result in a 404 error as the collection of DNSKEYs does
* not exist in the DNS API.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const foo = new gcp.dns.ManagedZone("foo", {
* name: "foobar",
* dnsName: "foo.bar.",
* dnssecConfig: {
* state: "on",
* nonExistence: "nsec3",
* },
* });
* const fooDnsKeys = gcp.dns.getKeysOutput({
* managedZone: foo.id,
* });
* export const fooDnsDsRecord = fooDnsKeys.apply(fooDnsKeys => fooDnsKeys.keySigningKeys?.[0]?.dsRecord);
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* foo = gcp.dns.ManagedZone("foo",
* name="foobar",
* dns_name="foo.bar.",
* dnssec_config=gcp.dns.ManagedZoneDnssecConfigArgs(
* state="on",
* non_existence="nsec3",
* ))
* foo_dns_keys = gcp.dns.get_keys_output(managed_zone=foo.id)
* pulumi.export("fooDnsDsRecord", foo_dns_keys.key_signing_keys[0].ds_record)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var foo = new Gcp.Dns.ManagedZone("foo", new()
* {
* Name = "foobar",
* DnsName = "foo.bar.",
* DnssecConfig = new Gcp.Dns.Inputs.ManagedZoneDnssecConfigArgs
* {
* State = "on",
* NonExistence = "nsec3",
* },
* });
* var fooDnsKeys = Gcp.Dns.GetKeys.Invoke(new()
* {
* ManagedZone = foo.Id,
* });
* return new Dictionary
* {
* ["fooDnsDsRecord"] = fooDnsKeys.Apply(getKeysResult => getKeysResult.KeySigningKeys[0]?.DsRecord),
* };
* });
* ```
* ```go
* 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 {
* foo, err := dns.NewManagedZone(ctx, "foo", &dns.ManagedZoneArgs{
* Name: pulumi.String("foobar"),
* DnsName: pulumi.String("foo.bar."),
* DnssecConfig: &dns.ManagedZoneDnssecConfigArgs{
* State: pulumi.String("on"),
* NonExistence: pulumi.String("nsec3"),
* },
* })
* if err != nil {
* return err
* }
* fooDnsKeys := dns.GetKeysOutput(ctx, dns.GetKeysOutputArgs{
* ManagedZone: foo.ID(),
* }, nil)
* ctx.Export("fooDnsDsRecord", fooDnsKeys.ApplyT(func(fooDnsKeys dns.GetKeysResult) (*string, error) {
* return &fooDnsKeys.KeySigningKeys[0].DsRecord, nil
* }).(pulumi.StringPtrOutput))
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.dns.ManagedZone;
* import com.pulumi.gcp.dns.ManagedZoneArgs;
* import com.pulumi.gcp.dns.inputs.ManagedZoneDnssecConfigArgs;
* import com.pulumi.gcp.dns.DnsFunctions;
* import com.pulumi.gcp.dns.inputs.GetKeysArgs;
* 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) {
* var foo = new ManagedZone("foo", ManagedZoneArgs.builder()
* .name("foobar")
* .dnsName("foo.bar.")
* .dnssecConfig(ManagedZoneDnssecConfigArgs.builder()
* .state("on")
* .nonExistence("nsec3")
* .build())
* .build());
* final var fooDnsKeys = DnsFunctions.getKeys(GetKeysArgs.builder()
* .managedZone(foo.id())
* .build());
* ctx.export("fooDnsDsRecord", fooDnsKeys.applyValue(getKeysResult -> getKeysResult).applyValue(fooDnsKeys -> fooDnsKeys.applyValue(getKeysResult -> getKeysResult.keySigningKeys()[0].dsRecord())));
* }
* }
* ```
* ```yaml
* resources:
* foo:
* type: gcp:dns:ManagedZone
* properties:
* name: foobar
* dnsName: foo.bar.
* dnssecConfig:
* state: on
* nonExistence: nsec3
* variables:
* fooDnsKeys:
* fn::invoke:
* Function: gcp:dns:getKeys
* Arguments:
* managedZone: ${foo.id}
* outputs:
* fooDnsDsRecord: ${fooDnsKeys.keySigningKeys[0].dsRecord}
* ```
*
* @param argument A collection of arguments for invoking getKeys.
* @return A collection of values returned by getKeys.
*/
public suspend fun getKeys(argument: GetKeysPlainArgs): GetKeysResult =
getKeysResultToKotlin(getKeysPlain(argument.toJava()).await())
/**
* @see [getKeys].
* @param managedZone The name or id of the Cloud DNS managed zone.
* @param project The ID of the project in which the resource belongs. If `project` is not provided, the provider project is used.
* @return A collection of values returned by getKeys.
*/
public suspend fun getKeys(managedZone: String, project: String? = null): GetKeysResult {
val argument = GetKeysPlainArgs(
managedZone = managedZone,
project = project,
)
return getKeysResultToKotlin(getKeysPlain(argument.toJava()).await())
}
/**
* @see [getKeys].
* @param argument Builder for [com.pulumi.gcp.dns.kotlin.inputs.GetKeysPlainArgs].
* @return A collection of values returned by getKeys.
*/
public suspend fun getKeys(argument: suspend GetKeysPlainArgsBuilder.() -> Unit): GetKeysResult {
val builder = GetKeysPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getKeysResultToKotlin(getKeysPlain(builtArgument.toJava()).await())
}
/**
* Provides access to a zone's attributes within Google Cloud DNS.
* For more information see
* [the official documentation](https://cloud.google.com/dns/zones/)
* and
* [API](https://cloud.google.com/dns/api/v1/managedZones).
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const envDnsZone = gcp.dns.getManagedZone({
* name: "qa-zone",
* });
* const dns = new gcp.dns.RecordSet("dns", {
* name: envDnsZone.then(envDnsZone => `my-address.${envDnsZone.dnsName}`),
* type: "TXT",
* ttl: 300,
* managedZone: envDnsZone.then(envDnsZone => envDnsZone.name),
* rrdatas: ["test"],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* env_dns_zone = gcp.dns.get_managed_zone(name="qa-zone")
* dns = gcp.dns.RecordSet("dns",
* name=f"my-address.{env_dns_zone.dns_name}",
* type="TXT",
* ttl=300,
* managed_zone=env_dns_zone.name,
* rrdatas=["test"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var envDnsZone = Gcp.Dns.GetManagedZone.Invoke(new()
* {
* Name = "qa-zone",
* });
* var dns = new Gcp.Dns.RecordSet("dns", new()
* {
* Name = $"my-address.{envDnsZone.Apply(getManagedZoneResult => getManagedZoneResult.DnsName)}",
* Type = "TXT",
* Ttl = 300,
* ManagedZone = envDnsZone.Apply(getManagedZoneResult => getManagedZoneResult.Name),
* Rrdatas = new[]
* {
* "test",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "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 {
* envDnsZone, err := dns.LookupManagedZone(ctx, &dns.LookupManagedZoneArgs{
* Name: "qa-zone",
* }, nil)
* if err != nil {
* return err
* }
* _, err = dns.NewRecordSet(ctx, "dns", &dns.RecordSetArgs{
* Name: pulumi.String(fmt.Sprintf("my-address.%v", envDnsZone.DnsName)),
* Type: pulumi.String("TXT"),
* Ttl: pulumi.Int(300),
* ManagedZone: pulumi.String(envDnsZone.Name),
* Rrdatas: pulumi.StringArray{
* pulumi.String("test"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.GetManagedZoneArgs;
* import com.pulumi.gcp.dns.RecordSet;
* import com.pulumi.gcp.dns.RecordSetArgs;
* 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 envDnsZone = DnsFunctions.getManagedZone(GetManagedZoneArgs.builder()
* .name("qa-zone")
* .build());
* var dns = new RecordSet("dns", RecordSetArgs.builder()
* .name(String.format("my-address.%s", envDnsZone.applyValue(getManagedZoneResult -> getManagedZoneResult.dnsName())))
* .type("TXT")
* .ttl(300)
* .managedZone(envDnsZone.applyValue(getManagedZoneResult -> getManagedZoneResult.name()))
* .rrdatas("test")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* dns:
* type: gcp:dns:RecordSet
* properties:
* name: my-address.${envDnsZone.dnsName}
* type: TXT
* ttl: 300
* managedZone: ${envDnsZone.name}
* rrdatas:
* - test
* variables:
* envDnsZone:
* fn::invoke:
* Function: gcp:dns:getManagedZone
* Arguments:
* name: qa-zone
* ```
*
* @param argument A collection of arguments for invoking getManagedZone.
* @return A collection of values returned by getManagedZone.
*/
public suspend fun getManagedZone(argument: GetManagedZonePlainArgs): GetManagedZoneResult =
getManagedZoneResultToKotlin(getManagedZonePlain(argument.toJava()).await())
/**
* @see [getManagedZone].
* @param name A unique name for the resource.
* @param project The ID of the project for the Google Cloud DNS zone. If this is not provided the default project will be used.
* @return A collection of values returned by getManagedZone.
*/
public suspend fun getManagedZone(name: String, project: String? = null): GetManagedZoneResult {
val argument = GetManagedZonePlainArgs(
name = name,
project = project,
)
return getManagedZoneResultToKotlin(getManagedZonePlain(argument.toJava()).await())
}
/**
* @see [getManagedZone].
* @param argument Builder for [com.pulumi.gcp.dns.kotlin.inputs.GetManagedZonePlainArgs].
* @return A collection of values returned by getManagedZone.
*/
public suspend fun getManagedZone(argument: suspend GetManagedZonePlainArgsBuilder.() -> Unit): GetManagedZoneResult {
val builder = GetManagedZonePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getManagedZoneResultToKotlin(getManagedZonePlain(builtArgument.toJava()).await())
}
/**
* Retrieves the current IAM policy data for managedzone
* ## example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const policy = gcp.dns.getManagedZoneIamPolicy({
* project: _default.project,
* managedZone: _default.name,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* policy = gcp.dns.get_managed_zone_iam_policy(project=default["project"],
* managed_zone=default["name"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var policy = Gcp.Dns.GetManagedZoneIamPolicy.Invoke(new()
* {
* Project = @default.Project,
* ManagedZone = @default.Name,
* });
* });
* ```
* ```go
* 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.GetManagedZoneIamPolicy(ctx, &dns.GetManagedZoneIamPolicyArgs{
* Project: pulumi.StringRef(_default.Project),
* ManagedZone: _default.Name,
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.GetManagedZoneIamPolicyArgs;
* 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 policy = DnsFunctions.getManagedZoneIamPolicy(GetManagedZoneIamPolicyArgs.builder()
* .project(default_.project())
* .managedZone(default_.name())
* .build());
* }
* }
* ```
* ```yaml
* variables:
* policy:
* fn::invoke:
* Function: gcp:dns:getManagedZoneIamPolicy
* Arguments:
* project: ${default.project}
* managedZone: ${default.name}
* ```
*
* @param argument A collection of arguments for invoking getManagedZoneIamPolicy.
* @return A collection of values returned by getManagedZoneIamPolicy.
*/
public suspend fun getManagedZoneIamPolicy(argument: GetManagedZoneIamPolicyPlainArgs): GetManagedZoneIamPolicyResult =
getManagedZoneIamPolicyResultToKotlin(getManagedZoneIamPolicyPlain(argument.toJava()).await())
/**
* @see [getManagedZoneIamPolicy].
* @param managedZone Used to find the parent resource to bind the IAM policy to
* @param project The ID of the project in which the resource belongs.
* If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
* @return A collection of values returned by getManagedZoneIamPolicy.
*/
public suspend fun getManagedZoneIamPolicy(managedZone: String, project: String? = null): GetManagedZoneIamPolicyResult {
val argument = GetManagedZoneIamPolicyPlainArgs(
managedZone = managedZone,
project = project,
)
return getManagedZoneIamPolicyResultToKotlin(getManagedZoneIamPolicyPlain(argument.toJava()).await())
}
/**
* @see [getManagedZoneIamPolicy].
* @param argument Builder for [com.pulumi.gcp.dns.kotlin.inputs.GetManagedZoneIamPolicyPlainArgs].
* @return A collection of values returned by getManagedZoneIamPolicy.
*/
public suspend fun getManagedZoneIamPolicy(argument: suspend GetManagedZoneIamPolicyPlainArgsBuilder.() -> Unit): GetManagedZoneIamPolicyResult {
val builder = GetManagedZoneIamPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getManagedZoneIamPolicyResultToKotlin(getManagedZoneIamPolicyPlain(builtArgument.toJava()).await())
}
/**
* Provides access to a list of zones within Google Cloud DNS.
* For more information see
* [the official documentation](https://cloud.google.com/dns/zones/)
* and
* [API](https://cloud.google.com/dns/api/v1/managedZones).
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const zones = gcp.dns.getManagedZones({
* project: "my-project-id",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* zones = gcp.dns.get_managed_zones(project="my-project-id")
* ```
* ```csharp
* 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",
* });
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* variables:
* zones:
* fn::invoke:
* Function: gcp:dns:getManagedZones
* Arguments:
* project: my-project-id
* ```
*
* @param argument A collection of arguments for invoking getManagedZones.
* @return A collection of values returned by getManagedZones.
*/
public suspend fun getManagedZones(argument: GetManagedZonesPlainArgs): GetManagedZonesResult =
getManagedZonesResultToKotlin(getManagedZonesPlain(argument.toJava()).await())
/**
* @see [getManagedZones].
* @param project The ID of the project containing Google Cloud DNS zones. If this is not provided the default project will be used.
* @return A collection of values returned by getManagedZones.
*/
public suspend fun getManagedZones(project: String? = null): GetManagedZonesResult {
val argument = GetManagedZonesPlainArgs(
project = project,
)
return getManagedZonesResultToKotlin(getManagedZonesPlain(argument.toJava()).await())
}
/**
* @see [getManagedZones].
* @param argument Builder for [com.pulumi.gcp.dns.kotlin.inputs.GetManagedZonesPlainArgs].
* @return A collection of values returned by getManagedZones.
*/
public suspend fun getManagedZones(argument: suspend GetManagedZonesPlainArgsBuilder.() -> Unit): GetManagedZonesResult {
val builder = GetManagedZonesPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getManagedZonesResultToKotlin(getManagedZonesPlain(builtArgument.toJava()).await())
}
/**
* Get a DNS record set within Google Cloud DNS
* For more information see
* [the official documentation](https://cloud.google.com/dns/docs/records)
* and
* [API](https://cloud.google.com/dns/docs/reference/v1/resourceRecordSets)
* ## Example Usage
* ```tf
* data "google_dns_managed_zone" "sample" {
* name = "sample-zone"
* }
* data "google_dns_record_set" "rs" {
* managed_zone = data.google_dns_managed_zone.sample.name
* name = "my-record.${data.google_dns_managed_zone.sample.dns_name}"
* type = "A"
* }
* ```
* @param argument A collection of arguments for invoking getRecordSet.
* @return A collection of values returned by getRecordSet.
*/
public suspend fun getRecordSet(argument: GetRecordSetPlainArgs): GetRecordSetResult =
getRecordSetResultToKotlin(getRecordSetPlain(argument.toJava()).await())
/**
* @see [getRecordSet].
* @param managedZone The Name of the zone.
* @param name The DNS name for the resource.
* @param project The ID of the project for the Google Cloud.
* @param type The RRSet type. [See this table for supported types](https://cloud.google.com/dns/docs/records#record_type).
* @return A collection of values returned by getRecordSet.
*/
public suspend fun getRecordSet(
managedZone: String,
name: String,
project: String? = null,
type: String,
): GetRecordSetResult {
val argument = GetRecordSetPlainArgs(
managedZone = managedZone,
name = name,
project = project,
type = type,
)
return getRecordSetResultToKotlin(getRecordSetPlain(argument.toJava()).await())
}
/**
* @see [getRecordSet].
* @param argument Builder for [com.pulumi.gcp.dns.kotlin.inputs.GetRecordSetPlainArgs].
* @return A collection of values returned by getRecordSet.
*/
public suspend fun getRecordSet(argument: suspend GetRecordSetPlainArgsBuilder.() -> Unit): GetRecordSetResult {
val builder = GetRecordSetPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getRecordSetResultToKotlin(getRecordSetPlain(builtArgument.toJava()).await())
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy