---
title: "MapAction"
url: "https://us-prod.jeffyongtaotang.com/apis/konnect-service-catalog-1/versions/cdbef9b7-686c-4189-bbc8-55c727a972e8/schemas/MapActionPayload"
---

> Full API specification: https://us-prod.jeffyongtaotang.com/apis/konnect-service-catalog-1/versions/cdbef9b7-686c-4189-bbc8-55c727a972e8.md

# MapAction

Must specify **at least one** of the following properties when `action_type` is `map`: - `id` - `name`

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Konnect Service Catalog
  version: 1.3.0
servers:
  - url: https://us.api.konghq.com/v1
    description: United-States Production region
  - url: https://eu.api.konghq.com/v1
    description: Europe Production region
  - url: https://au.api.konghq.com/v1
    description: Australia Production region
  - url: https://me.api.konghq.com/v1
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v1
    description: India Production region
  - url: https://sg.api.konghq.com/v1
    description: Singapore Production region
components:
  schemas:
    MapByName:
      type: object
      additionalProperties: false
      required:
        - name
      properties:
        name:
          type: string
          description: >
            Exact match on service name based on suggestion rule scope.

            Supports JQ expression syntax on discovered entity's
            `integration_record` property.
          example: "{{ .gateway_service.name }}-{{ .runtime_group.labels.env }}"
    MapById:
      type: object
      additionalProperties: false
      required:
        - id
      properties:
        id:
          type: string
          description: >
            Exact match on service identifier based on suggestion rule scope.

            Supports JQ expression syntax on discovered entity's
            `integration_record` property.
          example: 1ace6cb5-75ca-4488-a05d-9260628a37a8
    LabelsTemplate:
      title: LabelsTemplate
      type: object
      example:
        env: test
      description: >
        Labels to facilitate grouping and tagged search.

        Resolved keys must be of length 1-63 characters, and cannot start with
        ''kong'', ''konnect'', ''mesh'', ''kic'', or ''_''.'

        Label key and value supports JQ expression syntax on discovered entity's
        `integration_record` property.
      additionalProperties:
        type: string
        minLength: 1
    MapActionPayload:
      title: MapAction
      description: >
        Must specify **at least one** of the following properties when
        `action_type` is `map`:

        - `id`

        - `name`
      type: object
      additionalProperties: false
      required:
        - type
        - data
      properties:
        type:
          type: string
          enum:
            - map
        data:
          type: object
          additionalProperties: false
          required:
            - service
            - resource
          properties:
            service:
              oneOf:
                - $ref: "#/components/schemas/MapByName"
                - $ref: "#/components/schemas/MapById"
            resource:
              type: object
              additionalProperties: false
              required:
                - labels
              properties:
                labels:
                  $ref: "#/components/schemas/LabelsTemplate"
```
