metadata:
  name: apiKeyValueMapDownload
  description: Download a specific Key Value Map from the API Portal
  longDescription: |
    With this step you can download a specific Key Value Map from the API Portal, which returns a zip file with the Key Value Map contents in to current workspace using the OData API.
    Learn more about the SAP API Management API for downloading an Key Value Map artifact [here](https://help.sap.com/viewer/66d066d903c2473f81ec33acfe2ccdb4/Cloud/en-US/e26b3320cd534ae4bc743af8013a8abb.html).

spec:
  inputs:
    secrets:
      - name: apimApiServiceKeyCredentialsId
        description: Jenkins secret text credential ID containing the service key to the API Management Runtime service instance of plan 'api'
        type: jenkins
    params:
      - name: apiServiceKey
        type: string
        description: Service key JSON string to access the API Management Runtime service instance of plan 'api'
        scope:
          - PARAMETERS
        mandatory: true
        secret: true
        resourceRef:
          - name: apimApiServiceKeyCredentialsId
            type: secret
            param: apiServiceKey
      - name: keyValueMapName
        type: string
        description: Specifies the name of the Key Value Map.
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
        mandatory: true
      - name: downloadPath
        type: string
        description: Specifies Key Value Map download CSV file location.
        scope:
          - PARAMETERS
          - STAGES
          - STEPS
        mandatory: true
