published on Saturday, Jul 18, 2026 by Pulumi
published on Saturday, Jul 18, 2026 by Pulumi
Resource for creating and managing Harness Artifact Registry Lifecycle Rules.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
// Account-scoped DELETE rule — keep last 10 versions, runs nightly
const nightlyCleanup = new harness.platform.HarLifecycleRule("nightly_cleanup", {
accountId: "your-account-id",
name: "nightly-cleanup",
action: "DELETE",
description: "Keep last 10 versions of all artifacts",
applyTo: {
mode: "ALL_IN_SCOPE",
},
criteria: {
match: "ALL",
rules: [{
type: "KEEP_LAST_N",
value: 10,
}],
},
schedule: {
expression: "0 2 * * *",
timezone: "UTC",
},
});
// Project-scoped DELETE rule — delete artifacts older than 30 days
const ageBasedCleanup = new harness.platform.HarLifecycleRule("age_based_cleanup", {
accountId: "your-account-id",
orgId: "your-org-id",
projectId: "your-project-id",
name: "age-based-cleanup",
action: "DELETE",
applyTo: {
mode: "ALL_IN_SCOPE",
},
criteria: {
match: "ALL",
rules: [{
type: "AGE_BASED",
value: 30,
unit: "DAYS",
}],
},
});
// Org-scoped PROTECT rule — protect images in specific registries matching a tag pattern
const protectProd = new harness.platform.HarLifecycleRule("protect_prod", {
accountId: "your-account-id",
orgId: "your-org-id",
name: "protect-prod-images",
action: "PROTECT",
packageType: "DOCKER",
applyTo: {
mode: "EXPLICIT",
registries: [
"prod-registry",
"release-registry",
],
},
filterConfig: {
packageType: "DOCKER",
tagNameAllowedPatterns: [
"v*",
"release-*",
],
},
});
// Account-scoped DELETE rule with multiple criteria (ANY match)
const multiCriteriaCleanup = new harness.platform.HarLifecycleRule("multi_criteria_cleanup", {
accountId: "your-account-id",
name: "multi-criteria-cleanup",
action: "DELETE",
applyTo: {
mode: "ALL_IN_SCOPE",
},
criteria: {
match: "ANY",
rules: [
{
type: "KEEP_LAST_N",
value: 5,
},
{
type: "AGE_BASED",
value: 90,
unit: "DAYS",
},
],
},
});
import pulumi
import pulumi_harness as harness
# Account-scoped DELETE rule — keep last 10 versions, runs nightly
nightly_cleanup = harness.platform.HarLifecycleRule("nightly_cleanup",
account_id="your-account-id",
name="nightly-cleanup",
action="DELETE",
description="Keep last 10 versions of all artifacts",
apply_to={
"mode": "ALL_IN_SCOPE",
},
criteria={
"match": "ALL",
"rules": [{
"type": "KEEP_LAST_N",
"value": 10,
}],
},
schedule={
"expression": "0 2 * * *",
"timezone": "UTC",
})
# Project-scoped DELETE rule — delete artifacts older than 30 days
age_based_cleanup = harness.platform.HarLifecycleRule("age_based_cleanup",
account_id="your-account-id",
org_id="your-org-id",
project_id="your-project-id",
name="age-based-cleanup",
action="DELETE",
apply_to={
"mode": "ALL_IN_SCOPE",
},
criteria={
"match": "ALL",
"rules": [{
"type": "AGE_BASED",
"value": 30,
"unit": "DAYS",
}],
})
# Org-scoped PROTECT rule — protect images in specific registries matching a tag pattern
protect_prod = harness.platform.HarLifecycleRule("protect_prod",
account_id="your-account-id",
org_id="your-org-id",
name="protect-prod-images",
action="PROTECT",
package_type="DOCKER",
apply_to={
"mode": "EXPLICIT",
"registries": [
"prod-registry",
"release-registry",
],
},
filter_config={
"package_type": "DOCKER",
"tag_name_allowed_patterns": [
"v*",
"release-*",
],
})
# Account-scoped DELETE rule with multiple criteria (ANY match)
multi_criteria_cleanup = harness.platform.HarLifecycleRule("multi_criteria_cleanup",
account_id="your-account-id",
name="multi-criteria-cleanup",
action="DELETE",
apply_to={
"mode": "ALL_IN_SCOPE",
},
criteria={
"match": "ANY",
"rules": [
{
"type": "KEEP_LAST_N",
"value": 5,
},
{
"type": "AGE_BASED",
"value": 90,
"unit": "DAYS",
},
],
})
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Account-scoped DELETE rule — keep last 10 versions, runs nightly
_, err := platform.NewHarLifecycleRule(ctx, "nightly_cleanup", &platform.HarLifecycleRuleArgs{
AccountId: pulumi.String("your-account-id"),
Name: pulumi.String("nightly-cleanup"),
Action: pulumi.String("DELETE"),
Description: pulumi.String("Keep last 10 versions of all artifacts"),
ApplyTo: &platform.HarLifecycleRuleApplyToArgs{
Mode: pulumi.String("ALL_IN_SCOPE"),
},
Criteria: &platform.HarLifecycleRuleCriteriaArgs{
Match: pulumi.String("ALL"),
Rules: platform.HarLifecycleRuleCriteriaRuleArray{
&platform.HarLifecycleRuleCriteriaRuleArgs{
Type: pulumi.String("KEEP_LAST_N"),
Value: pulumi.Int(10),
},
},
},
Schedule: &platform.HarLifecycleRuleScheduleArgs{
Expression: pulumi.String("0 2 * * *"),
Timezone: pulumi.String("UTC"),
},
})
if err != nil {
return err
}
// Project-scoped DELETE rule — delete artifacts older than 30 days
_, err = platform.NewHarLifecycleRule(ctx, "age_based_cleanup", &platform.HarLifecycleRuleArgs{
AccountId: pulumi.String("your-account-id"),
OrgId: pulumi.String("your-org-id"),
ProjectId: pulumi.String("your-project-id"),
Name: pulumi.String("age-based-cleanup"),
Action: pulumi.String("DELETE"),
ApplyTo: &platform.HarLifecycleRuleApplyToArgs{
Mode: pulumi.String("ALL_IN_SCOPE"),
},
Criteria: &platform.HarLifecycleRuleCriteriaArgs{
Match: pulumi.String("ALL"),
Rules: platform.HarLifecycleRuleCriteriaRuleArray{
&platform.HarLifecycleRuleCriteriaRuleArgs{
Type: pulumi.String("AGE_BASED"),
Value: pulumi.Int(30),
Unit: pulumi.String("DAYS"),
},
},
},
})
if err != nil {
return err
}
// Org-scoped PROTECT rule — protect images in specific registries matching a tag pattern
_, err = platform.NewHarLifecycleRule(ctx, "protect_prod", &platform.HarLifecycleRuleArgs{
AccountId: pulumi.String("your-account-id"),
OrgId: pulumi.String("your-org-id"),
Name: pulumi.String("protect-prod-images"),
Action: pulumi.String("PROTECT"),
PackageType: pulumi.String("DOCKER"),
ApplyTo: &platform.HarLifecycleRuleApplyToArgs{
Mode: pulumi.String("EXPLICIT"),
Registries: pulumi.StringArray{
pulumi.String("prod-registry"),
pulumi.String("release-registry"),
},
},
FilterConfig: &platform.HarLifecycleRuleFilterConfigArgs{
PackageType: pulumi.String("DOCKER"),
TagNameAllowedPatterns: pulumi.StringArray{
pulumi.String("v*"),
pulumi.String("release-*"),
},
},
})
if err != nil {
return err
}
// Account-scoped DELETE rule with multiple criteria (ANY match)
_, err = platform.NewHarLifecycleRule(ctx, "multi_criteria_cleanup", &platform.HarLifecycleRuleArgs{
AccountId: pulumi.String("your-account-id"),
Name: pulumi.String("multi-criteria-cleanup"),
Action: pulumi.String("DELETE"),
ApplyTo: &platform.HarLifecycleRuleApplyToArgs{
Mode: pulumi.String("ALL_IN_SCOPE"),
},
Criteria: &platform.HarLifecycleRuleCriteriaArgs{
Match: pulumi.String("ANY"),
Rules: platform.HarLifecycleRuleCriteriaRuleArray{
&platform.HarLifecycleRuleCriteriaRuleArgs{
Type: pulumi.String("KEEP_LAST_N"),
Value: pulumi.Int(5),
},
&platform.HarLifecycleRuleCriteriaRuleArgs{
Type: pulumi.String("AGE_BASED"),
Value: pulumi.Int(90),
Unit: pulumi.String("DAYS"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
// Account-scoped DELETE rule — keep last 10 versions, runs nightly
var nightlyCleanup = new Harness.Platform.HarLifecycleRule("nightly_cleanup", new()
{
AccountId = "your-account-id",
Name = "nightly-cleanup",
Action = "DELETE",
Description = "Keep last 10 versions of all artifacts",
ApplyTo = new Harness.Platform.Inputs.HarLifecycleRuleApplyToArgs
{
Mode = "ALL_IN_SCOPE",
},
Criteria = new Harness.Platform.Inputs.HarLifecycleRuleCriteriaArgs
{
Match = "ALL",
Rules = new[]
{
new Harness.Platform.Inputs.HarLifecycleRuleCriteriaRuleArgs
{
Type = "KEEP_LAST_N",
Value = 10,
},
},
},
Schedule = new Harness.Platform.Inputs.HarLifecycleRuleScheduleArgs
{
Expression = "0 2 * * *",
Timezone = "UTC",
},
});
// Project-scoped DELETE rule — delete artifacts older than 30 days
var ageBasedCleanup = new Harness.Platform.HarLifecycleRule("age_based_cleanup", new()
{
AccountId = "your-account-id",
OrgId = "your-org-id",
ProjectId = "your-project-id",
Name = "age-based-cleanup",
Action = "DELETE",
ApplyTo = new Harness.Platform.Inputs.HarLifecycleRuleApplyToArgs
{
Mode = "ALL_IN_SCOPE",
},
Criteria = new Harness.Platform.Inputs.HarLifecycleRuleCriteriaArgs
{
Match = "ALL",
Rules = new[]
{
new Harness.Platform.Inputs.HarLifecycleRuleCriteriaRuleArgs
{
Type = "AGE_BASED",
Value = 30,
Unit = "DAYS",
},
},
},
});
// Org-scoped PROTECT rule — protect images in specific registries matching a tag pattern
var protectProd = new Harness.Platform.HarLifecycleRule("protect_prod", new()
{
AccountId = "your-account-id",
OrgId = "your-org-id",
Name = "protect-prod-images",
Action = "PROTECT",
PackageType = "DOCKER",
ApplyTo = new Harness.Platform.Inputs.HarLifecycleRuleApplyToArgs
{
Mode = "EXPLICIT",
Registries = new[]
{
"prod-registry",
"release-registry",
},
},
FilterConfig = new Harness.Platform.Inputs.HarLifecycleRuleFilterConfigArgs
{
PackageType = "DOCKER",
TagNameAllowedPatterns = new[]
{
"v*",
"release-*",
},
},
});
// Account-scoped DELETE rule with multiple criteria (ANY match)
var multiCriteriaCleanup = new Harness.Platform.HarLifecycleRule("multi_criteria_cleanup", new()
{
AccountId = "your-account-id",
Name = "multi-criteria-cleanup",
Action = "DELETE",
ApplyTo = new Harness.Platform.Inputs.HarLifecycleRuleApplyToArgs
{
Mode = "ALL_IN_SCOPE",
},
Criteria = new Harness.Platform.Inputs.HarLifecycleRuleCriteriaArgs
{
Match = "ANY",
Rules = new[]
{
new Harness.Platform.Inputs.HarLifecycleRuleCriteriaRuleArgs
{
Type = "KEEP_LAST_N",
Value = 5,
},
new Harness.Platform.Inputs.HarLifecycleRuleCriteriaRuleArgs
{
Type = "AGE_BASED",
Value = 90,
Unit = "DAYS",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.HarLifecycleRule;
import com.pulumi.harness.platform.HarLifecycleRuleArgs;
import com.pulumi.harness.platform.inputs.HarLifecycleRuleApplyToArgs;
import com.pulumi.harness.platform.inputs.HarLifecycleRuleCriteriaArgs;
import com.pulumi.harness.platform.inputs.HarLifecycleRuleCriteriaRuleArgs;
import com.pulumi.harness.platform.inputs.HarLifecycleRuleScheduleArgs;
import com.pulumi.harness.platform.inputs.HarLifecycleRuleFilterConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Account-scoped DELETE rule — keep last 10 versions, runs nightly
var nightlyCleanup = new HarLifecycleRule("nightlyCleanup", HarLifecycleRuleArgs.builder()
.accountId("your-account-id")
.name("nightly-cleanup")
.action("DELETE")
.description("Keep last 10 versions of all artifacts")
.applyTo(HarLifecycleRuleApplyToArgs.builder()
.mode("ALL_IN_SCOPE")
.build())
.criteria(HarLifecycleRuleCriteriaArgs.builder()
.match("ALL")
.rules(HarLifecycleRuleCriteriaRuleArgs.builder()
.type("KEEP_LAST_N")
.value(10)
.build())
.build())
.schedule(HarLifecycleRuleScheduleArgs.builder()
.expression("0 2 * * *")
.timezone("UTC")
.build())
.build());
// Project-scoped DELETE rule — delete artifacts older than 30 days
var ageBasedCleanup = new HarLifecycleRule("ageBasedCleanup", HarLifecycleRuleArgs.builder()
.accountId("your-account-id")
.orgId("your-org-id")
.projectId("your-project-id")
.name("age-based-cleanup")
.action("DELETE")
.applyTo(HarLifecycleRuleApplyToArgs.builder()
.mode("ALL_IN_SCOPE")
.build())
.criteria(HarLifecycleRuleCriteriaArgs.builder()
.match("ALL")
.rules(HarLifecycleRuleCriteriaRuleArgs.builder()
.type("AGE_BASED")
.value(30)
.unit("DAYS")
.build())
.build())
.build());
// Org-scoped PROTECT rule — protect images in specific registries matching a tag pattern
var protectProd = new HarLifecycleRule("protectProd", HarLifecycleRuleArgs.builder()
.accountId("your-account-id")
.orgId("your-org-id")
.name("protect-prod-images")
.action("PROTECT")
.packageType("DOCKER")
.applyTo(HarLifecycleRuleApplyToArgs.builder()
.mode("EXPLICIT")
.registries(
"prod-registry",
"release-registry")
.build())
.filterConfig(HarLifecycleRuleFilterConfigArgs.builder()
.packageType("DOCKER")
.tagNameAllowedPatterns(
"v*",
"release-*")
.build())
.build());
// Account-scoped DELETE rule with multiple criteria (ANY match)
var multiCriteriaCleanup = new HarLifecycleRule("multiCriteriaCleanup", HarLifecycleRuleArgs.builder()
.accountId("your-account-id")
.name("multi-criteria-cleanup")
.action("DELETE")
.applyTo(HarLifecycleRuleApplyToArgs.builder()
.mode("ALL_IN_SCOPE")
.build())
.criteria(HarLifecycleRuleCriteriaArgs.builder()
.match("ANY")
.rules(
HarLifecycleRuleCriteriaRuleArgs.builder()
.type("KEEP_LAST_N")
.value(5)
.build(),
HarLifecycleRuleCriteriaRuleArgs.builder()
.type("AGE_BASED")
.value(90)
.unit("DAYS")
.build())
.build())
.build());
}
}
resources:
# Account-scoped DELETE rule — keep last 10 versions, runs nightly
nightlyCleanup:
type: harness:platform:HarLifecycleRule
name: nightly_cleanup
properties:
accountId: your-account-id
name: nightly-cleanup
action: DELETE
description: Keep last 10 versions of all artifacts
applyTo:
mode: ALL_IN_SCOPE
criteria:
match: ALL
rules:
- type: KEEP_LAST_N
value: 10
schedule:
expression: 0 2 * * *
timezone: UTC
# Project-scoped DELETE rule — delete artifacts older than 30 days
ageBasedCleanup:
type: harness:platform:HarLifecycleRule
name: age_based_cleanup
properties:
accountId: your-account-id
orgId: your-org-id
projectId: your-project-id
name: age-based-cleanup
action: DELETE
applyTo:
mode: ALL_IN_SCOPE
criteria:
match: ALL
rules:
- type: AGE_BASED
value: 30
unit: DAYS
# Org-scoped PROTECT rule — protect images in specific registries matching a tag pattern
protectProd:
type: harness:platform:HarLifecycleRule
name: protect_prod
properties:
accountId: your-account-id
orgId: your-org-id
name: protect-prod-images
action: PROTECT
packageType: DOCKER
applyTo:
mode: EXPLICIT
registries:
- prod-registry
- release-registry
filterConfig:
packageType: DOCKER
tagNameAllowedPatterns:
- v*
- release-*
# Account-scoped DELETE rule with multiple criteria (ANY match)
multiCriteriaCleanup:
type: harness:platform:HarLifecycleRule
name: multi_criteria_cleanup
properties:
accountId: your-account-id
name: multi-criteria-cleanup
action: DELETE
applyTo:
mode: ALL_IN_SCOPE
criteria:
match: ANY
rules:
- type: KEEP_LAST_N
value: 5
- type: AGE_BASED
value: 90
unit: DAYS
pulumi {
required_providers {
harness = {
source = "pulumi/harness"
}
}
}
# Account-scoped DELETE rule — keep last 10 versions, runs nightly
resource "harness_platform_harlifecyclerule" "nightly_cleanup" {
account_id = "your-account-id"
name = "nightly-cleanup"
action = "DELETE"
description = "Keep last 10 versions of all artifacts"
apply_to = {
mode = "ALL_IN_SCOPE"
}
criteria = {
match = "ALL"
rules = [{
"type" = "KEEP_LAST_N"
"value" = 10
}]
}
schedule = {
expression = "0 2 * * *"
timezone = "UTC"
}
}
# Project-scoped DELETE rule — delete artifacts older than 30 days
resource "harness_platform_harlifecyclerule" "age_based_cleanup" {
account_id = "your-account-id"
org_id = "your-org-id"
project_id = "your-project-id"
name = "age-based-cleanup"
action = "DELETE"
apply_to = {
mode = "ALL_IN_SCOPE"
}
criteria = {
match = "ALL"
rules = [{
"type" = "AGE_BASED"
"value" = 30
"unit" = "DAYS"
}]
}
}
# Org-scoped PROTECT rule — protect images in specific registries matching a tag pattern
resource "harness_platform_harlifecyclerule" "protect_prod" {
account_id = "your-account-id"
org_id = "your-org-id"
name = "protect-prod-images"
action = "PROTECT"
package_type = "DOCKER"
apply_to = {
mode = "EXPLICIT"
registries = ["prod-registry", "release-registry"]
}
filter_config = {
package_type = "DOCKER"
tag_name_allowed_patterns = ["v*", "release-*"]
}
}
# Account-scoped DELETE rule with multiple criteria (ANY match)
resource "harness_platform_harlifecyclerule" "multi_criteria_cleanup" {
account_id = "your-account-id"
name = "multi-criteria-cleanup"
action = "DELETE"
apply_to = {
mode = "ALL_IN_SCOPE"
}
criteria = {
match = "ANY"
rules = [{
"type" = "KEEP_LAST_N"
"value" = 5
}, {
"type" = "AGE_BASED"
"value" = 90
"unit" = "DAYS"
}]
}
}
Create HarLifecycleRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new HarLifecycleRule(name: string, args: HarLifecycleRuleArgs, opts?: CustomResourceOptions);@overload
def HarLifecycleRule(resource_name: str,
args: HarLifecycleRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def HarLifecycleRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
action: Optional[str] = None,
apply_to: Optional[HarLifecycleRuleApplyToArgs] = None,
criteria: Optional[HarLifecycleRuleCriteriaArgs] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
filter_config: Optional[HarLifecycleRuleFilterConfigArgs] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
package_type: Optional[str] = None,
project_id: Optional[str] = None,
schedule: Optional[HarLifecycleRuleScheduleArgs] = None)func NewHarLifecycleRule(ctx *Context, name string, args HarLifecycleRuleArgs, opts ...ResourceOption) (*HarLifecycleRule, error)public HarLifecycleRule(string name, HarLifecycleRuleArgs args, CustomResourceOptions? opts = null)
public HarLifecycleRule(String name, HarLifecycleRuleArgs args)
public HarLifecycleRule(String name, HarLifecycleRuleArgs args, CustomResourceOptions options)
type: harness:platform:HarLifecycleRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "harness_platform_harlifecyclerule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args HarLifecycleRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args HarLifecycleRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args HarLifecycleRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HarLifecycleRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HarLifecycleRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var harLifecycleRuleResource = new Harness.Platform.HarLifecycleRule("harLifecycleRuleResource", new()
{
AccountId = "string",
Action = "string",
ApplyTo = new Harness.Platform.Inputs.HarLifecycleRuleApplyToArgs
{
Mode = "string",
Registries = new[]
{
"string",
},
},
Criteria = new Harness.Platform.Inputs.HarLifecycleRuleCriteriaArgs
{
Match = "string",
Rules = new[]
{
new Harness.Platform.Inputs.HarLifecycleRuleCriteriaRuleArgs
{
Type = "string",
Unit = "string",
Value = 0,
},
},
},
Description = "string",
Enabled = false,
FilterConfig = new Harness.Platform.Inputs.HarLifecycleRuleFilterConfigArgs
{
PackageType = "string",
DatasetAllowedPatterns = new[]
{
"string",
},
GroupIdAllowedPatterns = new[]
{
"string",
},
ModelAllowedPatterns = new[]
{
"string",
},
PackageNameAllowedPatterns = new[]
{
"string",
},
TagNameAllowedPatterns = new[]
{
"string",
},
VersionNameAllowedPatterns = new[]
{
"string",
},
},
Name = "string",
OrgId = "string",
PackageType = "string",
ProjectId = "string",
Schedule = new Harness.Platform.Inputs.HarLifecycleRuleScheduleArgs
{
Expression = "string",
Timezone = "string",
},
});
example, err := platform.NewHarLifecycleRule(ctx, "harLifecycleRuleResource", &platform.HarLifecycleRuleArgs{
AccountId: pulumi.String("string"),
Action: pulumi.String("string"),
ApplyTo: &platform.HarLifecycleRuleApplyToArgs{
Mode: pulumi.String("string"),
Registries: pulumi.StringArray{
pulumi.String("string"),
},
},
Criteria: &platform.HarLifecycleRuleCriteriaArgs{
Match: pulumi.String("string"),
Rules: platform.HarLifecycleRuleCriteriaRuleArray{
&platform.HarLifecycleRuleCriteriaRuleArgs{
Type: pulumi.String("string"),
Unit: pulumi.String("string"),
Value: pulumi.Int(0),
},
},
},
Description: pulumi.String("string"),
Enabled: pulumi.Bool(false),
FilterConfig: &platform.HarLifecycleRuleFilterConfigArgs{
PackageType: pulumi.String("string"),
DatasetAllowedPatterns: pulumi.StringArray{
pulumi.String("string"),
},
GroupIdAllowedPatterns: pulumi.StringArray{
pulumi.String("string"),
},
ModelAllowedPatterns: pulumi.StringArray{
pulumi.String("string"),
},
PackageNameAllowedPatterns: pulumi.StringArray{
pulumi.String("string"),
},
TagNameAllowedPatterns: pulumi.StringArray{
pulumi.String("string"),
},
VersionNameAllowedPatterns: pulumi.StringArray{
pulumi.String("string"),
},
},
Name: pulumi.String("string"),
OrgId: pulumi.String("string"),
PackageType: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Schedule: &platform.HarLifecycleRuleScheduleArgs{
Expression: pulumi.String("string"),
Timezone: pulumi.String("string"),
},
})
resource "harness_platform_harlifecyclerule" "harLifecycleRuleResource" {
account_id = "string"
action = "string"
apply_to = {
mode = "string"
registries = ["string"]
}
criteria = {
match = "string"
rules = [{
"type" = "string"
"unit" = "string"
"value" = 0
}]
}
description = "string"
enabled = false
filter_config = {
package_type = "string"
dataset_allowed_patterns = ["string"]
group_id_allowed_patterns = ["string"]
model_allowed_patterns = ["string"]
package_name_allowed_patterns = ["string"]
tag_name_allowed_patterns = ["string"]
version_name_allowed_patterns = ["string"]
}
name = "string"
org_id = "string"
package_type = "string"
project_id = "string"
schedule = {
expression = "string"
timezone = "string"
}
}
var harLifecycleRuleResource = new HarLifecycleRule("harLifecycleRuleResource", HarLifecycleRuleArgs.builder()
.accountId("string")
.action("string")
.applyTo(HarLifecycleRuleApplyToArgs.builder()
.mode("string")
.registries("string")
.build())
.criteria(HarLifecycleRuleCriteriaArgs.builder()
.match("string")
.rules(HarLifecycleRuleCriteriaRuleArgs.builder()
.type("string")
.unit("string")
.value(0)
.build())
.build())
.description("string")
.enabled(false)
.filterConfig(HarLifecycleRuleFilterConfigArgs.builder()
.packageType("string")
.datasetAllowedPatterns("string")
.groupIdAllowedPatterns("string")
.modelAllowedPatterns("string")
.packageNameAllowedPatterns("string")
.tagNameAllowedPatterns("string")
.versionNameAllowedPatterns("string")
.build())
.name("string")
.orgId("string")
.packageType("string")
.projectId("string")
.schedule(HarLifecycleRuleScheduleArgs.builder()
.expression("string")
.timezone("string")
.build())
.build());
har_lifecycle_rule_resource = harness.platform.HarLifecycleRule("harLifecycleRuleResource",
account_id="string",
action="string",
apply_to={
"mode": "string",
"registries": ["string"],
},
criteria={
"match": "string",
"rules": [{
"type": "string",
"unit": "string",
"value": 0,
}],
},
description="string",
enabled=False,
filter_config={
"package_type": "string",
"dataset_allowed_patterns": ["string"],
"group_id_allowed_patterns": ["string"],
"model_allowed_patterns": ["string"],
"package_name_allowed_patterns": ["string"],
"tag_name_allowed_patterns": ["string"],
"version_name_allowed_patterns": ["string"],
},
name="string",
org_id="string",
package_type="string",
project_id="string",
schedule={
"expression": "string",
"timezone": "string",
})
const harLifecycleRuleResource = new harness.platform.HarLifecycleRule("harLifecycleRuleResource", {
accountId: "string",
action: "string",
applyTo: {
mode: "string",
registries: ["string"],
},
criteria: {
match: "string",
rules: [{
type: "string",
unit: "string",
value: 0,
}],
},
description: "string",
enabled: false,
filterConfig: {
packageType: "string",
datasetAllowedPatterns: ["string"],
groupIdAllowedPatterns: ["string"],
modelAllowedPatterns: ["string"],
packageNameAllowedPatterns: ["string"],
tagNameAllowedPatterns: ["string"],
versionNameAllowedPatterns: ["string"],
},
name: "string",
orgId: "string",
packageType: "string",
projectId: "string",
schedule: {
expression: "string",
timezone: "string",
},
});
type: harness:platform:HarLifecycleRule
properties:
accountId: string
action: string
applyTo:
mode: string
registries:
- string
criteria:
match: string
rules:
- type: string
unit: string
value: 0
description: string
enabled: false
filterConfig:
datasetAllowedPatterns:
- string
groupIdAllowedPatterns:
- string
modelAllowedPatterns:
- string
packageNameAllowedPatterns:
- string
packageType: string
tagNameAllowedPatterns:
- string
versionNameAllowedPatterns:
- string
name: string
orgId: string
packageType: string
projectId: string
schedule:
expression: string
timezone: string
HarLifecycleRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The HarLifecycleRule resource accepts the following input properties:
- Account
Id string - Account identifier for the lifecycle rule.
- Action string
- Action to perform: DELETE or PROTECT.
- Apply
To HarLifecycle Rule Apply To - Defines which registries this rule applies to.
- Criteria
Har
Lifecycle Rule Criteria - Cleanup criteria for the lifecycle rule.
- Description string
- Enabled bool
- Whether the rule is enabled.
- Filter
Config HarLifecycle Rule Filter Config - Package-type-specific filter configuration.
- Name string
- Name of the lifecycle rule.
- Org
Id string - Organization identifier. Required for org-scoped rules.
- Package
Type string - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- Project
Id string - Project identifier. Required for project-scoped rules.
- Schedule
Har
Lifecycle Rule Schedule - Cron schedule for automatic execution of the rule.
- Account
Id string - Account identifier for the lifecycle rule.
- Action string
- Action to perform: DELETE or PROTECT.
- Apply
To HarLifecycle Rule Apply To Args - Defines which registries this rule applies to.
- Criteria
Har
Lifecycle Rule Criteria Args - Cleanup criteria for the lifecycle rule.
- Description string
- Enabled bool
- Whether the rule is enabled.
- Filter
Config HarLifecycle Rule Filter Config Args - Package-type-specific filter configuration.
- Name string
- Name of the lifecycle rule.
- Org
Id string - Organization identifier. Required for org-scoped rules.
- Package
Type string - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- Project
Id string - Project identifier. Required for project-scoped rules.
- Schedule
Har
Lifecycle Rule Schedule Args - Cron schedule for automatic execution of the rule.
- account_
id string - Account identifier for the lifecycle rule.
- action string
- Action to perform: DELETE or PROTECT.
- apply_
to object - Defines which registries this rule applies to.
- criteria object
- Cleanup criteria for the lifecycle rule.
- description string
- enabled bool
- Whether the rule is enabled.
- filter_
config object - Package-type-specific filter configuration.
- name string
- Name of the lifecycle rule.
- org_
id string - Organization identifier. Required for org-scoped rules.
- package_
type string - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- project_
id string - Project identifier. Required for project-scoped rules.
- schedule object
- Cron schedule for automatic execution of the rule.
- account
Id String - Account identifier for the lifecycle rule.
- action String
- Action to perform: DELETE or PROTECT.
- apply
To HarLifecycle Rule Apply To - Defines which registries this rule applies to.
- criteria
Har
Lifecycle Rule Criteria - Cleanup criteria for the lifecycle rule.
- description String
- enabled Boolean
- Whether the rule is enabled.
- filter
Config HarLifecycle Rule Filter Config - Package-type-specific filter configuration.
- name String
- Name of the lifecycle rule.
- org
Id String - Organization identifier. Required for org-scoped rules.
- package
Type String - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- project
Id String - Project identifier. Required for project-scoped rules.
- schedule
Har
Lifecycle Rule Schedule - Cron schedule for automatic execution of the rule.
- account
Id string - Account identifier for the lifecycle rule.
- action string
- Action to perform: DELETE or PROTECT.
- apply
To HarLifecycle Rule Apply To - Defines which registries this rule applies to.
- criteria
Har
Lifecycle Rule Criteria - Cleanup criteria for the lifecycle rule.
- description string
- enabled boolean
- Whether the rule is enabled.
- filter
Config HarLifecycle Rule Filter Config - Package-type-specific filter configuration.
- name string
- Name of the lifecycle rule.
- org
Id string - Organization identifier. Required for org-scoped rules.
- package
Type string - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- project
Id string - Project identifier. Required for project-scoped rules.
- schedule
Har
Lifecycle Rule Schedule - Cron schedule for automatic execution of the rule.
- account_
id str - Account identifier for the lifecycle rule.
- action str
- Action to perform: DELETE or PROTECT.
- apply_
to HarLifecycle Rule Apply To Args - Defines which registries this rule applies to.
- criteria
Har
Lifecycle Rule Criteria Args - Cleanup criteria for the lifecycle rule.
- description str
- enabled bool
- Whether the rule is enabled.
- filter_
config HarLifecycle Rule Filter Config Args - Package-type-specific filter configuration.
- name str
- Name of the lifecycle rule.
- org_
id str - Organization identifier. Required for org-scoped rules.
- package_
type str - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- project_
id str - Project identifier. Required for project-scoped rules.
- schedule
Har
Lifecycle Rule Schedule Args - Cron schedule for automatic execution of the rule.
- account
Id String - Account identifier for the lifecycle rule.
- action String
- Action to perform: DELETE or PROTECT.
- apply
To Property Map - Defines which registries this rule applies to.
- criteria Property Map
- Cleanup criteria for the lifecycle rule.
- description String
- enabled Boolean
- Whether the rule is enabled.
- filter
Config Property Map - Package-type-specific filter configuration.
- name String
- Name of the lifecycle rule.
- org
Id String - Organization identifier. Required for org-scoped rules.
- package
Type String - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- project
Id String - Project identifier. Required for project-scoped rules.
- schedule Property Map
- Cron schedule for automatic execution of the rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the HarLifecycleRule resource produces the following output properties:
- Created
At int - Timestamp when the rule was created (milliseconds since epoch).
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Run intAt - Timestamp of the last execution (milliseconds since epoch).
- Next
Run intAt - Timestamp of the next scheduled execution (milliseconds since epoch).
- Rule
Id string - Unique ID of the lifecycle rule (returned by the API).
- Updated
At int - Timestamp when the rule was last updated (milliseconds since epoch).
- Created
At int - Timestamp when the rule was created (milliseconds since epoch).
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Run intAt - Timestamp of the last execution (milliseconds since epoch).
- Next
Run intAt - Timestamp of the next scheduled execution (milliseconds since epoch).
- Rule
Id string - Unique ID of the lifecycle rule (returned by the API).
- Updated
At int - Timestamp when the rule was last updated (milliseconds since epoch).
- created_
at number - Timestamp when the rule was created (milliseconds since epoch).
- id string
- The provider-assigned unique ID for this managed resource.
- last_
run_ numberat - Timestamp of the last execution (milliseconds since epoch).
- next_
run_ numberat - Timestamp of the next scheduled execution (milliseconds since epoch).
- rule_
id string - Unique ID of the lifecycle rule (returned by the API).
- updated_
at number - Timestamp when the rule was last updated (milliseconds since epoch).
- created
At Integer - Timestamp when the rule was created (milliseconds since epoch).
- id String
- The provider-assigned unique ID for this managed resource.
- last
Run IntegerAt - Timestamp of the last execution (milliseconds since epoch).
- next
Run IntegerAt - Timestamp of the next scheduled execution (milliseconds since epoch).
- rule
Id String - Unique ID of the lifecycle rule (returned by the API).
- updated
At Integer - Timestamp when the rule was last updated (milliseconds since epoch).
- created
At number - Timestamp when the rule was created (milliseconds since epoch).
- id string
- The provider-assigned unique ID for this managed resource.
- last
Run numberAt - Timestamp of the last execution (milliseconds since epoch).
- next
Run numberAt - Timestamp of the next scheduled execution (milliseconds since epoch).
- rule
Id string - Unique ID of the lifecycle rule (returned by the API).
- updated
At number - Timestamp when the rule was last updated (milliseconds since epoch).
- created_
at int - Timestamp when the rule was created (milliseconds since epoch).
- id str
- The provider-assigned unique ID for this managed resource.
- last_
run_ intat - Timestamp of the last execution (milliseconds since epoch).
- next_
run_ intat - Timestamp of the next scheduled execution (milliseconds since epoch).
- rule_
id str - Unique ID of the lifecycle rule (returned by the API).
- updated_
at int - Timestamp when the rule was last updated (milliseconds since epoch).
- created
At Number - Timestamp when the rule was created (milliseconds since epoch).
- id String
- The provider-assigned unique ID for this managed resource.
- last
Run NumberAt - Timestamp of the last execution (milliseconds since epoch).
- next
Run NumberAt - Timestamp of the next scheduled execution (milliseconds since epoch).
- rule
Id String - Unique ID of the lifecycle rule (returned by the API).
- updated
At Number - Timestamp when the rule was last updated (milliseconds since epoch).
Look up Existing HarLifecycleRule Resource
Get an existing HarLifecycleRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: HarLifecycleRuleState, opts?: CustomResourceOptions): HarLifecycleRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
action: Optional[str] = None,
apply_to: Optional[HarLifecycleRuleApplyToArgs] = None,
created_at: Optional[int] = None,
criteria: Optional[HarLifecycleRuleCriteriaArgs] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
filter_config: Optional[HarLifecycleRuleFilterConfigArgs] = None,
last_run_at: Optional[int] = None,
name: Optional[str] = None,
next_run_at: Optional[int] = None,
org_id: Optional[str] = None,
package_type: Optional[str] = None,
project_id: Optional[str] = None,
rule_id: Optional[str] = None,
schedule: Optional[HarLifecycleRuleScheduleArgs] = None,
updated_at: Optional[int] = None) -> HarLifecycleRulefunc GetHarLifecycleRule(ctx *Context, name string, id IDInput, state *HarLifecycleRuleState, opts ...ResourceOption) (*HarLifecycleRule, error)public static HarLifecycleRule Get(string name, Input<string> id, HarLifecycleRuleState? state, CustomResourceOptions? opts = null)public static HarLifecycleRule get(String name, Output<String> id, HarLifecycleRuleState state, CustomResourceOptions options)resources: _: type: harness:platform:HarLifecycleRule get: id: ${id}import {
to = harness_platform_harlifecyclerule.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - Account identifier for the lifecycle rule.
- Action string
- Action to perform: DELETE or PROTECT.
- Apply
To HarLifecycle Rule Apply To - Defines which registries this rule applies to.
- Created
At int - Timestamp when the rule was created (milliseconds since epoch).
- Criteria
Har
Lifecycle Rule Criteria - Cleanup criteria for the lifecycle rule.
- Description string
- Enabled bool
- Whether the rule is enabled.
- Filter
Config HarLifecycle Rule Filter Config - Package-type-specific filter configuration.
- Last
Run intAt - Timestamp of the last execution (milliseconds since epoch).
- Name string
- Name of the lifecycle rule.
- Next
Run intAt - Timestamp of the next scheduled execution (milliseconds since epoch).
- Org
Id string - Organization identifier. Required for org-scoped rules.
- Package
Type string - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- Project
Id string - Project identifier. Required for project-scoped rules.
- Rule
Id string - Unique ID of the lifecycle rule (returned by the API).
- Schedule
Har
Lifecycle Rule Schedule - Cron schedule for automatic execution of the rule.
- Updated
At int - Timestamp when the rule was last updated (milliseconds since epoch).
- Account
Id string - Account identifier for the lifecycle rule.
- Action string
- Action to perform: DELETE or PROTECT.
- Apply
To HarLifecycle Rule Apply To Args - Defines which registries this rule applies to.
- Created
At int - Timestamp when the rule was created (milliseconds since epoch).
- Criteria
Har
Lifecycle Rule Criteria Args - Cleanup criteria for the lifecycle rule.
- Description string
- Enabled bool
- Whether the rule is enabled.
- Filter
Config HarLifecycle Rule Filter Config Args - Package-type-specific filter configuration.
- Last
Run intAt - Timestamp of the last execution (milliseconds since epoch).
- Name string
- Name of the lifecycle rule.
- Next
Run intAt - Timestamp of the next scheduled execution (milliseconds since epoch).
- Org
Id string - Organization identifier. Required for org-scoped rules.
- Package
Type string - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- Project
Id string - Project identifier. Required for project-scoped rules.
- Rule
Id string - Unique ID of the lifecycle rule (returned by the API).
- Schedule
Har
Lifecycle Rule Schedule Args - Cron schedule for automatic execution of the rule.
- Updated
At int - Timestamp when the rule was last updated (milliseconds since epoch).
- account_
id string - Account identifier for the lifecycle rule.
- action string
- Action to perform: DELETE or PROTECT.
- apply_
to object - Defines which registries this rule applies to.
- created_
at number - Timestamp when the rule was created (milliseconds since epoch).
- criteria object
- Cleanup criteria for the lifecycle rule.
- description string
- enabled bool
- Whether the rule is enabled.
- filter_
config object - Package-type-specific filter configuration.
- last_
run_ numberat - Timestamp of the last execution (milliseconds since epoch).
- name string
- Name of the lifecycle rule.
- next_
run_ numberat - Timestamp of the next scheduled execution (milliseconds since epoch).
- org_
id string - Organization identifier. Required for org-scoped rules.
- package_
type string - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- project_
id string - Project identifier. Required for project-scoped rules.
- rule_
id string - Unique ID of the lifecycle rule (returned by the API).
- schedule object
- Cron schedule for automatic execution of the rule.
- updated_
at number - Timestamp when the rule was last updated (milliseconds since epoch).
- account
Id String - Account identifier for the lifecycle rule.
- action String
- Action to perform: DELETE or PROTECT.
- apply
To HarLifecycle Rule Apply To - Defines which registries this rule applies to.
- created
At Integer - Timestamp when the rule was created (milliseconds since epoch).
- criteria
Har
Lifecycle Rule Criteria - Cleanup criteria for the lifecycle rule.
- description String
- enabled Boolean
- Whether the rule is enabled.
- filter
Config HarLifecycle Rule Filter Config - Package-type-specific filter configuration.
- last
Run IntegerAt - Timestamp of the last execution (milliseconds since epoch).
- name String
- Name of the lifecycle rule.
- next
Run IntegerAt - Timestamp of the next scheduled execution (milliseconds since epoch).
- org
Id String - Organization identifier. Required for org-scoped rules.
- package
Type String - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- project
Id String - Project identifier. Required for project-scoped rules.
- rule
Id String - Unique ID of the lifecycle rule (returned by the API).
- schedule
Har
Lifecycle Rule Schedule - Cron schedule for automatic execution of the rule.
- updated
At Integer - Timestamp when the rule was last updated (milliseconds since epoch).
- account
Id string - Account identifier for the lifecycle rule.
- action string
- Action to perform: DELETE or PROTECT.
- apply
To HarLifecycle Rule Apply To - Defines which registries this rule applies to.
- created
At number - Timestamp when the rule was created (milliseconds since epoch).
- criteria
Har
Lifecycle Rule Criteria - Cleanup criteria for the lifecycle rule.
- description string
- enabled boolean
- Whether the rule is enabled.
- filter
Config HarLifecycle Rule Filter Config - Package-type-specific filter configuration.
- last
Run numberAt - Timestamp of the last execution (milliseconds since epoch).
- name string
- Name of the lifecycle rule.
- next
Run numberAt - Timestamp of the next scheduled execution (milliseconds since epoch).
- org
Id string - Organization identifier. Required for org-scoped rules.
- package
Type string - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- project
Id string - Project identifier. Required for project-scoped rules.
- rule
Id string - Unique ID of the lifecycle rule (returned by the API).
- schedule
Har
Lifecycle Rule Schedule - Cron schedule for automatic execution of the rule.
- updated
At number - Timestamp when the rule was last updated (milliseconds since epoch).
- account_
id str - Account identifier for the lifecycle rule.
- action str
- Action to perform: DELETE or PROTECT.
- apply_
to HarLifecycle Rule Apply To Args - Defines which registries this rule applies to.
- created_
at int - Timestamp when the rule was created (milliseconds since epoch).
- criteria
Har
Lifecycle Rule Criteria Args - Cleanup criteria for the lifecycle rule.
- description str
- enabled bool
- Whether the rule is enabled.
- filter_
config HarLifecycle Rule Filter Config Args - Package-type-specific filter configuration.
- last_
run_ intat - Timestamp of the last execution (milliseconds since epoch).
- name str
- Name of the lifecycle rule.
- next_
run_ intat - Timestamp of the next scheduled execution (milliseconds since epoch).
- org_
id str - Organization identifier. Required for org-scoped rules.
- package_
type str - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- project_
id str - Project identifier. Required for project-scoped rules.
- rule_
id str - Unique ID of the lifecycle rule (returned by the API).
- schedule
Har
Lifecycle Rule Schedule Args - Cron schedule for automatic execution of the rule.
- updated_
at int - Timestamp when the rule was last updated (milliseconds since epoch).
- account
Id String - Account identifier for the lifecycle rule.
- action String
- Action to perform: DELETE or PROTECT.
- apply
To Property Map - Defines which registries this rule applies to.
- created
At Number - Timestamp when the rule was created (milliseconds since epoch).
- criteria Property Map
- Cleanup criteria for the lifecycle rule.
- description String
- enabled Boolean
- Whether the rule is enabled.
- filter
Config Property Map - Package-type-specific filter configuration.
- last
Run NumberAt - Timestamp of the last execution (milliseconds since epoch).
- name String
- Name of the lifecycle rule.
- next
Run NumberAt - Timestamp of the next scheduled execution (milliseconds since epoch).
- org
Id String - Organization identifier. Required for org-scoped rules.
- package
Type String - Package type the rule applies to (e.g. DOCKER, MAVEN, HELM).
- project
Id String - Project identifier. Required for project-scoped rules.
- rule
Id String - Unique ID of the lifecycle rule (returned by the API).
- schedule Property Map
- Cron schedule for automatic execution of the rule.
- updated
At Number - Timestamp when the rule was last updated (milliseconds since epoch).
Supporting Types
HarLifecycleRuleApplyTo, HarLifecycleRuleApplyToArgs
- Mode string
- Mode: ALLINSCOPE or EXPLICIT.
- Registries List<string>
- List of registry identifiers (required when mode=EXPLICIT).
- Mode string
- Mode: ALLINSCOPE or EXPLICIT.
- Registries []string
- List of registry identifiers (required when mode=EXPLICIT).
- mode string
- Mode: ALLINSCOPE or EXPLICIT.
- registries list(string)
- List of registry identifiers (required when mode=EXPLICIT).
- mode String
- Mode: ALLINSCOPE or EXPLICIT.
- registries List<String>
- List of registry identifiers (required when mode=EXPLICIT).
- mode string
- Mode: ALLINSCOPE or EXPLICIT.
- registries string[]
- List of registry identifiers (required when mode=EXPLICIT).
- mode str
- Mode: ALLINSCOPE or EXPLICIT.
- registries Sequence[str]
- List of registry identifiers (required when mode=EXPLICIT).
- mode String
- Mode: ALLINSCOPE or EXPLICIT.
- registries List<String>
- List of registry identifiers (required when mode=EXPLICIT).
HarLifecycleRuleCriteria, HarLifecycleRuleCriteriaArgs
- Match string
- How criteria rules are combined: ALL or ANY.
- Rules
List<Har
Lifecycle Rule Criteria Rule> - List of individual criteria rules.
- Match string
- How criteria rules are combined: ALL or ANY.
- Rules
[]Har
Lifecycle Rule Criteria Rule - List of individual criteria rules.
- match string
- How criteria rules are combined: ALL or ANY.
- rules list(object)
- List of individual criteria rules.
- match String
- How criteria rules are combined: ALL or ANY.
- rules
List<Har
Lifecycle Rule Criteria Rule> - List of individual criteria rules.
- match string
- How criteria rules are combined: ALL or ANY.
- rules
Har
Lifecycle Rule Criteria Rule[] - List of individual criteria rules.
- match str
- How criteria rules are combined: ALL or ANY.
- rules
Sequence[Har
Lifecycle Rule Criteria Rule] - List of individual criteria rules.
- match String
- How criteria rules are combined: ALL or ANY.
- rules List<Property Map>
- List of individual criteria rules.
HarLifecycleRuleCriteriaRule, HarLifecycleRuleCriteriaRuleArgs
HarLifecycleRuleFilterConfig, HarLifecycleRuleFilterConfigArgs
- Package
Type string - Package type this filter applies to (e.g. DOCKER, MAVEN, HUGGINGFACE).
- Dataset
Allowed List<string>Patterns - Glob patterns for HuggingFace dataset names to include (HUGGINGFACE only).
- Group
Id List<string>Allowed Patterns - Glob patterns for Maven group IDs to include (MAVEN only).
- Model
Allowed List<string>Patterns - Glob patterns for HuggingFace model names to include (HUGGINGFACE only).
- Package
Name List<string>Allowed Patterns - Glob patterns for package/image names to include.
- Tag
Name List<string>Allowed Patterns - Glob patterns for Docker tag names to include (DOCKER only).
- Version
Name List<string>Allowed Patterns - Glob patterns for version/tag names to include.
- Package
Type string - Package type this filter applies to (e.g. DOCKER, MAVEN, HUGGINGFACE).
- Dataset
Allowed []stringPatterns - Glob patterns for HuggingFace dataset names to include (HUGGINGFACE only).
- Group
Id []stringAllowed Patterns - Glob patterns for Maven group IDs to include (MAVEN only).
- Model
Allowed []stringPatterns - Glob patterns for HuggingFace model names to include (HUGGINGFACE only).
- Package
Name []stringAllowed Patterns - Glob patterns for package/image names to include.
- Tag
Name []stringAllowed Patterns - Glob patterns for Docker tag names to include (DOCKER only).
- Version
Name []stringAllowed Patterns - Glob patterns for version/tag names to include.
- package_
type string - Package type this filter applies to (e.g. DOCKER, MAVEN, HUGGINGFACE).
- dataset_
allowed_ list(string)patterns - Glob patterns for HuggingFace dataset names to include (HUGGINGFACE only).
- group_
id_ list(string)allowed_ patterns - Glob patterns for Maven group IDs to include (MAVEN only).
- model_
allowed_ list(string)patterns - Glob patterns for HuggingFace model names to include (HUGGINGFACE only).
- package_
name_ list(string)allowed_ patterns - Glob patterns for package/image names to include.
- tag_
name_ list(string)allowed_ patterns - Glob patterns for Docker tag names to include (DOCKER only).
- version_
name_ list(string)allowed_ patterns - Glob patterns for version/tag names to include.
- package
Type String - Package type this filter applies to (e.g. DOCKER, MAVEN, HUGGINGFACE).
- dataset
Allowed List<String>Patterns - Glob patterns for HuggingFace dataset names to include (HUGGINGFACE only).
- group
Id List<String>Allowed Patterns - Glob patterns for Maven group IDs to include (MAVEN only).
- model
Allowed List<String>Patterns - Glob patterns for HuggingFace model names to include (HUGGINGFACE only).
- package
Name List<String>Allowed Patterns - Glob patterns for package/image names to include.
- tag
Name List<String>Allowed Patterns - Glob patterns for Docker tag names to include (DOCKER only).
- version
Name List<String>Allowed Patterns - Glob patterns for version/tag names to include.
- package
Type string - Package type this filter applies to (e.g. DOCKER, MAVEN, HUGGINGFACE).
- dataset
Allowed string[]Patterns - Glob patterns for HuggingFace dataset names to include (HUGGINGFACE only).
- group
Id string[]Allowed Patterns - Glob patterns for Maven group IDs to include (MAVEN only).
- model
Allowed string[]Patterns - Glob patterns for HuggingFace model names to include (HUGGINGFACE only).
- package
Name string[]Allowed Patterns - Glob patterns for package/image names to include.
- tag
Name string[]Allowed Patterns - Glob patterns for Docker tag names to include (DOCKER only).
- version
Name string[]Allowed Patterns - Glob patterns for version/tag names to include.
- package_
type str - Package type this filter applies to (e.g. DOCKER, MAVEN, HUGGINGFACE).
- dataset_
allowed_ Sequence[str]patterns - Glob patterns for HuggingFace dataset names to include (HUGGINGFACE only).
- group_
id_ Sequence[str]allowed_ patterns - Glob patterns for Maven group IDs to include (MAVEN only).
- model_
allowed_ Sequence[str]patterns - Glob patterns for HuggingFace model names to include (HUGGINGFACE only).
- package_
name_ Sequence[str]allowed_ patterns - Glob patterns for package/image names to include.
- tag_
name_ Sequence[str]allowed_ patterns - Glob patterns for Docker tag names to include (DOCKER only).
- version_
name_ Sequence[str]allowed_ patterns - Glob patterns for version/tag names to include.
- package
Type String - Package type this filter applies to (e.g. DOCKER, MAVEN, HUGGINGFACE).
- dataset
Allowed List<String>Patterns - Glob patterns for HuggingFace dataset names to include (HUGGINGFACE only).
- group
Id List<String>Allowed Patterns - Glob patterns for Maven group IDs to include (MAVEN only).
- model
Allowed List<String>Patterns - Glob patterns for HuggingFace model names to include (HUGGINGFACE only).
- package
Name List<String>Allowed Patterns - Glob patterns for package/image names to include.
- tag
Name List<String>Allowed Patterns - Glob patterns for Docker tag names to include (DOCKER only).
- version
Name List<String>Allowed Patterns - Glob patterns for version/tag names to include.
HarLifecycleRuleSchedule, HarLifecycleRuleScheduleArgs
- Expression string
- Cron expression (e.g. '0 2 * * *').
- Timezone string
- Timezone for the cron schedule (e.g. 'UTC', 'America/New_York').
- Expression string
- Cron expression (e.g. '0 2 * * *').
- Timezone string
- Timezone for the cron schedule (e.g. 'UTC', 'America/New_York').
- expression string
- Cron expression (e.g. '0 2 * * *').
- timezone string
- Timezone for the cron schedule (e.g. 'UTC', 'America/New_York').
- expression String
- Cron expression (e.g. '0 2 * * *').
- timezone String
- Timezone for the cron schedule (e.g. 'UTC', 'America/New_York').
- expression string
- Cron expression (e.g. '0 2 * * *').
- timezone string
- Timezone for the cron schedule (e.g. 'UTC', 'America/New_York').
- expression str
- Cron expression (e.g. '0 2 * * *').
- timezone str
- Timezone for the cron schedule (e.g. 'UTC', 'America/New_York').
- expression String
- Cron expression (e.g. '0 2 * * *').
- timezone String
- Timezone for the cron schedule (e.g. 'UTC', 'America/New_York').
Import
The pulumi import command can be used, for example:
Account level: <account_id>/<rule_id>
$ pulumi import harness:platform/harLifecycleRule:HarLifecycleRule example <account_id>/<rule_id>
Org level: <account_id>/<org_id>/<rule_id>
$ pulumi import harness:platform/harLifecycleRule:HarLifecycleRule example <account_id>/<org_id>/<rule_id>
Project level: <account_id>/<org_id>/<project_id>/<rule_id>
$ pulumi import harness:platform/harLifecycleRule:HarLifecycleRule example <account_id>/<org_id>/<project_id>/<rule_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
published on Saturday, Jul 18, 2026 by Pulumi