共用方式為


Retention Policies - Set Retention Policy

設定摘要的保留原則。

如果在專案中建立摘要,則必須提供項目參數。 如果摘要未與任何專案相關聯,請省略要求中的項目參數。

PUT https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/retentionpolicies?api-version=7.1

URI 參數

名稱 位於 必要 類型 Description
feedId
path True

string

摘要的名稱或識別碼。

organization
path True

string

Azure DevOps 組織的名稱。

project
path

string

項目識別碼或項目名稱

api-version
query True

string

要使用的 API 版本。 這應該設定為 『7.1』 以使用此版本的 API。

要求本文

名稱 類型 Description
ageLimitInDays

integer (int32)

此屬性已被取代,且保留未遵守

countLimit

integer (int32)

每個套件和套件類型保留的最大版本。

daysToKeepRecentlyDownloadedPackages

integer (int32)

在最新的下載之後保留套件版本的天數。

回應

名稱 類型 Description
200 OK

FeedRetentionPolicy

成功作業

安全性

oauth2

類型: oauth2
Flow: accessCode
授權 URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
權杖 URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

範圍

名稱 Description
vso.packaging_write 授與建立和讀取摘要和套件的能力。

定義

FeedRetentionPolicy

保留原則設定。

名稱 類型 Description
ageLimitInDays

integer (int32)

此屬性已被取代,且保留未遵守

countLimit

integer (int32)

每個套件和套件類型保留的最大版本。

daysToKeepRecentlyDownloadedPackages

integer (int32)

在最新的下載之後保留套件版本的天數。