1. Packages
  2. New Relic
  3. API Docs
  4. getAuthenticationDomain
New Relic v5.22.1 published on Friday, Mar 29, 2024 by Pulumi

newrelic.getAuthenticationDomain

Explore with Pulumi AI

newrelic logo
New Relic v5.22.1 published on Friday, Mar 29, 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";
    
    const fooAuthenticationDomain = newrelic.getAuthenticationDomain({
        name: "Test Authentication Domain",
    });
    export const foo = fooAuthenticationDomain.then(fooAuthenticationDomain => fooAuthenticationDomain.id);
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
    pulumi.export("foo", foo_authentication_domain.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 {
    		fooAuthenticationDomain, err := newrelic.GetAuthenticationDomain(ctx, &newrelic.GetAuthenticationDomainArgs{
    			Name: "Test Authentication Domain",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("foo", fooAuthenticationDomain.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using NewRelic = Pulumi.NewRelic;
    
    return await Deployment.RunAsync(() => 
    {
        var fooAuthenticationDomain = NewRelic.GetAuthenticationDomain.Invoke(new()
        {
            Name = "Test Authentication Domain",
        });
    
        return new Dictionary<string, object?>
        {
            ["foo"] = fooAuthenticationDomain.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 fooAuthenticationDomain = NewrelicFunctions.getAuthenticationDomain(GetAuthenticationDomainArgs.builder()
                .name("Test Authentication Domain")
                .build());
    
            ctx.export("foo", fooAuthenticationDomain.applyValue(getAuthenticationDomainResult -> getAuthenticationDomainResult.id()));
        }
    }
    
    variables:
      fooAuthenticationDomain:
        fn::invoke:
          Function: newrelic:getAuthenticationDomain
          Arguments:
            name: Test Authentication Domain
    outputs:
      foo: ${fooAuthenticationDomain.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.22.1 published on Friday, Mar 29, 2024 by Pulumi