-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmanifest_template.yml
More file actions
97 lines (96 loc) · 3.04 KB
/
manifest_template.yml
File metadata and controls
97 lines (96 loc) · 3.04 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
## Manifest template ##
# To view the expanded version of this template locally, clone api-management-utils
#
# $ cd /path/to/local/api-management-utils/ansible
# $ DIST_DIR=/path/to/this/repo make template-manifest
#
#
APIGEE_ENVIRONMENTS:
- name: internal-dev
display_name: Internal Development
make_spec_visible: true
- name: internal-qa
display_name: Internal QA
make_spec_visible: true
- name: dev
display_name: External Development DEP
make_spec_visible: true
- name: int
display_name: Integration Testing
make_spec_visible: true
- name: ref
display_name: Reference / Load Testing
make_spec_visible: true
quota: 120000
appQuota: 120000
- name: prod
display_name: Production
approval_type: manual
make_spec_visible: true
quota: 60000
appQuota: 24000
---
meta:
api:
name: nhs-app
guid: 7541eb6b-3416-4aee-bd66-8766c1f90cfb
spec_guids: ['f5b9779e-d343-4a0a-8410-6dcae48bc55e']
schema_version: 1
apigee:
environments:
{% for ENV in APIGEE_ENVIRONMENTS %}
{% set TITLE = 'NHS App (' + ENV.display_name + ')' %}
{% set DESCRIPTION = 'NHS App - ' + ENV.display_name | lower + ' environment' %}
{% set NAME = 'nhs-app-' + ('dep-' if ENV.name == 'dev' else '') + ENV.name %}
- name: {{ ENV.name }}
products:
- name: {{ NAME }}
approvalType: {{ ENV.approval_type | default('auto') }}
attributes:
- name: access
value: public
- name: ratelimiting
value:
{{ NAME }}:
quota:
enabled: true
interval: 1
limit: {{ ENV.quota | default(2400) }}
timeunit: minute
app:
quota:
enabled: true
interval: 1
limit: {{ ENV.appQuota | default(1200) }}
timeunit: minute
description: {{ DESCRIPTION }}
displayName: {{ TITLE }}
environments: [ {{ ENV.name }} ]
proxies:
- nhs-app-{{ ('dep-' if ENV.name == 'dev' else '') + ENV.name }}
- identity-service-{{ ('dep-' if ENV.name == 'dev' else '') + ENV.name}}
{% if ENV.name == 'int' %}
- identity-service-int-no-smartcard
{% endif %}
scopes:
- 'urn:nhsd:apim:user-nhs-cis2:aal3:{{ SERVICE_NAME }}'
- 'urn:nhsd:apim:app:level3:nhs-app'
- 'urn:nhsd:apim:user-nhs-id:aal3:nhs-app'
# An API Product requires a quota value but it is not used
# (We use the value defined in the ratelimiting attribute)
# Hence this is set to a nonsense value to avoid confusion
quota: '99999'
quotaInterval: '1'
quotaTimeUnit: minute
specs:
- name: {{ NAME }}
path: nhs-app.json
api_catalog:
- edgeAPIProductName: {{ NAME }}
anonAllowed: true
description: {{ DESCRIPTION }}
requireCallbackUrl: {{ ENV.require_callback_url | default(false) }}
title: {{ TITLE }}
visibility: {{ ENV.make_spec_visible | default(false) }}
specId: {{ NAME }}
{% endfor %}