# `Twilio.Sync.V1.Service.Map.ItemService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/sync/v1/service/map/item_service.ex#L2)

Keys in a sync map

Operations: `list`, `create`, `fetch`, `update`, `delete`

# `create`

```elixir
@spec create(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Sync.V1.Service.Map.Item.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `CreateSyncMapItem` | Tags: SyncV1SyncMapItem

## Required Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Data` | string | A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. |
| `Key` | string | The unique, user-defined key for the Map Item. Can be up to 320 characters long. |
## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `CollectionTtl` | integer | How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item's parent Sync Map expires (time-to-live) and is deleted. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `ItemTtl` | integer | How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item expires (time-to-live) and is deleted. |
| `Ttl` | integer | An alias for `item_ttl`. If both parameters are provided, this value is ignored. |

# `delete`

```elixir
@spec delete(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
```

Operation: `DeleteSyncMapItem` | Tags: SyncV1SyncMapItem

# `fetch`

```elixir
@spec fetch(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Sync.V1.Service.Map.Item.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `FetchSyncMapItem` | Tags: SyncV1SyncMapItem

# `list`

```elixir
@spec list(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `ListSyncMapItem` | Tags: SyncV1SyncMapItem

## Query Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Order` | string | How to order the Map Items returned by their `key` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. Map Items are [ordered lexicographically](https://en.wikipedia.org/wiki/Lexicographical_order) by Item key. |
| `From` | string | The `key` of the first Sync Map Item resource to read. See also `bounds`. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Bounds` | string | Whether to include the Map Item referenced by the `from` parameter. Can be: `inclusive` to include the Map Item referenced by the `from` parameter or `exclusive` to start with the next Map Item. The default value is `inclusive`. |

# `stream`

```elixir
@spec stream(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  Enumerable.t()
```

Stream:  (lazy auto-pagination).

# `update`

```elixir
@spec update(Twilio.Client.t(), String.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Sync.V1.Service.Map.Item.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `UpdateSyncMapItem` | Tags: SyncV1SyncMapItem

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `CollectionTtl` | integer | How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item's parent Sync Map expires (time-to-live) and is deleted. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Data` | string | A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `ItemTtl` | integer | How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item expires (time-to-live) and is deleted. |
| `Ttl` | integer | An alias for `item_ttl`. If both parameters are provided, this value is ignored. |

---

*Consult [api-reference.md](api-reference.md) for complete listing*
