# NewRelicApiKeyConfigProperty

New Relic API key configuration.

- Source: Generated at build time
- Type last changed: v2.241.0 · 2 Mar 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_devopsagent as devopsagent } from 'aws-cdk-lib';
const newRelicApiKeyConfigProperty: devopsagent.CfnService.NewRelicApiKeyConfigProperty = {
  accountId: 'accountId',
  apiKey: 'apiKey',
  region: 'region',

  // the properties below are optional
  alertPolicyIds: ['alertPolicyIds'],
  applicationIds: ['applicationIds'],
  entityGuids: ['entityGuids'],
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_devopsagent as devopsagent

new_relic_api_key_config_property = devopsagent.CfnService.NewRelicApiKeyConfigProperty(
    account_id="accountId",
    api_key="apiKey",
    region="region",

    # the properties below are optional
    alert_policy_ids=["alertPolicyIds"],
    application_ids=["applicationIds"],
    entity_guids=["entityGuids"]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.devopsagent.*;

NewRelicApiKeyConfigProperty newRelicApiKeyConfigProperty = NewRelicApiKeyConfigProperty.builder()
        .accountId("accountId")
        .apiKey("apiKey")
        .region("region")

        // the properties below are optional
        .alertPolicyIds(List.of("alertPolicyIds"))
        .applicationIds(List.of("applicationIds"))
        .entityGuids(List.of("entityGuids"))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DevOpsAgent;

var newRelicApiKeyConfigProperty = new NewRelicApiKeyConfigProperty {
    AccountId = "accountId",
    ApiKey = "apiKey",
    Region = "region",

    // the properties below are optional
    AlertPolicyIds = new [] { "alertPolicyIds" },
    ApplicationIds = new [] { "applicationIds" },
    EntityGuids = new [] { "entityGuids" }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

newRelicApiKeyConfigProperty := &NewRelicApiKeyConfigProperty{
	AccountId: jsii.String("accountId"),
	ApiKey: jsii.String("apiKey"),
	Region: jsii.String("region"),

	// the properties below are optional
	AlertPolicyIds: []*string{
		jsii.String("alertPolicyIds"),
	},
	ApplicationIds: []*string{
		jsii.String("applicationIds"),
	},
	EntityGuids: []*string{
		jsii.String("entityGuids"),
	},
}
```

## Properties

- `accountId`: string (required) — New Relic Account ID.

- `alertPolicyIds`: string[] — List of alert policy IDs.

- `apiKey`: string (required) — New Relic User API Key.

- `applicationIds`: string[] — List of monitored APM application IDs.

- `entityGuids`: string[] — List of globally unique IDs for New Relic resources.

- `region`: string (required) — New Relic region.
