getAccount

Use this data source to get information about a specific account in New Relic. Accounts can be located by ID or name. Exactly one of the two attributes is required.

Example Usage

using Pulumi;
using NewRelic = Pulumi.NewRelic;

class MyStack : Stack
{
    public MyStack()
    {
        var acc = Output.Create(NewRelic.GetAccount.InvokeAsync(new NewRelic.GetAccountArgs
        {
            Scope = "global",
        }));
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "global"
		_, err := newrelic.GetAccount(ctx, &newrelic.GetAccountArgs{
			Scope: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_newrelic as newrelic

acc = newrelic.get_account(scope="global")
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const acc = pulumi.output(newrelic.getAccount({
    scope: "global",
}, { async: true }));

Using getAccount

function getAccount(args: GetAccountArgs, opts?: InvokeOptions): Promise<GetAccountResult>
def get_account(account_id: Optional[int] = None,
                name: Optional[str] = None,
                scope: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetAccountResult
func GetAccount(ctx *Context, args *GetAccountArgs, opts ...InvokeOption) (*GetAccountResult, error)

Note: This function is named GetAccount in the Go SDK.

public static class GetAccount {
    public static Task<GetAccountResult> InvokeAsync(GetAccountArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

AccountId int
The account ID in New Relic.
Name string
The account name in New Relic.
Scope string
The scope of the account in New Relic. Valid values are “global” and “in_region”. Defaults to “in_region”.
AccountId int
The account ID in New Relic.
Name string
The account name in New Relic.
Scope string
The scope of the account in New Relic. Valid values are “global” and “in_region”. Defaults to “in_region”.
accountId number
The account ID in New Relic.
name string
The account name in New Relic.
scope string
The scope of the account in New Relic. Valid values are “global” and “in_region”. Defaults to “in_region”.
account_id int
The account ID in New Relic.
name str
The account name in New Relic.
scope str
The scope of the account in New Relic. Valid values are “global” and “in_region”. Defaults to “in_region”.

getAccount Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
AccountId int
Name string
Scope string
Id string
The provider-assigned unique ID for this managed resource.
AccountId int
Name string
Scope string
id string
The provider-assigned unique ID for this managed resource.
accountId number
name string
scope string
id str
The provider-assigned unique ID for this managed resource.
account_id int
name str
scope str

Package Details

Repository
https://github.com/pulumi/pulumi-newrelic
License
Apache-2.0
Notes
This Pulumi package is based on the newrelic Terraform Provider.