# AppSyncEventResource

A class used to generate resource arns for AppSync Event APIs.

- Source: [`aws-appsync/lib/appsync-common.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-appsync/lib/appsync-common.ts#L10)
- Type last changed: v2.178.0 · 6 Feb 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const appSyncEventResource = appsync.AppSyncEventResource.all();
```

## Methods

- `all(): AppSyncEventResource // chainable` (static) — Generate the resource names that accepts all types: `*`.

- `allChannelNamespaces(): AppSyncEventResource // chainable` (static) — Generate the resource names that accepts all channel namespaces: `*`.

- `forAPI(): AppSyncEventResource // chainable` (static) — Generate a resource for the calling API.

- `ofChannelNamespace(channelNamespace: string): AppSyncEventResource // chainable` (static) — Generate the resource names given a channel namespace.

  **Parameters**

  - `channelNamespace` — The channel namespace that needs to be allowed.

- `resourceArns(api: EventApiBase): string[]` — Return the Resource ARN.

  **Parameters**

  - `api` — The AppSync API to give permissions.
