apiPolicyTemplateUpdate
Updates an existing policy template. Any version of the template can be updated. Input Parameters:
template: Configuration object containing the templateid, an optionalversion, and the fields to update. Ifversionis omitted, the latest version is updated. Response:- Returns the updated DeployedApiPolicyTemplate object with all template details.
- If no deployed API is attached to the version being updated, that version is updated in place. If one or more deployed APIs are attached to it and the rules change, a new template version is created with the updated rules and the existing version is left unchanged. Description changes are always applied in place. Example Request:
mutation {
apiPolicyTemplateUpdate(
template: {
id: "<xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx>",
version: 1,
description: "Updated security policies for production APIs",
rules: [
{
ruleIds: ["<xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx>", "<yyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy>", "<zzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz>"],
appliedWhen: BEFORE_REQUEST_AFTER_STANDARD_POLICIES
},
{
ruleIds: ["<aaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa>", "<bbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb>", "<ccccccc-cccc-cccc-cccc-cccccccccccc>"],
appliedWhen: BEFORE_REQUEST_BEFORE_STANDARD_POLICIES
}
]
}
) {
id,
name,
description,
version,
rules {
rules { id, name },
appliedWhen
}
}
}
apiPolicyTemplateUpdate(
template: DeployedApiPolicyTemplateUpdateInput!
): DeployedApiPolicyTemplate!
Arguments
apiPolicyTemplateUpdate.template ● DeployedApiPolicyTemplateUpdateInput! non-null input platform {#template}
Type
DeployedApiPolicyTemplate object platform
Represents a reusable policy template that can be applied to multiple API deployments.
Was this topic helpful?