1. Packages
  2. New Relic
  3. API Docs
  4. AccountManagement
New Relic v5.23.1 published on Friday, Apr 26, 2024 by Pulumi

newrelic.AccountManagement

Explore with Pulumi AI

newrelic logo
New Relic v5.23.1 published on Friday, Apr 26, 2024 by Pulumi

    Use this resource to create and manage New Relic sub accounts.

    WARNING: The newrelic.AccountManagement resource will only create/update but won’t delete a sub account. Please visit our documentation on Account Management for more information .

    Example Usage

    Create Account
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.AccountManagement("foo", {
        name: "Test Account Name",
        region: "us01",
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.AccountManagement("foo",
        name="Test Account Name",
        region="us01")
    
    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 {
    		_, err := newrelic.NewAccountManagement(ctx, "foo", &newrelic.AccountManagementArgs{
    			Name:   pulumi.String("Test Account Name"),
    			Region: pulumi.String("us01"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using NewRelic = Pulumi.NewRelic;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new NewRelic.AccountManagement("foo", new()
        {
            Name = "Test Account Name",
            Region = "us01",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.newrelic.AccountManagement;
    import com.pulumi.newrelic.AccountManagementArgs;
    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) {
            var foo = new AccountManagement("foo", AccountManagementArgs.builder()        
                .name("Test Account Name")
                .region("us01")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: newrelic:AccountManagement
        properties:
          name: Test Account Name
          region: us01
    

    Create AccountManagement Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AccountManagement(name: string, args: AccountManagementArgs, opts?: CustomResourceOptions);
    @overload
    def AccountManagement(resource_name: str,
                          args: AccountManagementArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def AccountManagement(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          region: Optional[str] = None,
                          name: Optional[str] = None)
    func NewAccountManagement(ctx *Context, name string, args AccountManagementArgs, opts ...ResourceOption) (*AccountManagement, error)
    public AccountManagement(string name, AccountManagementArgs args, CustomResourceOptions? opts = null)
    public AccountManagement(String name, AccountManagementArgs args)
    public AccountManagement(String name, AccountManagementArgs args, CustomResourceOptions options)
    
    type: newrelic:AccountManagement
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AccountManagementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AccountManagementArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AccountManagementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccountManagementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccountManagementArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var accountManagementResource = new NewRelic.AccountManagement("accountManagementResource", new()
    {
        Region = "string",
        Name = "string",
    });
    
    example, err := newrelic.NewAccountManagement(ctx, "accountManagementResource", &newrelic.AccountManagementArgs{
    	Region: pulumi.String("string"),
    	Name:   pulumi.String("string"),
    })
    
    var accountManagementResource = new AccountManagement("accountManagementResource", AccountManagementArgs.builder()        
        .region("string")
        .name("string")
        .build());
    
    account_management_resource = newrelic.AccountManagement("accountManagementResource",
        region="string",
        name="string")
    
    const accountManagementResource = new newrelic.AccountManagement("accountManagementResource", {
        region: "string",
        name: "string",
    });
    
    type: newrelic:AccountManagement
    properties:
        name: string
        region: string
    

    AccountManagement Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The AccountManagement resource accepts the following input properties:

    Region string
    A description of what this parsing rule represents.
    Name string
    Name of the account to be created
    Region string
    A description of what this parsing rule represents.
    Name string
    Name of the account to be created
    region String
    A description of what this parsing rule represents.
    name String
    Name of the account to be created
    region string
    A description of what this parsing rule represents.
    name string
    Name of the account to be created
    region str
    A description of what this parsing rule represents.
    name str
    Name of the account to be created
    region String
    A description of what this parsing rule represents.
    name String
    Name of the account to be created

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AccountManagement resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AccountManagement Resource

    Get an existing AccountManagement resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AccountManagementState, opts?: CustomResourceOptions): AccountManagement
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            region: Optional[str] = None) -> AccountManagement
    func GetAccountManagement(ctx *Context, name string, id IDInput, state *AccountManagementState, opts ...ResourceOption) (*AccountManagement, error)
    public static AccountManagement Get(string name, Input<string> id, AccountManagementState? state, CustomResourceOptions? opts = null)
    public static AccountManagement get(String name, Output<String> id, AccountManagementState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Name string
    Name of the account to be created
    Region string
    A description of what this parsing rule represents.
    Name string
    Name of the account to be created
    Region string
    A description of what this parsing rule represents.
    name String
    Name of the account to be created
    region String
    A description of what this parsing rule represents.
    name string
    Name of the account to be created
    region string
    A description of what this parsing rule represents.
    name str
    Name of the account to be created
    region str
    A description of what this parsing rule represents.
    name String
    Name of the account to be created
    region String
    A description of what this parsing rule represents.

    Import

    Accounts can be imported using the id, e.g.

    bash

    $ pulumi import newrelic:index/accountManagement:AccountManagement foo <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.23.1 published on Friday, Apr 26, 2024 by Pulumi