1. Packages
  2. Newrelic Provider
  3. API Docs
  4. getAuthenticationDomain
New Relic v5.44.1 published on Tuesday, Apr 15, 2025 by Pulumi

newrelic.getAuthenticationDomain

Explore with Pulumi AI

New Relic v5.44.1 published on Tuesday, Apr 15, 2025 by Pulumi

Use this data source to fetch the ID of an authentication domain belonging to your account, matching the specified name.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

export = async () => {
    const foo = await newrelic.getAuthenticationDomain({
        name: "Test Authentication Domain",
    });
    return {
        foo: foo.id,
    };
}
Copy
import pulumi
import pulumi_newrelic as newrelic

foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
pulumi.export("foo", foo.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := newrelic.GetAuthenticationDomain(ctx, &newrelic.GetAuthenticationDomainArgs{
			Name: "Test Authentication Domain",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("foo", foo.Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;

return await Deployment.RunAsync(() => 
{
    var foo = NewRelic.GetAuthenticationDomain.Invoke(new()
    {
        Name = "Test Authentication Domain",
    });

    return new Dictionary<string, object?>
    {
        ["foo"] = foo.Apply(getAuthenticationDomainResult => getAuthenticationDomainResult.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NewrelicFunctions;
import com.pulumi.newrelic.inputs.GetAuthenticationDomainArgs;
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 foo = NewrelicFunctions.getAuthenticationDomain(GetAuthenticationDomainArgs.builder()
            .name("Test Authentication Domain")
            .build());

        ctx.export("foo", foo.id());
    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: newrelic:getAuthenticationDomain
      arguments:
        name: Test Authentication Domain
outputs:
  foo: ${foo.id}
Copy

Using getAuthenticationDomain

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 getAuthenticationDomain(args: GetAuthenticationDomainArgs, opts?: InvokeOptions): Promise<GetAuthenticationDomainResult>
function getAuthenticationDomainOutput(args: GetAuthenticationDomainOutputArgs, opts?: InvokeOptions): Output<GetAuthenticationDomainResult>
Copy
def get_authentication_domain(name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetAuthenticationDomainResult
def get_authentication_domain_output(name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetAuthenticationDomainResult]
Copy
func GetAuthenticationDomain(ctx *Context, args *GetAuthenticationDomainArgs, opts ...InvokeOption) (*GetAuthenticationDomainResult, error)
func GetAuthenticationDomainOutput(ctx *Context, args *GetAuthenticationDomainOutputArgs, opts ...InvokeOption) GetAuthenticationDomainResultOutput
Copy

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

public static class GetAuthenticationDomain 
{
    public static Task<GetAuthenticationDomainResult> InvokeAsync(GetAuthenticationDomainArgs args, InvokeOptions? opts = null)
    public static Output<GetAuthenticationDomainResult> Invoke(GetAuthenticationDomainInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAuthenticationDomainResult> getAuthenticationDomain(GetAuthenticationDomainArgs args, InvokeOptions options)
public static Output<GetAuthenticationDomainResult> getAuthenticationDomain(GetAuthenticationDomainArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: newrelic:index/getAuthenticationDomain:getAuthenticationDomain
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
Name This property is required. string
The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
name This property is required. String
The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
name This property is required. string
The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
name This property is required. str
The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
name This property is required. String
The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.

getAuthenticationDomain Result

The following output properties are available:

Id string
The ID of the matching authentication domain fetched.
Name string
Id string
The ID of the matching authentication domain fetched.
Name string
id String
The ID of the matching authentication domain fetched.
name String
id string
The ID of the matching authentication domain fetched.
name string
id str
The ID of the matching authentication domain fetched.
name str
id String
The ID of the matching authentication domain fetched.
name String

Package Details

Repository
New Relic pulumi/pulumi-newrelic
License
Apache-2.0
Notes
This Pulumi package is based on the newrelic Terraform Provider.
New Relic v5.44.1 published on Tuesday, Apr 15, 2025 by Pulumi