-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsap-integration-suite-provision-key-value-map-workflow.yml
More file actions
74 lines (74 loc) · 2.55 KB
/
Copy pathsap-integration-suite-provision-key-value-map-workflow.yml
File metadata and controls
74 lines (74 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
arazzo: 1.0.1
info:
title: SAP Integration Suite Provision Key Value Map
summary: List existing key-value maps, and create a new one only if it does not already exist.
description: >-
An idempotent configuration-store provisioning loop for API Management. The
workflow lists the existing key-value maps in the tenant, branches on
whether a map with the target name already exists, and creates the
key-value map with its initial key/value pairs only when it is absent. Every
step spells out its request inline so the flow can be read and executed
without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: apiManagementApi
url: ../openapi/sap-integration-suite-api-management-openapi.yml
type: openapi
workflows:
- workflowId: provision-key-value-map
summary: Create a key-value map only when one with the target name does not exist.
description: >-
Lists key-value maps and, when the target name is absent, creates a new
key-value map with its initial key/value pairs.
inputs:
type: object
required:
- mapName
- keyValuePairs
properties:
mapName:
type: string
description: Name of the key-value map to provision.
encrypted:
type: boolean
description: Whether the map values should be stored encrypted.
default: false
scope:
type: string
description: Scope of the key-value map (apiproxy, environment, or organization).
default: environment
keyValuePairs:
type: array
description: Initial key/value pairs to seed the map with.
items:
type: object
properties:
key:
type: string
value:
type: string
steps:
- stepId: listMaps
description: List existing key-value maps to detect whether the target map already exists.
operationId: listKeyValueMaps
successCriteria:
- condition: $statusCode == 200
outputs:
maps: $response.body#/d/results
- stepId: createMap
description: Create the key-value map with its initial key/value pairs.
operationId: createKeyValueMap
requestBody:
contentType: application/json
payload:
name: $inputs.mapName
encrypted: $inputs.encrypted
scope: $inputs.scope
keyValuePairs: $inputs.keyValuePairs
successCriteria:
- condition: $statusCode == 201
outputs:
createStatus: $statusCode
outputs:
existingMaps: $steps.listMaps.outputs.maps
createStatus: $steps.createMap.outputs.createStatus