artifact_log_retention
Creates, updates, deletes, gets or lists an artifact_log_retention resource.
Overview
| Name | artifact_log_retention |
| Type | Resource |
| Id | github.actions.artifact_log_retention |
Fields
The following fields are returned by SELECT queries:
- get_artifact_and_log_retention_settings_repository
- get_artifact_and_log_retention_settings_organization
Response
| Name | Datatype | Description |
|---|---|---|
days | integer | The number of days artifacts and logs are retained |
maximum_allowed_days | integer | The maximum number of days that can be configured |
Response
| Name | Datatype | Description |
|---|---|---|
days | integer | The number of days artifacts and logs are retained |
maximum_allowed_days | integer | The maximum number of days that can be configured |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_artifact_and_log_retention_settings_repository | select | owner, repo | Gets artifact and log retention settings for a repository. OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint. | |
get_artifact_and_log_retention_settings_organization | select | org | Gets artifact and log retention settings for an organization. OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint. | |
set_artifact_and_log_retention_settings_repository | replace | owner, repo, days | Sets artifact and log retention settings for a repository. OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint. | |
set_artifact_and_log_retention_settings_organization | replace | org, days | Sets artifact and log retention settings for an organization. OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint. |
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 |
|---|---|---|
org | string | The organization name. The name is not case sensitive. |
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
SELECT examples
- get_artifact_and_log_retention_settings_repository
- get_artifact_and_log_retention_settings_organization
Gets artifact and log retention settings for a repository.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
SELECT
days,
maximum_allowed_days
FROM github.actions.artifact_log_retention
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;
Gets artifact and log retention settings for an organization.
OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint.
SELECT
days,
maximum_allowed_days
FROM github.actions.artifact_log_retention
WHERE org = '{{ org }}' -- required
;
REPLACE examples
- set_artifact_and_log_retention_settings_repository
- set_artifact_and_log_retention_settings_organization
Sets artifact and log retention settings for a repository.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
REPLACE github.actions.artifact_log_retention
SET
days = {{ days }}
WHERE
owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND days = '{{ days }}' --required;
Sets artifact and log retention settings for an organization.
OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint.
REPLACE github.actions.artifact_log_retention
SET
days = {{ days }}
WHERE
org = '{{ org }}' --required
AND days = '{{ days }}' --required;