# CfnAssessmentTargetProps

Struct · External

Properties for defining a `CfnAssessmentTarget`.

Used as props by: [CfnAssessmentTarget](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_inspector.CfnAssessmentTarget.html)

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_inspector as inspector } from 'aws-cdk-lib';
const cfnAssessmentTargetProps: inspector.CfnAssessmentTargetProps = {
  assessmentTargetName: 'assessmentTargetName',
  resourceGroupArn: 'resourceGroupArn',
};
```

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_inspector as inspector

cfn_assessment_target_props = inspector.CfnAssessmentTargetProps(
    assessment_target_name="assessmentTargetName",
    resource_group_arn="resourceGroupArn"
)
```

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.inspector.*;

CfnAssessmentTargetProps cfnAssessmentTargetProps = CfnAssessmentTargetProps.builder()
        .assessmentTargetName("assessmentTargetName")
        .resourceGroupArn("resourceGroupArn")
        .build();
```

C#:

```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.Inspector;

var cfnAssessmentTargetProps = new CfnAssessmentTargetProps {
    AssessmentTargetName = "assessmentTargetName",
    ResourceGroupArn = "resourceGroupArn"
};
```

Go:

```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"

cfnAssessmentTargetProps := &CfnAssessmentTargetProps{
	AssessmentTargetName: jsii.String("assessmentTargetName"),
	ResourceGroupArn: jsii.String("resourceGroupArn"),
}
```

## Properties

- `assessmentTargetName`: string — The name of the Amazon Inspector assessment target.

  The name must be unique within the AWS account .

- `resourceGroupArn`: string | [IResourceGroupRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_inspector.IResourceGroupRef.html) — The ARN that specifies the resource group that is used to create the assessment target.

  If `resourceGroupArn` is not specified, all EC2 instances in the current AWS account and Region are included in the assessment target.
