Required information to create a new retention lease.

interface NewRetentionLease {
    daysValid?: number;
    definitionId?: number;
    ownerId?: string;
    protectPipeline?: boolean;
    runId?: number;
}

Properties

daysValid?: number

The number of days to consider the lease valid. A retention lease valid for more than 100 years (36500 days) will display as retaining the build "forever".

definitionId?: number

The pipeline definition of the run.

ownerId?: string

User-provided string that identifies the owner of a retention lease.

protectPipeline?: boolean

If set, this lease will also prevent the pipeline from being deleted while the lease is still valid.

runId?: number

The pipeline run to protect.