# CfnNamedQueryProps

Struct · External

Properties for defining a `CfnNamedQuery`.

Used as props by: [CfnNamedQuery](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_athena.CfnNamedQuery.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_athena as athena } from 'aws-cdk-lib';
const cfnNamedQueryProps: athena.CfnNamedQueryProps = {
  database: 'database',
  queryString: 'queryString',

  // the properties below are optional
  description: 'description',
  name: 'name',
  workGroup: 'workGroup',
};
```

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_athena as athena

cfn_named_query_props = athena.CfnNamedQueryProps(
    database="database",
    query_string="queryString",

    # the properties below are optional
    description="description",
    name="name",
    work_group="workGroup"
)
```

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

CfnNamedQueryProps cfnNamedQueryProps = CfnNamedQueryProps.builder()
        .database("database")
        .queryString("queryString")

        // the properties below are optional
        .description("description")
        .name("name")
        .workGroup("workGroup")
        .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.Athena;

var cfnNamedQueryProps = new CfnNamedQueryProps {
    Database = "database",
    QueryString = "queryString",

    // the properties below are optional
    Description = "description",
    Name = "name",
    WorkGroup = "workGroup"
};
```

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"

cfnNamedQueryProps := &CfnNamedQueryProps{
	Database: jsii.String("database"),
	QueryString: jsii.String("queryString"),

	// the properties below are optional
	Description: jsii.String("description"),
	Name: jsii.String("name"),
	WorkGroup: jsii.String("workGroup"),
}
```

## Properties

- `database`: string (required) — The database to which the query belongs.

- `description`: string — The query description.

- `name`: string — The query name.

- `queryString`: string (required) — The SQL statements that make up the query.

- `workGroup`: string | [IWorkGroupRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_athena.IWorkGroupRef.html) — The name of the workgroup that contains the named query.
