issuer_policies
Creates, updates, deletes, gets or lists an issuer_policies resource.
Overview
| Name | issuer_policies |
| Type | Resource |
| Id | vercel.kms.issuer_policies |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
create | insert | issuer_id, kind, project_id, environments | team_id, slug | Attach a policy to a KMS issuer that grants a project's deployments permission to sign with it. |
update | update | issuer_id, kind, policy_key | team_id, slug | Update an existing KMS issuer policy's environments or token claims. |
delete | delete | issuer_id, kind, policy_key | team_id, slug | Remove a policy from a KMS issuer. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
issuer_id | string | The ID of the issuer. |
kind | string | The issuer policy kind. |
policy_key | string | The policy identifier. |
slug | string | The Team slug to perform the request on behalf of. |
team_id | string | The Team identifier to perform the request on behalf of. (wire: teamId) |
INSERT examples
- create
- Manifest
Attach a policy to a KMS issuer that grants a project's deployments permission to sign with it.
INSERT INTO vercel.kms.issuer_policies (
kind,
project_id,
environments,
token_claims,
issuer_id,
team_id,
slug
)
SELECT
'{{ kind }}' /* required */,
'{{ project_id }}' /* required */,
'{{ environments }}' /* required */,
'{{ token_claims }}',
'{{ issuer_id }}',
'{{ team_id }}',
'{{ slug }}'
RETURNING
client_id,
project_id,
team_id,
created_at,
environments,
kind,
token_claims,
updated_at
;
# Description fields are for documentation purposes
- name: issuer_policies
props:
- name: issuer_id
value: "{{ issuer_id }}"
description: Required parameter for the issuer_policies resource.
- name: kind
value: "{{ kind }}"
valid_values: ['project-grant']
- name: project_id
value: "{{ project_id }}"
description: |
The project ID for the project grant policy.
- name: environments
value:
- "{{ environments }}"
description: |
The environments for the project grant policy. Each entry is a system environment (production, preview, development) or a custom environment ID (env_...).
- name: token_claims
value: "{{ token_claims }}"
description: |
The claims that KMS should include in signed JWTs for this policy.
- name: team_id
value: "{{ team_id }}"
description: The Team identifier to perform the request on behalf of.
description: The Team identifier to perform the request on behalf of.
- name: slug
value: "{{ slug }}"
description: The Team slug to perform the request on behalf of.
description: The Team slug to perform the request on behalf of.
UPDATE examples
- update
Update an existing KMS issuer policy's environments or token claims.
UPDATE vercel.kms.issuer_policies
SET
environments = '{{ environments }}',
token_claims = '{{ token_claims }}'
WHERE
issuer_id = '{{ issuer_id }}' --required
AND kind = '{{ kind }}' --required
AND policy_key = '{{ policy_key }}' --required
AND team_id = '{{ team_id}}'
AND slug = '{{ slug}}'
RETURNING
client_id,
project_id,
team_id,
created_at,
environments,
kind,
token_claims,
updated_at;
DELETE examples
- delete
Remove a policy from a KMS issuer.
DELETE FROM vercel.kms.issuer_policies
WHERE issuer_id = '{{ issuer_id }}' --required
AND kind = '{{ kind }}' --required
AND policy_key = '{{ policy_key }}' --required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;