GWD extension type
The gwd_extension
type is a JSON map that is used to apply user
customizations to objects generated by the gateway service.
The gwd_extension
map contains an array of user-defined CLI commands to be
run on one or more objects. Only one gwd_extension
is allowed in the manifest. When
deployment is set to deferred, restarting the API Connect gateway service object
is required to apply, update, or remove the overrides.
Key features of the
gwd_extension
type:- The
gwd_extension
type can be used to define overrides at various scope-levels, which means a single array of override commands can be applied to one or more objects of a particular type. - With some object mappings, you can define instances within a scope so that you can apply the
custom CLI commands to all objects in that scope that match a particular name or criteria. For
example, you can apply overrides to all catalog instances with the name
MyCatalog
regardless of which organization it belongs to. - By default, the overrides are applied in order of scope granularity (global → organization → catalog → product → instance).
- Add
"@exclusive": true
to the object at any scope level to signal not to apply the previous scopes. Similarly, using an empty override array in a scope is a signal to not apply all previous scope overrides for that mapping, see tls-client for an example.
The supported scopes are:
_global
: Applies customizations to all objects of a particular type. For example, add one or more custom assembly-rate-limits to allapi-collections
._instance
: Applies customizations to all objects that match a name or criteria. For example, add one or more customassembly-rate-limits
to allapi-collections
with the namemy-restricted-catalog
regardless which organization it belongs to.
_organization
: Applies customizations to all objects used in an organization. For example, apply a customization to all TLS client profiles that are used in the organization calledprovorg
.-
_instance
: Applies customizations to all objects that match a name or criteria. For example, applying a customization to all TLS client profiles with a particular name and version regardless of which catalog is using it.
-
_catalog
: Applies customizations to all objects used in a catalog. For example, apply a customization to all TLS client profiles used in the catalogmyCat
of organizationmyOrg
.-
_instance
: Applies customizations to all objects that match a name or criteria. For example, applying a customization to all plans in a catalog with a particular name regardless of which product it comes from.
-
_product
: Applies customizations to all objects of a type used in a product. For example, apply a customization to all plans inproduct my-prod:1.0.0
published in catalogmyCat
of organizationmyOrg
. The product scope is only used by the api-plangwd_extension
extension type._instance
: Applies customizations to a single instance. For example, apply a customization to TLS client profilemy-profile:1.0.0
in catalogmyCat
of organizationmyOrg
.
Example
gwd_extension
that shows multiple types of overrides:{
"parse-settings":{
"_global":{
"override":[
"document-size 4194304"
]
}
},
"apigw":{
"_global":{
"override":[
"assembly-rate-limit ratelimit-reject-ALL 10000 5 second on on on off off off \"\" \"1\"",
"assembly-rate-limit ratelimit-alert-ALL 7500 5 second off on on off off off \"\" \"1\""
]
}
}
}
The gwd_extension
type supports the following objects: