1. Packages
  2. Artifactory Provider
  3. API Docs
  4. PackageCleanupPolicy
artifactory v8.9.0 published on Tuesday, Aug 5, 2025 by Pulumi

artifactory.PackageCleanupPolicy

Explore with Pulumi AI

artifactory logo
artifactory v8.9.0 published on Tuesday, Aug 5, 2025 by Pulumi

    Import

    $ pulumi import artifactory:index/packageCleanupPolicy:PackageCleanupPolicy my-cleanup-policy my-policy
    
    $ pulumi import artifactory:index/packageCleanupPolicy:PackageCleanupPolicy my-cleanup-policy my-policy:myproj
    

    Create PackageCleanupPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PackageCleanupPolicy(name: string, args: PackageCleanupPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def PackageCleanupPolicy(resource_name: str,
                             args: PackageCleanupPolicyArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def PackageCleanupPolicy(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             key: Optional[str] = None,
                             search_criteria: Optional[PackageCleanupPolicySearchCriteriaArgs] = None,
                             cron_expression: Optional[str] = None,
                             description: Optional[str] = None,
                             duration_in_minutes: Optional[int] = None,
                             enabled: Optional[bool] = None,
                             skip_trashcan: Optional[bool] = None)
    func NewPackageCleanupPolicy(ctx *Context, name string, args PackageCleanupPolicyArgs, opts ...ResourceOption) (*PackageCleanupPolicy, error)
    public PackageCleanupPolicy(string name, PackageCleanupPolicyArgs args, CustomResourceOptions? opts = null)
    public PackageCleanupPolicy(String name, PackageCleanupPolicyArgs args)
    public PackageCleanupPolicy(String name, PackageCleanupPolicyArgs args, CustomResourceOptions options)
    
    type: artifactory:PackageCleanupPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PackageCleanupPolicyArgs
    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 PackageCleanupPolicyArgs
    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 PackageCleanupPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PackageCleanupPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PackageCleanupPolicyArgs
    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 packageCleanupPolicyResource = new Artifactory.PackageCleanupPolicy("packageCleanupPolicyResource", new()
    {
        Key = "string",
        SearchCriteria = new Artifactory.Inputs.PackageCleanupPolicySearchCriteriaArgs
        {
            IncludedPackages = new[]
            {
                "string",
            },
            Repos = new[]
            {
                "string",
            },
            PackageTypes = new[]
            {
                "string",
            },
            IncludedProjects = new[]
            {
                "string",
            },
            ExcludedProperties = 
            {
                { "string", new[]
                {
                    "string",
                } },
            },
            IncludeAllProjects = false,
            ExcludedRepos = new[]
            {
                "string",
            },
            CreatedBeforeInDays = 0,
            IncludedProperties = 
            {
                { "string", new[]
                {
                    "string",
                } },
            },
            KeepLastNVersions = 0,
            LastDownloadedBeforeInDays = 0,
            ExcludedPackages = new[]
            {
                "string",
            },
        },
        CronExpression = "string",
        Description = "string",
        DurationInMinutes = 0,
        Enabled = false,
        SkipTrashcan = false,
    });
    
    example, err := artifactory.NewPackageCleanupPolicy(ctx, "packageCleanupPolicyResource", &artifactory.PackageCleanupPolicyArgs{
    	Key: pulumi.String("string"),
    	SearchCriteria: &artifactory.PackageCleanupPolicySearchCriteriaArgs{
    		IncludedPackages: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Repos: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		PackageTypes: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		IncludedProjects: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		ExcludedProperties: pulumi.StringArrayMap{
    			"string": pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		IncludeAllProjects: pulumi.Bool(false),
    		ExcludedRepos: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		CreatedBeforeInDays: pulumi.Int(0),
    		IncludedProperties: pulumi.StringArrayMap{
    			"string": pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		KeepLastNVersions:          pulumi.Int(0),
    		LastDownloadedBeforeInDays: pulumi.Int(0),
    		ExcludedPackages: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	CronExpression:    pulumi.String("string"),
    	Description:       pulumi.String("string"),
    	DurationInMinutes: pulumi.Int(0),
    	Enabled:           pulumi.Bool(false),
    	SkipTrashcan:      pulumi.Bool(false),
    })
    
    var packageCleanupPolicyResource = new PackageCleanupPolicy("packageCleanupPolicyResource", PackageCleanupPolicyArgs.builder()
        .key("string")
        .searchCriteria(PackageCleanupPolicySearchCriteriaArgs.builder()
            .includedPackages("string")
            .repos("string")
            .packageTypes("string")
            .includedProjects("string")
            .excludedProperties(Map.of("string", "string"))
            .includeAllProjects(false)
            .excludedRepos("string")
            .createdBeforeInDays(0)
            .includedProperties(Map.of("string", "string"))
            .keepLastNVersions(0)
            .lastDownloadedBeforeInDays(0)
            .excludedPackages("string")
            .build())
        .cronExpression("string")
        .description("string")
        .durationInMinutes(0)
        .enabled(false)
        .skipTrashcan(false)
        .build());
    
    package_cleanup_policy_resource = artifactory.PackageCleanupPolicy("packageCleanupPolicyResource",
        key="string",
        search_criteria={
            "included_packages": ["string"],
            "repos": ["string"],
            "package_types": ["string"],
            "included_projects": ["string"],
            "excluded_properties": {
                "string": ["string"],
            },
            "include_all_projects": False,
            "excluded_repos": ["string"],
            "created_before_in_days": 0,
            "included_properties": {
                "string": ["string"],
            },
            "keep_last_n_versions": 0,
            "last_downloaded_before_in_days": 0,
            "excluded_packages": ["string"],
        },
        cron_expression="string",
        description="string",
        duration_in_minutes=0,
        enabled=False,
        skip_trashcan=False)
    
    const packageCleanupPolicyResource = new artifactory.PackageCleanupPolicy("packageCleanupPolicyResource", {
        key: "string",
        searchCriteria: {
            includedPackages: ["string"],
            repos: ["string"],
            packageTypes: ["string"],
            includedProjects: ["string"],
            excludedProperties: {
                string: ["string"],
            },
            includeAllProjects: false,
            excludedRepos: ["string"],
            createdBeforeInDays: 0,
            includedProperties: {
                string: ["string"],
            },
            keepLastNVersions: 0,
            lastDownloadedBeforeInDays: 0,
            excludedPackages: ["string"],
        },
        cronExpression: "string",
        description: "string",
        durationInMinutes: 0,
        enabled: false,
        skipTrashcan: false,
    });
    
    type: artifactory:PackageCleanupPolicy
    properties:
        cronExpression: string
        description: string
        durationInMinutes: 0
        enabled: false
        key: string
        searchCriteria:
            createdBeforeInDays: 0
            excludedPackages:
                - string
            excludedProperties:
                string:
                    - string
            excludedRepos:
                - string
            includeAllProjects: false
            includedPackages:
                - string
            includedProjects:
                - string
            includedProperties:
                string:
                    - string
            keepLastNVersions: 0
            lastDownloadedBeforeInDays: 0
            packageTypes:
                - string
            repos:
                - string
        skipTrashcan: false
    

    PackageCleanupPolicy 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 PackageCleanupPolicy resource accepts the following input properties:

    Key string
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    SearchCriteria PackageCleanupPolicySearchCriteria
    CronExpression string
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    Description string
    DurationInMinutes int
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    Enabled bool
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    SkipTrashcan bool
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.
    Key string
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    SearchCriteria PackageCleanupPolicySearchCriteriaArgs
    CronExpression string
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    Description string
    DurationInMinutes int
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    Enabled bool
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    SkipTrashcan bool
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.
    key String
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    searchCriteria PackageCleanupPolicySearchCriteria
    cronExpression String
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    description String
    durationInMinutes Integer
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    enabled Boolean
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    skipTrashcan Boolean
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.
    key string
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    searchCriteria PackageCleanupPolicySearchCriteria
    cronExpression string
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    description string
    durationInMinutes number
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    enabled boolean
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    skipTrashcan boolean
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.
    key str
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    search_criteria PackageCleanupPolicySearchCriteriaArgs
    cron_expression str
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    description str
    duration_in_minutes int
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    enabled bool
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    skip_trashcan bool
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.
    key String
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    searchCriteria Property Map
    cronExpression String
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    description String
    durationInMinutes Number
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    enabled Boolean
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    skipTrashcan Boolean
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PackageCleanupPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PackageCleanupPolicy Resource

    Get an existing PackageCleanupPolicy 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?: PackageCleanupPolicyState, opts?: CustomResourceOptions): PackageCleanupPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cron_expression: Optional[str] = None,
            description: Optional[str] = None,
            duration_in_minutes: Optional[int] = None,
            enabled: Optional[bool] = None,
            key: Optional[str] = None,
            search_criteria: Optional[PackageCleanupPolicySearchCriteriaArgs] = None,
            skip_trashcan: Optional[bool] = None) -> PackageCleanupPolicy
    func GetPackageCleanupPolicy(ctx *Context, name string, id IDInput, state *PackageCleanupPolicyState, opts ...ResourceOption) (*PackageCleanupPolicy, error)
    public static PackageCleanupPolicy Get(string name, Input<string> id, PackageCleanupPolicyState? state, CustomResourceOptions? opts = null)
    public static PackageCleanupPolicy get(String name, Output<String> id, PackageCleanupPolicyState state, CustomResourceOptions options)
    resources:  _:    type: artifactory:PackageCleanupPolicy    get:      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.
    The following state arguments are supported:
    CronExpression string
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    Description string
    DurationInMinutes int
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    Enabled bool
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    Key string
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    SearchCriteria PackageCleanupPolicySearchCriteria
    SkipTrashcan bool
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.
    CronExpression string
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    Description string
    DurationInMinutes int
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    Enabled bool
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    Key string
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    SearchCriteria PackageCleanupPolicySearchCriteriaArgs
    SkipTrashcan bool
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.
    cronExpression String
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    description String
    durationInMinutes Integer
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    enabled Boolean
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    key String
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    searchCriteria PackageCleanupPolicySearchCriteria
    skipTrashcan Boolean
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.
    cronExpression string
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    description string
    durationInMinutes number
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    enabled boolean
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    key string
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    searchCriteria PackageCleanupPolicySearchCriteria
    skipTrashcan boolean
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.
    cron_expression str
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    description str
    duration_in_minutes int
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    enabled bool
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    key str
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    search_criteria PackageCleanupPolicySearchCriteriaArgs
    skip_trashcan bool
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.
    cronExpression String
    The cron expression that determines when the policy is run, However if left empty the policy will not run automatically and can only be triggered manually.
    description String
    durationInMinutes Number
    The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion.
    enabled Boolean
    A cleanup policy must be created inactive. But if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. Defaults to true
    key String
    An ID that is used to identify the cleanup policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
    searchCriteria Property Map
    skipTrashcan Boolean
    A true value means that when this policy is executed, packages will be permanently deleted. false means that when the policy is executed packages will be deleted to the Trash Can. Defaults to false.

    Supporting Types

    PackageCleanupPolicySearchCriteria, PackageCleanupPolicySearchCriteriaArgs

    IncludedPackages List<string>
    Specify a pattern for a package name or an explicit package name on which you want the cleanup policy to run. Only one pattern or explicit name can be entered. To include all packages, use **. Example: included_packages = ["**"]
    IncludedProjects List<string>
    Enter the project keys for the projects on which you want the policy to run. To include repositories that are not assigned to any project, enter the project key default. Can be empty when include_all_projects is set to true.
    PackageTypes List<string>
    Repos List<string>
    Specify one or more patterns for the repository name(s) on which you want the cleanup policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is mandatory. Only packages in repositories that match the pattern or explicit name will be deleted. For including all repos use **. Example: repos = ["**"]
    CreatedBeforeInDays int

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 5 then packages created more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_days condition to ensure that packages currently in use are not deleted.

    CreatedBeforeInMonths int

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 2 then packages created more than 2 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use created_before_in_days instead of created_before_in_months. Renamed to created_before_in_days starting in version 7.111.2.

    ExcludedPackages List<string>
    Specify explicit package names that you want excluded from the policy. Only explicit names (and not patterns) are accepted.
    ExcludedProperties Dictionary<string, ImmutableArray<string>>
    A key-value pair applied to the lead artifact of a package. Packages with this property will be excluded from deletion.
    ExcludedRepos List<string>
    Specify patterns for repository names or explicit repository names that you want excluded from the cleanup policy.
    IncludeAllProjects bool

    Set this value to true if you want the policy to run on all Artifactory projects. The default value is false.

    ~>This parameter is relevant only on the global level, for Platform Admins.

    IncludedProperties Dictionary<string, ImmutableArray<string>>
    A key-value pair applied to the lead artifact of a package. Packages with this property will be deleted.
    KeepLastNVersions int

    Set a value for the number of latest versions to keep. The cleanup policy will remove all versions prior to the number you select here. The latest version is always excluded.

    ~>Not all package types support this condition. For information on which package types support this condition, learn more.

    LastDownloadedBeforeInDays int

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_days condition to ensure that packages currently in use are not deleted.

    LastDownloadedBeforeInMonths int

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use last_downloaded_before_in_days instead of last_downloaded_before_in_months. Renamed to last_downloaded_before_in_days starting in version 7.111.2.

    IncludedPackages []string
    Specify a pattern for a package name or an explicit package name on which you want the cleanup policy to run. Only one pattern or explicit name can be entered. To include all packages, use **. Example: included_packages = ["**"]
    IncludedProjects []string
    Enter the project keys for the projects on which you want the policy to run. To include repositories that are not assigned to any project, enter the project key default. Can be empty when include_all_projects is set to true.
    PackageTypes []string
    Repos []string
    Specify one or more patterns for the repository name(s) on which you want the cleanup policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is mandatory. Only packages in repositories that match the pattern or explicit name will be deleted. For including all repos use **. Example: repos = ["**"]
    CreatedBeforeInDays int

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 5 then packages created more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_days condition to ensure that packages currently in use are not deleted.

    CreatedBeforeInMonths int

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 2 then packages created more than 2 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use created_before_in_days instead of created_before_in_months. Renamed to created_before_in_days starting in version 7.111.2.

    ExcludedPackages []string
    Specify explicit package names that you want excluded from the policy. Only explicit names (and not patterns) are accepted.
    ExcludedProperties map[string][]string
    A key-value pair applied to the lead artifact of a package. Packages with this property will be excluded from deletion.
    ExcludedRepos []string
    Specify patterns for repository names or explicit repository names that you want excluded from the cleanup policy.
    IncludeAllProjects bool

    Set this value to true if you want the policy to run on all Artifactory projects. The default value is false.

    ~>This parameter is relevant only on the global level, for Platform Admins.

    IncludedProperties map[string][]string
    A key-value pair applied to the lead artifact of a package. Packages with this property will be deleted.
    KeepLastNVersions int

    Set a value for the number of latest versions to keep. The cleanup policy will remove all versions prior to the number you select here. The latest version is always excluded.

    ~>Not all package types support this condition. For information on which package types support this condition, learn more.

    LastDownloadedBeforeInDays int

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_days condition to ensure that packages currently in use are not deleted.

    LastDownloadedBeforeInMonths int

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use last_downloaded_before_in_days instead of last_downloaded_before_in_months. Renamed to last_downloaded_before_in_days starting in version 7.111.2.

    includedPackages List<String>
    Specify a pattern for a package name or an explicit package name on which you want the cleanup policy to run. Only one pattern or explicit name can be entered. To include all packages, use **. Example: included_packages = ["**"]
    includedProjects List<String>
    Enter the project keys for the projects on which you want the policy to run. To include repositories that are not assigned to any project, enter the project key default. Can be empty when include_all_projects is set to true.
    packageTypes List<String>
    repos List<String>
    Specify one or more patterns for the repository name(s) on which you want the cleanup policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is mandatory. Only packages in repositories that match the pattern or explicit name will be deleted. For including all repos use **. Example: repos = ["**"]
    createdBeforeInDays Integer

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 5 then packages created more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_days condition to ensure that packages currently in use are not deleted.

    createdBeforeInMonths Integer

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 2 then packages created more than 2 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use created_before_in_days instead of created_before_in_months. Renamed to created_before_in_days starting in version 7.111.2.

    excludedPackages List<String>
    Specify explicit package names that you want excluded from the policy. Only explicit names (and not patterns) are accepted.
    excludedProperties Map<String,List<String>>
    A key-value pair applied to the lead artifact of a package. Packages with this property will be excluded from deletion.
    excludedRepos List<String>
    Specify patterns for repository names or explicit repository names that you want excluded from the cleanup policy.
    includeAllProjects Boolean

    Set this value to true if you want the policy to run on all Artifactory projects. The default value is false.

    ~>This parameter is relevant only on the global level, for Platform Admins.

    includedProperties Map<String,List<String>>
    A key-value pair applied to the lead artifact of a package. Packages with this property will be deleted.
    keepLastNVersions Integer

    Set a value for the number of latest versions to keep. The cleanup policy will remove all versions prior to the number you select here. The latest version is always excluded.

    ~>Not all package types support this condition. For information on which package types support this condition, learn more.

    lastDownloadedBeforeInDays Integer

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_days condition to ensure that packages currently in use are not deleted.

    lastDownloadedBeforeInMonths Integer

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use last_downloaded_before_in_days instead of last_downloaded_before_in_months. Renamed to last_downloaded_before_in_days starting in version 7.111.2.

    includedPackages string[]
    Specify a pattern for a package name or an explicit package name on which you want the cleanup policy to run. Only one pattern or explicit name can be entered. To include all packages, use **. Example: included_packages = ["**"]
    includedProjects string[]
    Enter the project keys for the projects on which you want the policy to run. To include repositories that are not assigned to any project, enter the project key default. Can be empty when include_all_projects is set to true.
    packageTypes string[]
    repos string[]
    Specify one or more patterns for the repository name(s) on which you want the cleanup policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is mandatory. Only packages in repositories that match the pattern or explicit name will be deleted. For including all repos use **. Example: repos = ["**"]
    createdBeforeInDays number

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 5 then packages created more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_days condition to ensure that packages currently in use are not deleted.

    createdBeforeInMonths number

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 2 then packages created more than 2 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use created_before_in_days instead of created_before_in_months. Renamed to created_before_in_days starting in version 7.111.2.

    excludedPackages string[]
    Specify explicit package names that you want excluded from the policy. Only explicit names (and not patterns) are accepted.
    excludedProperties {[key: string]: string[]}
    A key-value pair applied to the lead artifact of a package. Packages with this property will be excluded from deletion.
    excludedRepos string[]
    Specify patterns for repository names or explicit repository names that you want excluded from the cleanup policy.
    includeAllProjects boolean

    Set this value to true if you want the policy to run on all Artifactory projects. The default value is false.

    ~>This parameter is relevant only on the global level, for Platform Admins.

    includedProperties {[key: string]: string[]}
    A key-value pair applied to the lead artifact of a package. Packages with this property will be deleted.
    keepLastNVersions number

    Set a value for the number of latest versions to keep. The cleanup policy will remove all versions prior to the number you select here. The latest version is always excluded.

    ~>Not all package types support this condition. For information on which package types support this condition, learn more.

    lastDownloadedBeforeInDays number

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_days condition to ensure that packages currently in use are not deleted.

    lastDownloadedBeforeInMonths number

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use last_downloaded_before_in_days instead of last_downloaded_before_in_months. Renamed to last_downloaded_before_in_days starting in version 7.111.2.

    included_packages Sequence[str]
    Specify a pattern for a package name or an explicit package name on which you want the cleanup policy to run. Only one pattern or explicit name can be entered. To include all packages, use **. Example: included_packages = ["**"]
    included_projects Sequence[str]
    Enter the project keys for the projects on which you want the policy to run. To include repositories that are not assigned to any project, enter the project key default. Can be empty when include_all_projects is set to true.
    package_types Sequence[str]
    repos Sequence[str]
    Specify one or more patterns for the repository name(s) on which you want the cleanup policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is mandatory. Only packages in repositories that match the pattern or explicit name will be deleted. For including all repos use **. Example: repos = ["**"]
    created_before_in_days int

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 5 then packages created more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_days condition to ensure that packages currently in use are not deleted.

    created_before_in_months int

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 2 then packages created more than 2 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use created_before_in_days instead of created_before_in_months. Renamed to created_before_in_days starting in version 7.111.2.

    excluded_packages Sequence[str]
    Specify explicit package names that you want excluded from the policy. Only explicit names (and not patterns) are accepted.
    excluded_properties Mapping[str, Sequence[str]]
    A key-value pair applied to the lead artifact of a package. Packages with this property will be excluded from deletion.
    excluded_repos Sequence[str]
    Specify patterns for repository names or explicit repository names that you want excluded from the cleanup policy.
    include_all_projects bool

    Set this value to true if you want the policy to run on all Artifactory projects. The default value is false.

    ~>This parameter is relevant only on the global level, for Platform Admins.

    included_properties Mapping[str, Sequence[str]]
    A key-value pair applied to the lead artifact of a package. Packages with this property will be deleted.
    keep_last_n_versions int

    Set a value for the number of latest versions to keep. The cleanup policy will remove all versions prior to the number you select here. The latest version is always excluded.

    ~>Not all package types support this condition. For information on which package types support this condition, learn more.

    last_downloaded_before_in_days int

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_days condition to ensure that packages currently in use are not deleted.

    last_downloaded_before_in_months int

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use last_downloaded_before_in_days instead of last_downloaded_before_in_months. Renamed to last_downloaded_before_in_days starting in version 7.111.2.

    includedPackages List<String>
    Specify a pattern for a package name or an explicit package name on which you want the cleanup policy to run. Only one pattern or explicit name can be entered. To include all packages, use **. Example: included_packages = ["**"]
    includedProjects List<String>
    Enter the project keys for the projects on which you want the policy to run. To include repositories that are not assigned to any project, enter the project key default. Can be empty when include_all_projects is set to true.
    packageTypes List<String>
    repos List<String>
    Specify one or more patterns for the repository name(s) on which you want the cleanup policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is mandatory. Only packages in repositories that match the pattern or explicit name will be deleted. For including all repos use **. Example: repos = ["**"]
    createdBeforeInDays Number

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 5 then packages created more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_days condition to ensure that packages currently in use are not deleted.

    createdBeforeInMonths Number

    The cleanup policy will delete packages based on how long ago they were created. For example, if this parameter is 2 then packages created more than 2 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the created_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use created_before_in_days instead of created_before_in_months. Renamed to created_before_in_days starting in version 7.111.2.

    excludedPackages List<String>
    Specify explicit package names that you want excluded from the policy. Only explicit names (and not patterns) are accepted.
    excludedProperties Map<List<String>>
    A key-value pair applied to the lead artifact of a package. Packages with this property will be excluded from deletion.
    excludedRepos List<String>
    Specify patterns for repository names or explicit repository names that you want excluded from the cleanup policy.
    includeAllProjects Boolean

    Set this value to true if you want the policy to run on all Artifactory projects. The default value is false.

    ~>This parameter is relevant only on the global level, for Platform Admins.

    includedProperties Map<List<String>>
    A key-value pair applied to the lead artifact of a package. Packages with this property will be deleted.
    keepLastNVersions Number

    Set a value for the number of latest versions to keep. The cleanup policy will remove all versions prior to the number you select here. The latest version is always excluded.

    ~>Not all package types support this condition. For information on which package types support this condition, learn more.

    lastDownloadedBeforeInDays Number

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 days ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_days condition to ensure that packages currently in use are not deleted.

    lastDownloadedBeforeInMonths Number

    The cleanup policy will delete packages based on how long ago they were downloaded. For example, if this parameter is 5 then packages downloaded more than 5 months ago will be deleted as part of the policy.

    ~>JFrog recommends using the last_downloaded_before_in_months condition to ensure that packages currently in use are not deleted.

    Deprecated: Use last_downloaded_before_in_days instead of last_downloaded_before_in_months. Renamed to last_downloaded_before_in_days starting in version 7.111.2.

    Package Details

    Repository
    artifactory pulumi/pulumi-artifactory
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the artifactory Terraform Provider.
    artifactory logo
    artifactory v8.9.0 published on Tuesday, Aug 5, 2025 by Pulumi