Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getDomainTxtGuid

Provides the generation of txt records to realize the retrieval and verification of domain names.

NOTE: Available in v1.80.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @this = Output.Create(AliCloud.Dns.GetDomainTxtGuid.InvokeAsync(new AliCloud.Dns.GetDomainTxtGuidArgs
        {
            DomainName = "test111.abc",
            Type = "ADD_SUB_DOMAIN",
        }));
        this.Rr = @this.Apply(@this => @this.Rr);
        this.Value = @this.Apply(@this => @this.Value);
    }

    [Output("rr")]
    public Output<string> Rr { get; set; }
    [Output("value")]
    public Output<string> Value { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dns"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		this, err := dns.GetDomainTxtGuid(ctx, &dns.GetDomainTxtGuidArgs{
			DomainName: "test111.abc",
			Type:       "ADD_SUB_DOMAIN",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("rr", this.Rr)
		ctx.Export("value", this.Value)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dns.DnsFunctions;
import com.pulumi.alicloud.dns.inputs.GetDomainTxtGuidArgs;
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 this = DnsFunctions.getDomainTxtGuid(GetDomainTxtGuidArgs.builder()
            .domainName("test111.abc")
            .type("ADD_SUB_DOMAIN")
            .build());

        ctx.export("rr", this_.rr());
        ctx.export("value", this_.value());
    }
}
import pulumi
import pulumi_alicloud as alicloud

this = alicloud.dns.get_domain_txt_guid(domain_name="test111.abc",
    type="ADD_SUB_DOMAIN")
pulumi.export("rr", this.rr)
pulumi.export("value", this.value)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const thisDomainTxtGuid = pulumi.output(alicloud.dns.getDomainTxtGuid({
    domainName: "test111.abc",
    type: "ADD_SUB_DOMAIN",
}));

export const rr = thisDomainTxtGuid.rr;
export const value = thisDomainTxtGuid.value;
variables:
  this:
    Fn::Invoke:
      Function: alicloud:dns:getDomainTxtGuid
      Arguments:
        domainName: test111.abc
        type: ADD_SUB_DOMAIN
outputs:
  rr: ${this.rr}
  value: ${this.value}

Using getDomainTxtGuid

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 getDomainTxtGuid(args: GetDomainTxtGuidArgs, opts?: InvokeOptions): Promise<GetDomainTxtGuidResult>
function getDomainTxtGuidOutput(args: GetDomainTxtGuidOutputArgs, opts?: InvokeOptions): Output<GetDomainTxtGuidResult>
def get_domain_txt_guid(domain_name: Optional[str] = None,
                        lang: Optional[str] = None,
                        output_file: Optional[str] = None,
                        type: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetDomainTxtGuidResult
def get_domain_txt_guid_output(domain_name: Optional[pulumi.Input[str]] = None,
                        lang: Optional[pulumi.Input[str]] = None,
                        output_file: Optional[pulumi.Input[str]] = None,
                        type: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetDomainTxtGuidResult]
func GetDomainTxtGuid(ctx *Context, args *GetDomainTxtGuidArgs, opts ...InvokeOption) (*GetDomainTxtGuidResult, error)
func GetDomainTxtGuidOutput(ctx *Context, args *GetDomainTxtGuidOutputArgs, opts ...InvokeOption) GetDomainTxtGuidResultOutput

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

public static class GetDomainTxtGuid 
{
    public static Task<GetDomainTxtGuidResult> InvokeAsync(GetDomainTxtGuidArgs args, InvokeOptions? opts = null)
    public static Output<GetDomainTxtGuidResult> Invoke(GetDomainTxtGuidInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDomainTxtGuidResult> getDomainTxtGuid(GetDomainTxtGuidArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:dns/getDomainTxtGuid:getDomainTxtGuid
  Arguments:
    # Arguments dictionary

The following arguments are supported:

DomainName string

Verified domain name.

Type string

Txt verification function. Value:ADD_SUB_DOMAIN, RETRIEVAL.

Lang string

User language.

OutputFile string
DomainName string

Verified domain name.

Type string

Txt verification function. Value:ADD_SUB_DOMAIN, RETRIEVAL.

Lang string

User language.

OutputFile string
domainName String

Verified domain name.

type String

Txt verification function. Value:ADD_SUB_DOMAIN, RETRIEVAL.

lang String

User language.

outputFile String
domainName string

Verified domain name.

type string

Txt verification function. Value:ADD_SUB_DOMAIN, RETRIEVAL.

lang string

User language.

outputFile string
domain_name str

Verified domain name.

type str

Txt verification function. Value:ADD_SUB_DOMAIN, RETRIEVAL.

lang str

User language.

output_file str
domainName String

Verified domain name.

type String

Txt verification function. Value:ADD_SUB_DOMAIN, RETRIEVAL.

lang String

User language.

outputFile String

getDomainTxtGuid Result

The following output properties are available:

DomainName string
Id string

The provider-assigned unique ID for this managed resource.

Rr string

Host record.

Type string
Value string

Record the value.

Lang string
OutputFile string
DomainName string
Id string

The provider-assigned unique ID for this managed resource.

Rr string

Host record.

Type string
Value string

Record the value.

Lang string
OutputFile string
domainName String
id String

The provider-assigned unique ID for this managed resource.

rr String

Host record.

type String
value String

Record the value.

lang String
outputFile String
domainName string
id string

The provider-assigned unique ID for this managed resource.

rr string

Host record.

type string
value string

Record the value.

lang string
outputFile string
domain_name str
id str

The provider-assigned unique ID for this managed resource.

rr str

Host record.

type str
value str

Record the value.

lang str
output_file str
domainName String
id String

The provider-assigned unique ID for this managed resource.

rr String

Host record.

type String
value String

Record the value.

lang String
outputFile String

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.