Back to index
Summary
Modifies the specifieddataRetentionPolicy
object.For a list of object types in CloudBees CD/RO, refer to Object types in CloudBees CD/RO. |
dataRetentionPolicyNameStringrequiredUnique name of the data retention policy. actionStringoptionalThe action to take on the data that matches the criteria for the data retention rule. Possible values: "archiveOnly" , "purgeAfterArchive" , "purgeOnly" additionalFiltersArray<AdditionalFilter>optionalAdditional filter criteria for the object type similar to search filters. ageIntegeroptionalMinimum age of the data to qualify for the data retention rule. ageUnitStringoptionalTime unit for age. Possible values: "minutes" , "hours" , "days" , "weeks" , "months" , "years" associatedTagsArray<Unknown>optionalList of tags that the object can be associated with. cleanupAssociatedWorkspaceBooleanoptionalWhether or not to cleanup the associated workspace directory with the job or deployment being purged. cleanupDatabaseBooleanoptionalWhether or not to delete the jobs from the database. If set to false , then cleanupAssociatedWorkspace must be set to true for the jobs or deployments being purged.clearAdditionalFiltersBooleanoptionalWhether or not to clear additional filters for the data retention policy. clearAssociatedTagsBooleanoptionalWhether or not to clear associated tags for the data retention policy. clearProjectNamesBooleanoptionalWhether or not to clear project names for the data retention policy. clearStatusesBooleanoptionalWhether or not to clear statuses for the data retention policy. descriptionStringoptionalComment text describing this object that is not interpreted at all by CloudBees CD/RO. enabledBooleanoptionalTrue to enable the data retention policy. Defaults to true when creating the data retention policy. includeSubreleasesBooleanoptionalWhen set to true subreleases will be automatically included for releases matching the data retention rule. Defaults to false. newNameStringoptionalThe new name for an existing object that is being renamed. numberToRetainIntegeroptionalNumber of objects to retain. objectTypeStringoptionalType of object for which the retention rule is defined. Possible values: "ciBuild" , "deployment" , "job" , "pipelineRun" , "release" projectNamesArray<Unknown>optionalList of projects that the object can belong to. statusesArray<Unknown>optionalList of statuses for the object such as job status, release status, pipeline run status, or deployment status. |
Usage
Groovy
import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.modifyDataRetentionPolicy( dataRetentionPolicyName: "test-dataRetentionPolicyName" /* optional arguments */ )