published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Import
Linked AWS accounts can be imported using the id, e.g. bash
$ pulumi import newrelic:cloud/awsLinkAccount:AwsLinkAccount foo <id>
Create AwsLinkAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AwsLinkAccount(name: string, args: AwsLinkAccountArgs, opts?: CustomResourceOptions);@overload
def AwsLinkAccount(resource_name: str,
args: AwsLinkAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AwsLinkAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
account_id: Optional[int] = None,
metric_collection_mode: Optional[str] = None,
name: Optional[str] = None)func NewAwsLinkAccount(ctx *Context, name string, args AwsLinkAccountArgs, opts ...ResourceOption) (*AwsLinkAccount, error)public AwsLinkAccount(string name, AwsLinkAccountArgs args, CustomResourceOptions? opts = null)
public AwsLinkAccount(String name, AwsLinkAccountArgs args)
public AwsLinkAccount(String name, AwsLinkAccountArgs args, CustomResourceOptions options)
type: newrelic:cloud:AwsLinkAccount
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 AwsLinkAccountArgs
- 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 AwsLinkAccountArgs
- 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 AwsLinkAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AwsLinkAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AwsLinkAccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsLinkAccountResource = new NewRelic.Cloud.AwsLinkAccount("awsLinkAccountResource", new()
{
Arn = "string",
AccountId = 0,
MetricCollectionMode = "string",
Name = "string",
});
example, err := cloud.NewAwsLinkAccount(ctx, "awsLinkAccountResource", &cloud.AwsLinkAccountArgs{
Arn: pulumi.String("string"),
AccountId: pulumi.Int(0),
MetricCollectionMode: pulumi.String("string"),
Name: pulumi.String("string"),
})
var awsLinkAccountResource = new AwsLinkAccount("awsLinkAccountResource", AwsLinkAccountArgs.builder()
.arn("string")
.accountId(0)
.metricCollectionMode("string")
.name("string")
.build());
aws_link_account_resource = newrelic.cloud.AwsLinkAccount("awsLinkAccountResource",
arn="string",
account_id=0,
metric_collection_mode="string",
name="string")
const awsLinkAccountResource = new newrelic.cloud.AwsLinkAccount("awsLinkAccountResource", {
arn: "string",
accountId: 0,
metricCollectionMode: "string",
name: "string",
});
type: newrelic:cloud:AwsLinkAccount
properties:
accountId: 0
arn: string
metricCollectionMode: string
name: string
AwsLinkAccount Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AwsLinkAccount resource accepts the following input properties:
- Arn string
- The Amazon Resource Name (ARN) of the IAM role.
- Account
Id int - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - Metric
Collection stringMode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - Name string
- The linked account name
- Arn string
- The Amazon Resource Name (ARN) of the IAM role.
- Account
Id int - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - Metric
Collection stringMode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - Name string
- The linked account name
- arn String
- The Amazon Resource Name (ARN) of the IAM role.
- account
Id Integer - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - metric
Collection StringMode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - name String
- The linked account name
- arn string
- The Amazon Resource Name (ARN) of the IAM role.
- account
Id number - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - metric
Collection stringMode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - name string
- The linked account name
- arn str
- The Amazon Resource Name (ARN) of the IAM role.
- account_
id int - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - metric_
collection_ strmode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - name str
- The linked account name
- arn String
- The Amazon Resource Name (ARN) of the IAM role.
- account
Id Number - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - metric
Collection StringMode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - name String
- The linked account name
Outputs
All input properties are implicitly available as output properties. Additionally, the AwsLinkAccount 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 AwsLinkAccount Resource
Get an existing AwsLinkAccount 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?: AwsLinkAccountState, opts?: CustomResourceOptions): AwsLinkAccount@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[int] = None,
arn: Optional[str] = None,
metric_collection_mode: Optional[str] = None,
name: Optional[str] = None) -> AwsLinkAccountfunc GetAwsLinkAccount(ctx *Context, name string, id IDInput, state *AwsLinkAccountState, opts ...ResourceOption) (*AwsLinkAccount, error)public static AwsLinkAccount Get(string name, Input<string> id, AwsLinkAccountState? state, CustomResourceOptions? opts = null)public static AwsLinkAccount get(String name, Output<String> id, AwsLinkAccountState state, CustomResourceOptions options)resources: _: type: newrelic:cloud:AwsLinkAccount get: id: ${id}- 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.
- Account
Id int - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - Arn string
- The Amazon Resource Name (ARN) of the IAM role.
- Metric
Collection stringMode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - Name string
- The linked account name
- Account
Id int - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - Arn string
- The Amazon Resource Name (ARN) of the IAM role.
- Metric
Collection stringMode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - Name string
- The linked account name
- account
Id Integer - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - arn String
- The Amazon Resource Name (ARN) of the IAM role.
- metric
Collection StringMode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - name String
- The linked account name
- account
Id number - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - arn string
- The Amazon Resource Name (ARN) of the IAM role.
- metric
Collection stringMode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - name string
- The linked account name
- account_
id int - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - arn str
- The Amazon Resource Name (ARN) of the IAM role.
- metric_
collection_ strmode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - name str
- The linked account name
- account
Id Number - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID. - arn String
- The Amazon Resource Name (ARN) of the IAM role.
- metric
Collection StringMode - How metrics will be collected. Use
PUSHfor a metric stream orPULLto integrate with individual services. - name String
- The linked account name
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
