@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
145 lines (144 loc) • 5.33 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages the Feed Retention Policy within Azure DevOps.
*
* ## Example Usage
*
* ### Project Feed
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.Project("example", {
* name: "Example Project",
* visibility: "private",
* versionControl: "Git",
* workItemTemplate: "Agile",
* description: "Managed by Pulumi",
* });
* const exampleFeed = new azuredevops.Feed("example", {
* name: "ExampleFeed",
* projectId: example.id,
* });
* const exampleFeedRetentionPolicy = new azuredevops.FeedRetentionPolicy("example", {
* projectId: example.id,
* feedId: exampleFeed.id,
* countLimit: 20,
* daysToKeepRecentlyDownloadedPackages: 30,
* });
* ```
*
* ### Organization Feed
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.Feed("example", {name: "examplefeed"});
* const exampleFeedRetentionPolicy = new azuredevops.FeedRetentionPolicy("example", {
* feedId: example.id,
* countLimit: 20,
* daysToKeepRecentlyDownloadedPackages: 30,
* });
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - Feed Management](https://learn.microsoft.com/en-us/rest/api/azure/devops/artifacts/feed-management?view=azure-devops-rest-7.0)
*
* ## Import
*
* Azure DevOps Feed Retention Policy can be imported using the Project ID and Feed ID or Feed ID e.g.:
*
* ```sh
* $ pulumi import azuredevops:index/feedRetentionPolicy:FeedRetentionPolicy example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
* ```
*
* or
*
* ```sh
* $ pulumi import azuredevops:index/feedRetentionPolicy:FeedRetentionPolicy example 00000000-0000-0000-0000-000000000000
* ```
*/
export declare class FeedRetentionPolicy extends pulumi.CustomResource {
/**
* Get an existing FeedRetentionPolicy resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FeedRetentionPolicyState, opts?: pulumi.CustomResourceOptions): FeedRetentionPolicy;
/**
* Returns true if the given object is an instance of FeedRetentionPolicy. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is FeedRetentionPolicy;
/**
* The maximum number of versions per package.
*/
readonly countLimit: pulumi.Output<number>;
/**
* The days to keep recently downloaded packages.
*/
readonly daysToKeepRecentlyDownloadedPackages: pulumi.Output<number>;
/**
* The ID of the Feed. Changing this forces a new resource to be created.
*/
readonly feedId: pulumi.Output<string>;
/**
* The ID of the Project. If not specified, Feed will be created at the organization level. Changing this forces a new resource to be created.
*/
readonly projectId: pulumi.Output<string | undefined>;
/**
* Create a FeedRetentionPolicy resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: FeedRetentionPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering FeedRetentionPolicy resources.
*/
export interface FeedRetentionPolicyState {
/**
* The maximum number of versions per package.
*/
countLimit?: pulumi.Input<number>;
/**
* The days to keep recently downloaded packages.
*/
daysToKeepRecentlyDownloadedPackages?: pulumi.Input<number>;
/**
* The ID of the Feed. Changing this forces a new resource to be created.
*/
feedId?: pulumi.Input<string>;
/**
* The ID of the Project. If not specified, Feed will be created at the organization level. Changing this forces a new resource to be created.
*/
projectId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a FeedRetentionPolicy resource.
*/
export interface FeedRetentionPolicyArgs {
/**
* The maximum number of versions per package.
*/
countLimit: pulumi.Input<number>;
/**
* The days to keep recently downloaded packages.
*/
daysToKeepRecentlyDownloadedPackages: pulumi.Input<number>;
/**
* The ID of the Feed. Changing this forces a new resource to be created.
*/
feedId: pulumi.Input<string>;
/**
* The ID of the Project. If not specified, Feed will be created at the organization level. Changing this forces a new resource to be created.
*/
projectId?: pulumi.Input<string>;
}