1. Packages
  2. New Relic
  3. API Docs
  4. getAuthenticationDomain
New Relic v5.25.3 published on Tuesday, Jun 25, 2024 by Pulumi

newrelic.getAuthenticationDomain

Explore with Pulumi AI

newrelic logo
New Relic v5.25.3 published on Tuesday, Jun 25, 2024 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,
        };
    }
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
    pulumi.export("foo", foo.id)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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.applyValue(getAuthenticationDomainResult -> getAuthenticationDomainResult.id()));
        }
    }
    
    variables:
      foo:
        fn::invoke:
          Function: newrelic:getAuthenticationDomain
          Arguments:
            name: Test Authentication Domain
    outputs:
      foo: ${foo.id}
    

    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>
    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]
    func GetAuthenticationDomain(ctx *Context, args *GetAuthenticationDomainArgs, opts ...InvokeOption) (*GetAuthenticationDomainResult, error)
    func GetAuthenticationDomainOutput(ctx *Context, args *GetAuthenticationDomainOutputArgs, opts ...InvokeOption) GetAuthenticationDomainResultOutput

    > 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)
    }
    public static CompletableFuture<GetAuthenticationDomainResult> getAuthenticationDomain(GetAuthenticationDomainArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: newrelic:index/getAuthenticationDomain:getAuthenticationDomain
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name 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 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 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 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 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 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.
    newrelic logo
    New Relic v5.25.3 published on Tuesday, Jun 25, 2024 by Pulumi