# Documentation for `scw annotations`


:::note{title="The CLI documentation pages are currently under construction"}
The content is up to date. We're making improvements to the site over the next few weeks for a better experience.
:::

<!-- DO NOT EDIT: this file is automatically generated using scw-doc-gen -->
Annotations API

## Annotation binding management commands

Annotation binding management commands.


### Attach a value to a resource. Fails if the resource already has a value for this key.

Attach a value to a resource. Fails if the resource already has a value for this key.

**Usage:**

```shell
scw annotations binding create [arg=value ...]
```


**Arguments:**

| Name     | Description                            | Argument Specifications |
|----------|----------------------------------------|-------------------------|
| srn      | Scaleway Resource Number to associate. |                         |
| value-id | ID of the value to associate.          |                         |



### Detach an annotation from a resource.

Detach an annotation from a resource.

**Usage:**

```shell
scw annotations binding delete [arg=value ...]
```


**Arguments:**

| Name       | Description                  | Argument Specifications |
|------------|------------------------------|-------------------------|
| binding-id | ID of the binding to delete. | Required                |



### Delete ALL bindings associated with a Scaleway Resource Number.

Delete ALL bindings associated with a Scaleway Resource Number.

**Usage:**

```shell
scw annotations binding delete-all-matching-srn [arg=value ...]
```


**Arguments:**

| Name            | Description                                                                        | Argument Specifications |
|-----------------|------------------------------------------------------------------------------------|-------------------------|
| srn             | Scaleway Resource Number for which all bindings should be deleted.                 |                         |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used |                         |



### Delete ALL bindings associated with a value.

Delete ALL bindings associated with a value.

**Usage:**

```shell
scw annotations binding delete-all-matching-value [arg=value ...]
```


**Arguments:**

| Name     | Description                                               | Argument Specifications |
|----------|-----------------------------------------------------------|-------------------------|
| value-id | ID of the value for which all bindings should be deleted. |                         |



### List all bindings, or filter by Scaleway Resource Number or value ID. Response order by ID.

List all bindings, or filter by Scaleway Resource Number or value ID. Response order by ID.

**Usage:**

```shell
scw annotations binding list [arg=value ...]
```


**Arguments:**

| Name            | Description                                                                        | Argument Specifications |
|-----------------|------------------------------------------------------------------------------------|-------------------------|
| srn             | Scaleway Resource Number for which to list all bindings.                           |                         |
| value-id        | Value ID for which to list all bindings.                                           |                         |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used |                         |



## Annotation key management commands

Annotation key management commands.


### Create an annotation key.

Create an annotation key.

**Usage:**

```shell
scw annotations key create [arg=value ...]
```


**Arguments:**

| Name            | Description                                                                        | Argument Specifications |
|-----------------|------------------------------------------------------------------------------------|-------------------------|
| name            | Name of the annotation key.                                                        |                         |
| description     | Description of the annotation key.                                                 |                         |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used |                         |



### Delete a key definition. Fails if the key has any associated values.

Delete a key definition. Fails if the key has any associated values.

**Usage:**

```shell
scw annotations key delete [arg=value ...]
```


**Arguments:**

| Name   | Description              | Argument Specifications |
|--------|--------------------------|-------------------------|
| key-id | ID of the key to delete. | Required                |



### Retrieve a specific key.

Retrieve a specific key.

**Usage:**

```shell
scw annotations key get [arg=value ...]
```


**Arguments:**

| Name   | Description                | Argument Specifications |
|--------|----------------------------|-------------------------|
| key-id | ID of the key to retrieve. | Required                |



### List of keys.

List of keys.

**Usage:**

```shell
scw annotations key list [arg=value ...]
```


**Arguments:**

| Name            | Description                                                                        | Argument Specifications |
|-----------------|------------------------------------------------------------------------------------|-------------------------|
| organization-id | Organization ID to use. If none is passed the default organization ID will be used |                         |



### Update name or description. All associated resources will immediately display the new name.

Update name or description. All associated resources will immediately display the new name.

**Usage:**

```shell
scw annotations key update [arg=value ...]
```


**Arguments:**

| Name        | Description                 | Argument Specifications |
|-------------|-----------------------------|-------------------------|
| key-id      | ID of the key to update.    | Required                |
| name        | New name of the key.        |                         |
| description | New description of the key. |                         |



## Combined keys and values management commands

Combined keys and values management commands.


### List all keys and values for an organization, sorted alphabetically by key name and value name.

List all keys and values for an organization, sorted alphabetically by key name and value name.

**Usage:**

```shell
scw annotations key-value list [arg=value ...]
```


**Arguments:**

| Name            | Description                                                                        | Argument Specifications |
|-----------------|------------------------------------------------------------------------------------|-------------------------|
| organization-id | Organization ID to use. If none is passed the default organization ID will be used |                         |



## Annotation value management commands

Annotation value management commands.


### Add a value definition to a key.

Add a value definition to a key.

**Usage:**

```shell
scw annotations value create [arg=value ...]
```


**Arguments:**

| Name        | Description                               | Argument Specifications |
|-------------|-------------------------------------------|-------------------------|
| key-id      | ID of the key the value will be bound to. |                         |
| name        | Name of the value.                        |                         |
| description | Description of the value.                 |                         |



### Delete a value definition. Fails if the value is currently bound to any resource.

Delete a value definition. Fails if the value is currently bound to any resource.

**Usage:**

```shell
scw annotations value delete [arg=value ...]
```


**Arguments:**

| Name     | Description                | Argument Specifications |
|----------|----------------------------|-------------------------|
| value-id | ID of the value to delete. | Required                |



### Delete ALL values associated with a key. Fails if any of these values are currently bound to any resource.

Delete ALL values associated with a key. Fails if any of these values are currently bound to any resource.

**Usage:**

```shell
scw annotations value delete-all-matching-key [arg=value ...]
```


**Arguments:**

| Name   | Description                                   | Argument Specifications |
|--------|-----------------------------------------------|-------------------------|
| key-id | ID of the key for which to delete all values. |                         |



### Retrieve a specific value.

Retrieve a specific value.

**Usage:**

```shell
scw annotations value get [arg=value ...]
```


**Arguments:**

| Name     | Description                  | Argument Specifications |
|----------|------------------------------|-------------------------|
| value-id | ID of the value to retrieve. | Required                |



### List all values for a key, sorted alphabetically by name.

List all values for a key, sorted alphabetically by name.

**Usage:**

```shell
scw annotations value list [arg=value ...]
```


**Arguments:**

| Name            | Description                                                                        | Argument Specifications |
|-----------------|------------------------------------------------------------------------------------|-------------------------|
| key-id          | ID of the key to list the values for.                                              |                         |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used |                         |



### Update name or description. Global update.

Update name or description. Global update.

**Usage:**

```shell
scw annotations value update [arg=value ...]
```


**Arguments:**

| Name        | Description                   | Argument Specifications |
|-------------|-------------------------------|-------------------------|
| value-id    | ID of the value to update.    | Required                |
| name        | New name of the value.        |                         |
| description | New description of the value. |                         |



