# diagrid subscription create

Create a pub/sub topic subscription

### Description

Create topic subscription targeting a pub/sub component in a project

```
diagrid subscription create <subscription> [flags]
```

### Examples

```

  # Create pub/sub topic subscription
  diagrid subscription create my-subscription --component my-pubsub --topic my-topic --route /method --scopes my-id

```

### Options

```
  -c, --component string                   Name of the target pub/sub component
  -t, --topic string                       Name of the topic
  -r, --route string                       Route in the app code where messages will be delivered
  -s, --scopes strings                     List of ids which will subscribe to the topic (must exist in project and have access to pubsub broker)
  -b, --bulk                               Enable bulk subscription
  -m, --bulk-max-messages-count int        Maximum number of messages to be sent in a single bulk subscription
  -a, --bulk-max-await-duration duration   Maximum duration to wait for messages to be sent in a single bulk subscription
  -p, --project string                     Name of existing project
  -w, --wait                               Wait for long-running resource creation to finish
  -h, --help                               help for create
```

### Options inherited from parent commands

```
      --api-key string   Diagrid Cloud API key
```

### SEE ALSO

- [diagrid subscription](./subscription.md)	 - Manage pub/sub topic subscriptions
