> **Experimental**
>
> `@aws-cdk/aws-neptune-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# ParameterGroup

DB parameter group.

Extends: [Construct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Construct.html) › [Resource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Resource.html) › ParameterGroup
Implements: [IParameterGroup](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-neptune-alpha.IParameterGroup.html), [IResource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResource.html), [IEnvironmentAware](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.IEnvironmentAware.html), [IConstruct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.IConstruct.html), IDependable

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- CloudFormation: [`AWS::Neptune::DBParameterGroup`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-neptune-dbparametergroup.html)
- L1 type: [`CfnDBParameterGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_neptune.CfnDBParameterGroup.html)
- Source: [`lib/parameter-group.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-neptune-alpha/lib/parameter-group.ts#L154)

## Example

TypeScript:

```ts
const clusterParams = new neptune.ClusterParameterGroup(this, 'ClusterParams', {
  description: 'Cluster parameter group',
  parameters: {
    neptune_enable_audit_log: '1'
  },
});

const dbParams = new neptune.ParameterGroup(this, 'DbParams', {
  description: 'Db parameter group',
  parameters: {
    neptune_query_timeout: '120000',
  },
});

const cluster = new neptune.DatabaseCluster(this, 'Database', {
  vpc,
  instanceType: neptune.InstanceType.R5_LARGE,
  clusterParameterGroup: clusterParams,
  parameterGroup: dbParams,
});
```

Python:

```python
cluster_params = neptune.ClusterParameterGroup(self, "ClusterParams",
    description="Cluster parameter group",
    parameters={
        "neptune_enable_audit_log": "1"
    }
)

db_params = neptune.ParameterGroup(self, "DbParams",
    description="Db parameter group",
    parameters={
        "neptune_query_timeout": "120000"
    }
)

cluster = neptune.DatabaseCluster(self, "Database",
    vpc=vpc,
    instance_type=neptune.InstanceType.R5_LARGE,
    cluster_parameter_group=cluster_params,
    parameter_group=db_params
)
```

Java:

```java
ClusterParameterGroup clusterParams = ClusterParameterGroup.Builder.create(this, "ClusterParams")
        .description("Cluster parameter group")
        .parameters(Map.of(
                "neptune_enable_audit_log", "1"))
        .build();

ParameterGroup dbParams = ParameterGroup.Builder.create(this, "DbParams")
        .description("Db parameter group")
        .parameters(Map.of(
                "neptune_query_timeout", "120000"))
        .build();

DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Database")
        .vpc(vpc)
        .instanceType(InstanceType.R5_LARGE)
        .clusterParameterGroup(clusterParams)
        .parameterGroup(dbParams)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.Neptune.Alpha
var clusterParams = new ClusterParameterGroup(this, "ClusterParams", new ClusterParameterGroupProps {
    Description = "Cluster parameter group",
    Parameters = new Dictionary<string, string> {
        { "neptune_enable_audit_log", "1" }
    }
});

var dbParams = new ParameterGroup(this, "DbParams", new ParameterGroupProps {
    Description = "Db parameter group",
    Parameters = new Dictionary<string, string> {
        { "neptune_query_timeout", "120000" }
    }
});

var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
    Vpc = vpc,
    InstanceType = InstanceType.R5_LARGE,
    ClusterParameterGroup = clusterParams,
    ParameterGroup = dbParams
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkneptunealpha/v2
clusterParams := neptune.NewClusterParameterGroup(this, jsii.String("ClusterParams"), &ClusterParameterGroupProps{
	Description: jsii.String("Cluster parameter group"),
	Parameters: map[string]*string{
		"neptune_enable_audit_log": jsii.String("1"),
	},
})

dbParams := neptune.NewParameterGroup(this, jsii.String("DbParams"), &ParameterGroupProps{
	Description: jsii.String("Db parameter group"),
	Parameters: map[string]*string{
		"neptune_query_timeout": jsii.String("120000"),
	},
})

cluster := neptune.NewDatabaseCluster(this, jsii.String("Database"), &DatabaseClusterProps{
	Vpc: Vpc,
	InstanceType: neptune.InstanceType_R5_LARGE(),
	ClusterParameterGroup: clusterParams,
	ParameterGroup: dbParams,
})
```

## Initializer

TypeScript:

```ts
new ParameterGroup(scope: Construct, id: string, props: ParameterGroupProps)
```

Python:

```python
ParameterGroup(scope: Construct, id: str, props: ParameterGroupProps)
```

Java:

```java
new ParameterGroup(Construct scope, String id, ParameterGroupProps props)
```

C# / .NET:

```csharp
new ParameterGroup(Construct scope, string id, ParameterGroupProps props)
```

Golang:

```go
NewParameterGroup(Scope Construct, Id *string, Props ParameterGroupProps)
```

## Construct Props

- `description`: string — Description for this parameter group.

  **Default:** a CDK generated description

- `family`: [ParameterGroupFamily](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-neptune-alpha.ParameterGroupFamily.html) = NEPTUNE_1 — Parameter group family.

- `parameterGroupName`: string — The name of the parameter group.

  **Default:** A CDK generated name for the parameter group

- `parameters`: { [key: string]: string } (required) — The parameters in this parameter group.

## Properties

- `env`: [ResourceEnvironment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — The environment this resource belongs to.

  For resources that are created and managed in a Stack (those created by
  creating new class instances like `new Role()`, `new Bucket()`, etc.), this
  is always the same as the environment of the stack they belong to.

  For referenced resources (those obtained from referencing methods like
  `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
  different than the stack they were imported into.

- `node`: [Node](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `parameterGroupName`: string — The name of the parameter group.

- `PROPERTY_INJECTION_ID`: string (static) — Uniquely identifies this class.

- `stack`: [Stack](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this resource is defined.

## Methods

- `applyCrossStackReferenceStrength(strength: ReferenceStrength): void` — Override the cross-stack reference strength for this resource.

  When set, any cross-stack reference to this resource will use the specified
  mechanism instead of the global default determined by the
  `@aws-cdk/core:defaultCrossStackReferences` context key. This is useful for
  selectively weakening specific references to avoid the "deadly embrace" problem
  without changing the app-wide default.

  **Parameters**

  - `strength` — - The reference strength to use for this resource.

- `applyRemovalPolicy(policy: RemovalPolicy): void` — Apply the given removal policy to this resource.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).

- `fromParameterGroupName(scope: Construct, id: string, parameterGroupName: string): IParameterGroup` (static) — Imports a parameter group.

- `isConstruct(x: any): boolean` (static) — Checks if `x` is a construct.

  Use this method instead of `instanceof` to properly detect `Construct`
  instances, even when the construct library is symlinked.

  Explanation: in JavaScript, multiple copies of the `constructs` library on
  disk are seen as independent, completely different libraries. As a
  consequence, the class `Construct` in each copy of the `constructs` library
  is seen as a different class, and an instance of one class will not test as
  `instanceof` the other class. `npm install` will not create installations
  like this, but users may manually symlink construct libraries together or
  use a monorepo tool: in those cases, multiple copies of the `constructs`
  library can be accidentally installed, and `instanceof` will behave
  unpredictably. It is safest to avoid using `instanceof`, and using
  this type-testing method instead.

  **Parameters**

  - `x` — Any object.

  **Returns:** true if `x` is an object created from a class which extends `Construct`.

- `isOwnedResource(construct: IConstruct): boolean` (static) — Returns true if the construct was created by CDK, and false otherwise.

- `isResource(construct: IConstruct): boolean` (static) — Check whether the given construct is a Resource.

- `toString(): string` — Returns a string representation of this construct.

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.
  Use multiple `with()` calls if subsequent mixins should apply to added
  constructs.
