Data retention policy

3 minute readReference

createDataRetentionPolicy

Creates a new DataRetentionPolicy object.

Arguments

Argument Name Type Description

dataRetentionPolicyName

String

(Required) Unique name of the data retention policy.

action

DataRetentionPolicyAction

The action to take on the data that matches the criteria for the data retention rule.

additionalFilters

Collection

Additional filter criteria for the object type similar to search filters.

age

Integer

Minimum age of the data to qualify for the data retention rule.

ageUnit

DataRetentionPolicyAgeUnit

Time unit for age.

associatedTags

Collection

List of tags that the object can be associated with.

cleanupAssociatedWorkspace

Boolean

Whether or not to cleanup the associated workspace directory with the job or deployment being purged.

cleanupDatabase

Boolean

Whether 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.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

enabled

Boolean

True to enable the data retention policy. Defaults to true when creating the data retention policy.

includeSubreleases

Boolean

If the data retention rule is defined for releases, then whether to automatically include the subreleases for the releases matching the data retention rule. Defaults to false.

objectType

DataRetentionPolicyObjectType

Type of object for which the retention rule is defined.

projectNames

Collection

List of projects that the object can belong to.

statuses

Collection

List of statuses for the object such as job status, release status, pipeline run status, or deployment status.

Positional arguments

dataRetentionPolicyName

Usage

ec-perl

$cmdr->createDataRetentionPolicy(<dataRetentionPolicyName>, {<optionals>});

ectool

ectool createDataRetentionPolicy dataRetentionPolicyName, [optionals]

deleteDataRetentionPolicy

Deletes the specified dataRetentionPolicy object.

Arguments

Argument Name Type Description

dataRetentionPolicyName

String

(Required) Unique name of the data retention policy.

Positional arguments

dataRetentionPolicyName

Usage

ec-perl

$cmdr->deleteDataRetentionPolicy(<dataRetentionPolicyName>);

ectool

ectool deleteDataRetentionPolicy dataRetentionPolicyName

getDataRetentionPolicies

Retrieves all dataRetentionPolicy objects in the system.

Arguments

None.

Positional arguments

None.

Usage

ec-perl

$cmdr->getDataRetentionPolicies();

ectool

ectool getDataRetentionPolicies

getDataRetentionPolicy

Retrieves the specified dataRetentionPolicy object.

Arguments

Argument Name Type Description

dataRetentionPolicyName

String

(Required) Unique name of the data retention policy.

Positional arguments

dataRetentionPolicyName

Usage

ec-perl

$cmdr->getDataRetentionPolicy(<dataRetentionPolicyName>);

ectool

ectool getDataRetentionPolicy dataRetentionPolicyName

modifyDataRetentionPolicy

Modifies the specified dataRetentionPolicy object.

Arguments

Argument Name Type Description

dataRetentionPolicyName

String

(Required) Unique name of the data retention policy.

action

DataRetentionPolicyAction

The action to take on the data that matches the criteria for the data retention rule.

additionalFilters

Collection

Additional filter criteria for the object type similar to search filters.

age

Integer

Minimum age of the data to qualify for the data retention rule.

ageUnit

DataRetentionPolicyAgeUnit

Time unit for age.

associatedTags

Collection

List of tags that the object can be associated with.

cleanupAssociatedWorkspace

Boolean

Whether or not to cleanup the associated workspace directory with the job or deployment being purged.

cleanupDatabase

Boolean

Whether 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.

clearAdditionalFilters

Boolean

Whether or not to clear additional filters for the data retention policy.

clearAssociatedTags

Boolean

Whether or not to clear associated tags for the data retention policy.

clearProjectNames

Boolean

Whether or not to clear project names for the data retention policy.

clearStatuses

Boolean

Whether or not to clear statuses for the data retention policy.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

enabled

Boolean

True to enable the data retention policy. Defaults to true when creating the data retention policy.

includeSubreleases

Boolean

If the data retention rule is defined for releases, then whether to automatically include the subreleases for the releases matching the data retention rule. Defaults to false.

newName

String

The new name for an existing object that is being renamed.

objectType

DataRetentionPolicyObjectType

Type of object for which the retention rule is defined.

projectNames

Collection

List of projects that the object can belong to.

statuses

Collection

List of statuses for the object such as job status, release status, pipeline run status, or deployment status.

Positional arguments

dataRetentionPolicyName

Usage

ec-perl

$cmdr->modifyDataRetentionPolicy(<dataRetentionPolicyName>, {<optionals>});

ectool

ectool modifyDataRetentionPolicy dataRetentionPolicyName, [optionals]